From 1731be96ba72786f4f69d4f752d2f99c6d774b4c Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 19 Aug 2010 09:57:54 +0200 Subject: [PATCH] collectd-nagios: Remove unnecessary includes. The UNIX socket is now handled in the library, no need for including those files anymore. --- src/collectd-nagios.c | 41 +++++++++++++---------------------------- src/collectdctl.c | 10 +++++----- 2 files changed, 18 insertions(+), 33 deletions(-) diff --git a/src/collectd-nagios.c b/src/collectd-nagios.c index b190d6ee..88e70392 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,13 @@ #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 diff --git a/src/collectdctl.c b/src/collectdctl.c index bb7cfca4..e1091cc6 100644 --- a/src/collectdctl.c +++ b/src/collectdctl.c @@ -21,6 +21,10 @@ * Sebastian "tokkee" Harl **/ +#if HAVE_CONFIG_H +# include "config.h" +#endif + #ifndef _ISOC99_SOURCE # define _ISOC99_SOURCE #endif @@ -33,13 +37,9 @@ # define _XOPEN_SOURCE 600 #endif -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include #include #include +#include #include #include -- 2.11.0