summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9f28473)
raw | patch | inline | side by side (parent: 9f28473)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 19 Aug 2010 07:57:54 +0000 (09:57 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 19 Aug 2010 07:57:54 +0000 (09:57 +0200) |
The UNIX socket is now handled in the library, no need for including
those files anymore.
those files anymore.
src/collectd-nagios.c | patch | blob | history | |
src/collectdctl.c | patch | blob | history |
diff --git a/src/collectd-nagios.c b/src/collectd-nagios.c
index b190d6ee7a7f118bdcebea121856339ebc7542ca..88e7039281210c523771a9b6e36b567db9ea7c21 100644 (file)
--- a/src/collectd-nagios.c
+++ b/src/collectd-nagios.c
# 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
#include <string.h>
#include <strings.h>
#include <assert.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
+#include <math.h>
#include "libcollectdclient/client.h"
/*
* This is copied directly from collectd.h. Make changes there!
*/
-#if NAN_STATIC_DEFAULT
-# include <math.h>
-/* #endif NAN_STATIC_DEFAULT*/
-#elif NAN_STATIC_ISOC
-# ifndef __USE_ISOC99
-# define DISABLE_ISOC99 1
-# define __USE_ISOC99 1
-# endif /* !defined(__USE_ISOC99) */
-# include <math.h>
-# if DISABLE_ISOC99
-# undef DISABLE_ISOC99
-# undef __USE_ISOC99
-# endif /* DISABLE_ISOC99 */
-/* #endif NAN_STATIC_ISOC */
-#elif NAN_ZERO_ZERO
-# include <math.h>
-# 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 bb7cfca4cf9d39fa435c6a84b8a25793a8d17230..e1091cc6467a5669d4e9aee2e2d5dfa30d9ff730 100644 (file)
--- a/src/collectdctl.c
+++ b/src/collectdctl.c
* Sebastian "tokkee" Harl <sh@tokkee.org>
**/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#ifndef _ISOC99_SOURCE
# define _ISOC99_SOURCE
#endif
# define _XOPEN_SOURCE 600
#endif
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <stdio.h>
#include <string.h>
#include <strings.h>