summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-05-18 23:38:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:13 -0500
commitc15c0f2a47caa61f0575a63d88d1481d34530643 (patch)
tree13bab67e3f2debc8f4d7219e9f1336e37d749b42 /source3/configure.in
parent5217cff98570127422e87488f1115a3019aadc8f (diff)
downloadsamba-c15c0f2a47caa61f0575a63d88d1481d34530643.tar.gz
samba-c15c0f2a47caa61f0575a63d88d1481d34530643.tar.bz2
samba-c15c0f2a47caa61f0575a63d88d1481d34530643.zip
r23005: If we're running on a system where time_t is 8 bytes
we have to take care to preserve the "special" values for Windows of 0x80000000 and 0x7FFFFFFF when casting between time_t and uint32. Add conversion functions (and use them). Jeremy. (This used to be commit 4e1a0b2549f7c11326deed2801de19564af0f16a)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index c940c8c3d9..31907c54e1 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2079,6 +2079,14 @@ if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
fi
+AC_CACHE_CHECK([for 64 bit time_t],samba_cv_SIZEOF_TIME_T,[
+AC_TRY_RUN([#include <time.h>
+main() { exit((sizeof(time_t) == 8) ? 0 : 1); }],
+samba_cv_SIZEOF_TIME_T=yes,samba_cv_SIZEOF_TIME_T=no,samba_cv_SIZEOF_TIME_T=cross)])
+if test x"$samba_cv_SIZEOF_TIME_T" = x"yes"; then
+ AC_DEFINE(SIZEOF_TIME_T,8,[The size of the 'time_t' type])
+fi
+
AC_CACHE_CHECK([for 64 bit off_t],samba_cv_SIZEOF_OFF_T,[
AC_TRY_RUN([#include <stdio.h>
#include <sys/stat.h>