diff --git a/plugins/common.h.in b/plugins/common.h.in
index 9cb4bcbbd8ef91bf825d24357c756078b7793d59..09df00dd5c42d43e6a918e410106c4530cc002e1 100644 (file)
--- a/plugins/common.h.in
+++ b/plugins/common.h.in
#include <signal.h>
#endif
-/* #ifdef HAVE_GETOPT_H */
+/* TODO: define can be removed when all ifdef in each plugin has been removed */
+#define HAVE_GETOPT_H
#include <getopt.h>
-/* #endif */
#include <ctype.h>
+#if HAVE_LWRES_NETDB_H
+#include <lwres/netdb.h>
+#elif !HAVE_GETADDRINFO
+#include "getaddrinfo.h"
+#else
+#include <netdb.h>
+#endif
/*
*
# define strtoul(a,b,c) (unsigned long)atol((a))
#endif
+#ifndef HAVE_ASPRINTF
+int asprintf(char **strp, const char *fmt, ...);
+#endif
+
+#ifndef HAVE_VASPRINTF
+/* int vasprintf(char **strp, const char *fmt, va_list ap); */
+#endif
+
+#ifndef HAVE_SNPRINTF
+int snprintf(char *str, size_t size, const char *format, ...);
+#endif
+
+#ifndef HAVE_VSNPRINTF
+int vsnprintf(char *str, size_t size, const char *format, va_list ap);
+#endif
+
/*
*
* Standard Values
#define STATE_CRITICAL 2 /* service state return codes */
#define STATE_WARNING 1
#define STATE_OK 0
-#define STATE_UNKNOWN -1
-#define STATE_DEPENDENT -2
+#define STATE_UNKNOWN 3
+#define STATE_DEPENDENT 4
#define DEFAULT_SOCKET_TIMEOUT 10 /* timeout after 10 seconds */