Code

prepare for the release of rrdtool-1.3.8
[rrdtool-all.git] / program / src / rrd_update.c
index d7ee4ac798ff612db5feb8cca78901826b13600e..1ae36f9cc32241d03a9cdc08dccfe48dd010107b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*****************************************************************************
- * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
+ * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
  *****************************************************************************
  * rrd_update.c  RRD Update Function
  *****************************************************************************
 
 #include <locale.h>
 
+#ifdef WIN32
+#include <stdlib.h>
+#endif
+
 #include "rrd_hw.h"
 #include "rrd_rpncalc.h"
 
@@ -1496,7 +1500,7 @@ static int update_cdp_prep(
             if (elapsed_pdp_st > 2) {
                 reset_cdp(rrd, elapsed_pdp_st, pdp_temp, last_seasonal_coef,
                           seasonal_coef, rra_idx, ds_idx, cdp_idx,
-                          current_cf);
+                          (enum cf_en)current_cf);
             }
         }
 
@@ -1939,7 +1943,7 @@ static int write_RRA_row(
             /* append info to the return hash */
             *pcdp_summary = rrd_info_push(*pcdp_summary,
                                           sprintf_alloc
-                                          ("[%d]RRA[%s][%lu]DS[%s]", rra_time,
+                                          ("[%lli]RRA[%s][%lu]DS[%s]", (long long)rra_time,
                                            rrd->rra_def[rra_idx].cf_nam,
                                            rrd->rra_def[rra_idx].pdp_cnt,
                                            rrd->ds_def[ds_idx].ds_nam),