X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd-nagios.c;h=b3c1855aba2be7d98a3c112b62b5ddbebe33f609;hb=8eb9e6285f394569d7fe6ad43a0f4e5f9bca454f;hp=b190d6ee7a7f118bdcebea121856339ebc7542ca;hpb=b53110ef99e3d6a5e2f8e79b8f068cfe96a1accb;p=collectd.git diff --git a/src/collectd-nagios.c b/src/collectd-nagios.c index b190d6ee..b3c1855a 100644 --- a/src/collectd-nagios.c +++ b/src/collectd-nagios.c @@ -23,6 +23,18 @@ # include "config.h" #endif +#ifndef _ISOC99_SOURCE +# define _ISOC99_SOURCE +#endif + +#ifndef _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200112L +#endif + +#ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 600 +#endif + #if !defined(__GNUC__) || !__GNUC__ # define __attribute__(x) /**/ #endif @@ -34,40 +46,10 @@ #include #include #include - -#include -#include +#include #include "libcollectdclient/client.h" -/* - * This is copied directly from collectd.h. Make changes there! - */ -#if NAN_STATIC_DEFAULT -# include -/* #endif NAN_STATIC_DEFAULT*/ -#elif NAN_STATIC_ISOC -# ifndef __USE_ISOC99 -# define DISABLE_ISOC99 1 -# define __USE_ISOC99 1 -# endif /* !defined(__USE_ISOC99) */ -# include -# if DISABLE_ISOC99 -# undef DISABLE_ISOC99 -# undef __USE_ISOC99 -# endif /* DISABLE_ISOC99 */ -/* #endif NAN_STATIC_ISOC */ -#elif NAN_ZERO_ZERO -# include -# ifdef NAN -# undef NAN -# endif -# define NAN (0.0 / 0.0) -# ifndef isnan -# define isnan(f) ((f) != (f)) -# endif /* !defined(isnan) */ -#endif /* NAN_ZERO_ZERO */ - #define RET_OKAY 0 #define RET_WARNING 1 #define RET_CRITICAL 2