]> granicus.if.org Git - php/commitdiff
make timelib use PHP's defines when it's inside PHP only
authorAnatol Belski <ab@php.net>
Wed, 21 Jan 2015 09:49:28 +0000 (10:49 +0100)
committerAnatol Belski <ab@php.net>
Wed, 21 Jan 2015 09:49:28 +0000 (10:49 +0100)
otherwise system defines will be used

ext/date/config.w32
ext/date/config0.m4
ext/date/lib/timelib_structs.h

index 64a4ae92a1c45ec1791f2754a2a82f2e86553f6a..62f0abd9c3e07932a4af0f492f6c03519a1cd181 100755 (executable)
@@ -9,6 +9,8 @@ ADD_FLAG('CFLAGS_DATE', "/wd4244");
 
 var tl_config = FSO.CreateTextFile("ext/date/lib/timelib_config.h", true);
 tl_config.WriteLine("#include \"config.w32.h\"");
+tl_config.WriteLine("#include <php_stdint.h>");
+tl_config.WriteLine("#define TIMELIB_OMIT_STDINT 1");
 tl_config.Close();
 
 PHP_INSTALL_HEADERS("ext/date/", "php_date.h lib/timelib.h lib/timelib_structs.h lib/timelib_config.h");
index 867e891f52a8646698476a1328e597a220bce3ae..0423f61de0a23c642c1fae765faed92484c04e17 100644 (file)
@@ -23,4 +23,5 @@ cat > $ext_builddir/lib/timelib_config.h <<EOF
 # include <php_config.h>
 #endif
 #include <php_stdint.h>
+#define TIMELIB_OMIT_STDINT 1
 EOF
index e86dda581bc7edf1e68f401dcb9b16b36ddd243c..6d8aa028d52ac16dabcd41733116c50a98646428 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "timelib_config.h"
 
+#ifndef TIMELIB_OMIT_STDINT
+
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -103,6 +105,8 @@ typedef unsigned __int64  uint64_t;
 # endif
 #endif
 
+#endif /* TIMELIB_OMIT_STDINT */
+
 #include <stdio.h>
 
 #ifdef HAVE_STDLIB_H