From 0b622dc513d658dcb2e2a4055c17accb5c144b47 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@1999 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/configure.ac | 4 ++-- program/src/rrd_restore.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/program/configure.ac b/program/configure.ac index a4e9383c..235625c9 100644 --- a/program/configure.ac +++ b/program/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/program/src/rrd_restore.c b/program/src/rrd_restore.c index 8cde6f1f..e1de2870 100644 --- a/program/src/rrd_restore.c +++ b/program/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