#define RRD_VERSION "0002"
#define FLOAT_COOKIE 8.642135E130
-#if defined(WIN32)
-#define DNAN ((double)fmod(0.0,0.0))
-#define DINF ((double)log(0.0))
-#else
-
-#define DNAN ((double)(0.0/0.0)) /* we use a DNAN to
- * represent the UNKNOWN
- * */
-#define DINF ((double)(1.0/0.0)) /* we use a DINF to
- * represent a value at the upper or
- * lower border of the graph ...
- * */
-#endif
+#include "rrd_nan_inf.h"
typedef union unival {
unsigned long u_cnt;
--- /dev/null
+#include "rrd_nan_inf.h"
+
+#if defined(WIN32)
+
+double set_to_DNAN(void) { return (double)fmod(0.0,0.0); }
+double set_to_DINF(void) { return (double)log(0.0); }
+
+#else
+
+double set_to_DNAN(void) { return (double)(0.0/0.0); }
+double set_to_DINF(void) { return (double)(1.0/0.0); }
+
+#endif
--- /dev/null
+#define DNAN set_to_DNAN()
+#define DINF set_to_DINF()
+
+double set_to_DNAN(void);
+double set_to_DINF(void);