summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e91c40b)
raw | patch | inline | side by side (parent: e91c40b)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 12 Mar 2007 11:42:07 +0000 (12:42 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 12 Mar 2007 11:42:07 +0000 (12:42 +0100) |
src/collectd.h | patch | blob | history |
diff --git a/src/collectd.h b/src/collectd.h
index c544bf5cbffa7623ee19a4d835817b6b6dbc59e1..7bf2f565a9e2024f1fe4b98187bd3451a22e3f42 100644 (file)
--- a/src/collectd.h
+++ b/src/collectd.h
# define assert(...) /* nop */
#endif
-/*
- * This weird macro cascade forces the glibc to define `NAN'. I don't know
- * another way to solve this, so more intelligent solutions are welcome. -octo
- */
-#ifndef __USE_ISOC99
-# define DISABLE__USE_ISOC99 1
-# define __USE_ISOC99 1
-#endif
-#include <math.h>
-#ifdef DISABLE__USE_ISOC99
-# undef DISABLE__USE_ISOC99
-# undef __USE_ISOC99
-#endif
+#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>
+# define NAN (0.0 / 0.0)
+# ifndef isnan
+# define isnan(f) ((f) != (f))
+# endif /* !defined(isnan) */
+#endif /* NAN_ZERO_ZERO */
#if HAVE_DIRENT_H
# include <dirent.h>
extern char hostname_g[];
extern int interval_g;
-/* int main (int argc, char **argv); */
-
#endif /* COLLECTD_H */