X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_update.c;h=95e927163e280aa23b3ea8b899354537bbb8adef;hp=8fd951da6063bd1f57d8870bb084a5593643e3d6;hb=0dc5d6d50c0d95ba4f04b656358b26518d4ce854;hpb=37329a5f991870e8f47c8a52f6dd594fef813de6 diff --git a/src/rrd_update.c b/src/rrd_update.c index 8fd951d..95e9271 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.6 Copyright by Tobi Oetiker, 1997-2005 + * RRDtool 1.2.9 Copyright by Tobi Oetiker, 1997-2005 ***************************************************************************** * rrd_update.c RRD Update Function ***************************************************************************** @@ -13,7 +13,7 @@ #include #endif -#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) #include #include #include @@ -25,7 +25,7 @@ #include "rrd_is_thread_safe.h" #include "unused.h" -#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) /* * WIN32 does not have gettimeofday and struct timeval. This is a quick and dirty * replacement. @@ -95,7 +95,7 @@ int main(int argc, char **argv){ rrd_update(argc,argv); if (rrd_test_error()) { - printf("RRDtool 1.2.6 Copyright by Tobi Oetiker, 1997-2005\n\n" + printf("RRDtool " PACKAGE_VERSION " Copyright by Tobi Oetiker, 1997-2005\n\n" "Usage: rrdupdate filename\n" "\t\t\t[--template|-t ds-name:ds-name:...]\n" "\t\t\ttime|N:value[:value...]\n\n" @@ -252,9 +252,9 @@ _rrd_update(char *filename, char *template, int argc, char **argv, FILE *rrd_file; rrd_t rrd; - time_t current_time; - time_t rra_time; /* time of update for a RRA */ - unsigned long current_time_usec; /* microseconds part of current time */ + time_t current_time = 0; + time_t rra_time = 0; /* time of update for a RRA */ + unsigned long current_time_usec=0;/* microseconds part of current time */ struct timeval tmp_time; /* used for time conversion */ char **updvals; @@ -1433,7 +1433,7 @@ LockRRD(FILE *rrdfile) rrd_fd = fileno(rrdfile); { -#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) struct _stat st; if ( _fstat( rrd_fd, &st ) == 0 ) {