summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xext/date/config.w321
-rw-r--r--ext/date/lib/timelib_structs.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/ext/date/config.w32 b/ext/date/config.w32
index 5f5f08781d..4e7c4bbe80 100755
--- a/ext/date/config.w32
+++ b/ext/date/config.w32
@@ -12,6 +12,7 @@ tl_config.WriteLine("#include \"config.w32.h\"");
tl_config.WriteLine("#include <php_stdint.h>");
tl_config.WriteLine("#include \"win32/php_inttypes.h\"");
tl_config.WriteLine("#define TIMELIB_OMIT_STDINT 1");
+tl_config.WriteLine("#define TIMELIB_FORCE_LONG32 1");
tl_config.Close();
PHP_INSTALL_HEADERS("ext/date/", "php_date.h lib/timelib.h lib/timelib_structs.h lib/timelib_config.h");
diff --git a/ext/date/lib/timelib_structs.h b/ext/date/lib/timelib_structs.h
index d38175753a..91fcac9119 100644
--- a/ext/date/lib/timelib_structs.h
+++ b/ext/date/lib/timelib_structs.h
@@ -125,7 +125,7 @@ typedef unsigned __int64 uint64_t;
#include <strings.h>
#endif
-#if defined(__x86_64__) || defined(__LP64__) || defined(_LP64) || defined(_WIN64)
+#if (defined(__x86_64__) || defined(__LP64__) || defined(_LP64) || defined(_WIN64)) && !defined(TIMELIB_FORCE_LONG32)
typedef int64_t timelib_long;
typedef uint64_t timelib_ulong;
# define TIMELIB_LONG_MAX INT64_MAX