we are using a comparison with sizeof(long) to figure the size of time_t this is...
[rrdtool.git] / configure.ac
index b90e189..a4e9383 100644 (file)
@@ -459,26 +459,26 @@ AC_LINK_IFELSE(
     ]  
 )
 
-dnl is time_t long or long long ?
-AC_DEFINE([TIME_T_IS_LONG], [], [time_t is long])
-AC_DEFINE([TIME_T_IS_LONG_LONG], [], [time_t is long long])
+dnl is time_t 32 of 64 bit ?
+AC_DEFINE([TIME_T_IS_32BIT], [], [time_t is 32bit])
+AC_DEFINE([TIME_T_IS_64BIT], [], [time_t is 64bit])
 AC_MSG_CHECKING([the type of time_t])
 AC_RUN_IFELSE(
     AC_LANG_PROGRAM(
         [[#include <time.h>]],
-        [[if (sizeof(long) != sizeof(time_t)) return 1; ]]
+        [[if (sizeof(time_t) != 32) return 1; ]]
         ),
-    [ AC_MSG_RESULT([time_t is long])
-      AC_DEFINE([TIME_T_IS_LONG])
+    [ AC_MSG_RESULT([time_t is 32 bit])
+      AC_DEFINE([TIME_T_IS_32BIT])
     ],
     [ AC_RUN_IFELSE(
         AC_LANG_PROGRAM(
         [[#include <time.h>]],
-        [[if (sizeof(long long) != sizeof(time_t)) return 1; ]]
+        [[if (sizeof(time_t) != 64) return 1; ]]
         ),
         [
-          AC_MSG_RESULT([time_t is long long])
-          AC_DEFINE([TIME_T_IS_LONG_LONG])
+          AC_MSG_RESULT([time_t is 64 bit])
+          AC_DEFINE([TIME_T_IS_64BIT])
         ],
         [AC_MSG_ERROR([can not figure type of time_t])]
       )