From: oetiker Date: Mon, 11 Jan 2010 09:49:44 +0000 (+0000) Subject: sizeof(time_t) is 4 byte not 32 bit ... X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=commitdiff_plain;h=a6fc0fa1cf5e60a0619993adfc8e4eedcebe4b96 sizeof(time_t) is 4 byte not 32 bit ... git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1999 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/configure.ac b/configure.ac index a4e9383..235625c 100644 --- a/configure.ac +++ b/configure.ac @@ -466,7 +466,7 @@ AC_MSG_CHECKING([the type of time_t]) AC_RUN_IFELSE( AC_LANG_PROGRAM( [[#include ]], - [[if (sizeof(time_t) != 32) return 1; ]] + [[if (sizeof(time_t) != 4) return 1; ]] ), [ AC_MSG_RESULT([time_t is 32 bit]) AC_DEFINE([TIME_T_IS_32BIT]) @@ -474,7 +474,7 @@ AC_RUN_IFELSE( [ AC_RUN_IFELSE( AC_LANG_PROGRAM( [[#include ]], - [[if (sizeof(time_t) != 64) return 1; ]] + [[if (sizeof(time_t) != 8) return 1; ]] ), [ AC_MSG_RESULT([time_t is 64 bit]) diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 8cde6f1..e1de287 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -233,7 +233,7 @@ static int get_xml_time_t( #ifdef TIME_T_IS_64BIT temp = strtoll((char *)text,NULL, 0); #else - if (sizeof(time_t) == 32){ + if (sizeof(time_t) == 4){ temp = strtol((char *)text,NULL, 0); } else { temp = strtoll((char *)text,NULL, 0);