make rrdtool compile with gcc 4.5 if -std=c99 is set -- anicka@suse.cz
[rrdtool.git] / src / rrd_format.h
index b8f0790..4046af2 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3rc9  Copyright by Tobi Oetiker, 1997-2008
+ * RRDtool 1.4.3  Copyright by Tobi Oetiker, 1997-2010
  *****************************************************************************
  * rrd_format.h  RRD Database Format header
  *****************************************************************************/
@@ -7,6 +7,18 @@
 #ifndef _RRD_FORMAT_H
 #define _RRD_FORMAT_H
 
+/* 
+ * _RRD_TOOL_H
+ *   We're building RRDTool itself.
+ *
+ * RRD_EXPORT_DEPRECATED
+ *   User is requesting internal function which need this struct. They have
+ *   been told that this will change and have agreed to adapt their programs.
+ */
+#if !defined(_RRD_TOOL_H) && !defined(RRD_EXPORT_DEPRECATED)
+# error "Do not include rrd_format.h directly. Include rrd.h instead!"
+#endif
+
 #include "rrd.h"
 
 /*****************************************************************************
@@ -23,7 +35,7 @@
 /* changed because microsecond precision requires another field */
 #define RRD_VERSION   "0004"
 #define RRD_VERSION3  "0003"
-#define FLOAT_COOKIE  8.642135E130
+#define FLOAT_COOKIE  ((double)8.642135E130)
 
 typedef union unival {
     unsigned long u_cnt;
@@ -233,7 +245,7 @@ enum rra_par_en { RRA_cdp_xff_val = 0,  /* what part of the consolidated
     RRA_delta_neg = 2,
     /* RRA_dependent_rra_idx = 3, */
     RRA_window_len = 4,
-    RRA_failure_threshold = 5,
+    RRA_failure_threshold = 5
     /* For CF_FAILURES, number of violations within the last
      * window required to mark a failure. */
 };