From 8e9e33ae52b7b17d57c9fc8694e2f77fab11ae03 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 7 Mar 2008 02:49:14 +0000 Subject: [PATCH] VS2005 and later dafault size for time_t is 64-bit, unless _USE_32BIT_TIME_T has been defined to get a 32-bit time_t --- lib/config-win32.h | 10 ++++++++++ lib/config-win32ce.h | 10 ++++++++++ src/config-win32.h | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/lib/config-win32.h b/lib/config-win32.h index 8e57b1454..031eda54a 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -353,6 +353,16 @@ #define _CRT_NONSTDC_NO_DEPRECATE 1 #endif +/* VS2005 and later dafault size for time_t is 64-bit, unless */ +/* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */ +#if defined(_MSC_VER) && (_MSC_VER >= 1400) +# ifndef _USE_32BIT_TIME_T +# define SIZEOF_TIME_T 8 +# else +# define SIZEOF_TIME_T 4 +# endif +#endif + /* VS2008 does not support Windows build targets prior to WinXP, */ /* so, if no build target has been defined we will target WinXP. */ #if defined(_MSC_VER) && (_MSC_VER >= 1500) diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h index 7531d4b1f..6c0fb411f 100644 --- a/lib/config-win32ce.h +++ b/lib/config-win32ce.h @@ -314,6 +314,16 @@ #define _CRT_NONSTDC_NO_DEPRECATE 1 #endif +/* VS2005 and later dafault size for time_t is 64-bit, unless */ +/* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */ +#if defined(_MSC_VER) && (_MSC_VER >= 1400) +# ifndef _USE_32BIT_TIME_T +# define SIZEOF_TIME_T 8 +# else +# define SIZEOF_TIME_T 4 +# endif +#endif + /* ---------------------------------------------------------------- */ /* LDAP SUPPORT */ /* ---------------------------------------------------------------- */ diff --git a/src/config-win32.h b/src/config-win32.h index e6c42e501..6aaac0032 100644 --- a/src/config-win32.h +++ b/src/config-win32.h @@ -187,6 +187,16 @@ #define _CRT_NONSTDC_NO_DEPRECATE 1 #endif +/* VS2005 and later dafault size for time_t is 64-bit, unless */ +/* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */ +#if defined(_MSC_VER) && (_MSC_VER >= 1400) +# ifndef _USE_32BIT_TIME_T +# define SIZEOF_TIME_T 8 +# else +# define SIZEOF_TIME_T 4 +# endif +#endif + /* VS2008 does not support Windows build targets prior to WinXP, */ /* so, if no build target has been defined we will target WinXP. */ #if defined(_MSC_VER) && (_MSC_VER >= 1500)