From a6fc0fa1cf5e60a0619993adfc8e4eedcebe4b96 Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 11 Jan 2010 09:49:44 +0000 Subject: [PATCH] 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 --- configure.ac | 4 ++-- src/rrd_restore.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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); -- 2.30.2