com php-src: make timelib use PHP's defines when it's inside PHP only: ext/date/config.w32 ext/date/config0.m4 ext/date/lib/timelib_ structs.h
| From: | Anatol Belski | Date: | Wed, 21 Jan 2015 09:49:28 +0000 |
| Subject: | com php-src: make timelib use PHP's defines when it's inside PHP only: ext/date/config.w32 ext/date/config0.m4 ext/date/lib/timelib_ structs.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84270@lists.php.net to get a copy of this message | ||
Commit: 8faadc22d17955fe0094144836da87cb5a1ae105
Author: Anatol Belski <ab@php.net> Wed, 21 Jan 2015 10:49:28 +0100
Parents: 2f8d40ca79224900af6e93c8763412204bbfb8fd
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8faadc22d17955fe0094144836da87cb5a1ae105
Log:
make timelib use PHP's defines when it's inside PHP only
otherwise system defines will be used
Changed paths:
M ext/date/config.w32
M ext/date/config0.m4
M ext/date/lib/timelib_structs.h
Diff:
diff --git a/ext/date/config.w32 b/ext/date/config.w32
index 64a4ae9..62f0abd 100755
--- a/ext/date/config.w32
+++ b/ext/date/config.w32
@@ -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");
diff --git a/ext/date/config0.m4 b/ext/date/config0.m4
index 867e891..0423f61 100644
--- a/ext/date/config0.m4
+++ b/ext/date/config0.m4
@@ -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
diff --git a/ext/date/lib/timelib_structs.h b/ext/date/lib/timelib_structs.h
index e86dda5..6d8aa02 100644
--- a/ext/date/lib/timelib_structs.h
+++ b/ext/date/lib/timelib_structs.h
@@ -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