X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd-nagios.c;h=af8744de6da58353d0c47d69381fc6acec664b7b;hb=7e16c9347076ef731476d4864add43f0049135c4;hp=88e7039281210c523771a9b6e36b567db9ea7c21;hpb=1731be96ba72786f4f69d4f752d2f99c6d774b4c;p=collectd.git diff --git a/src/collectd-nagios.c b/src/collectd-nagios.c index 88e70392..af8744de 100644 --- a/src/collectd-nagios.c +++ b/src/collectd-nagios.c @@ -23,18 +23,6 @@ # 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 @@ -46,13 +34,40 @@ #include #include #include -#include + +#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) */ +# ifndef isfinite +# define isfinite(f) (((f) - (f)) == 0.0) +# endif +# ifndef isinf +# define isinf(f) (!isfinite(f) && !isnan(f)) +# endif +#endif /* NAN_ZERO_ZERO */ #include "libcollectdclient/client.h" -/* - * This is copied directly from collectd.h. Make changes there! - */ #define RET_OKAY 0 #define RET_WARNING 1 #define RET_CRITICAL 2