summaryrefslogtreecommitdiff
path: root/ext/pcre
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2010-08-14 14:47:49 +0000
committerIlia Alshanetsky <iliaa@php.net>2010-08-14 14:47:49 +0000
commitbbeafa1dcfba4674fd2ec56b061d15c08738dd10 (patch)
tree76d0c7195d53efd58e6fdd7eeef0e23012e4381b /ext/pcre
parent842bc947e2116fe379cf16ef06fd87b445253dfa (diff)
downloadphp-git-bbeafa1dcfba4674fd2ec56b061d15c08738dd10.tar.gz
Win32 build fixes
Diffstat (limited to 'ext/pcre')
-rw-r--r--ext/pcre/pcrelib/config.h10
-rw-r--r--ext/pcre/pcrelib/pcre_internal.h4
2 files changed, 13 insertions, 1 deletions
diff --git a/ext/pcre/pcrelib/config.h b/ext/pcre/pcrelib/config.h
index a3d7e8dae3..43bfa44053 100644
--- a/ext/pcre/pcrelib/config.h
+++ b/ext/pcre/pcrelib/config.h
@@ -1,5 +1,10 @@
#include <php_compat.h>
+
+#ifndef PHP_WIN32
+# include <php_config.h>
+#endif
+
#undef PACKAGE_NAME
#undef PACKAGE_VERSION
#undef PACKAGE_TARNAME
@@ -18,6 +23,8 @@
# define PCRE_EXP_DATA_DEFN __attribute__ ((visibility("default")))
#endif
+/* Exclude these below definitions when building within PHP */
+#ifndef ZEND_API
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
@@ -189,6 +196,9 @@ them both to 0; an emulation function will be used. */
/* Define to 1 if you have `_strtoi64'. */
/* #undef HAVE__STRTOI64 */
+/* Exclude these above definitions when building within PHP */
+#endif
+
/* The value of LINK_SIZE determines the number of bytes used to store links
as offsets within the compiled regex. The default is 2, which allows for
compiled patterns up to 64K long. This covers the vast majority of cases.
diff --git a/ext/pcre/pcrelib/pcre_internal.h b/ext/pcre/pcrelib/pcre_internal.h
index e293602fe6..039a140945 100644
--- a/ext/pcre/pcrelib/pcre_internal.h
+++ b/ext/pcre/pcrelib/pcre_internal.h
@@ -192,7 +192,9 @@ stdint.h is available, include it; it may define INT64_MAX. Systems that do not
have stdint.h (e.g. Solaris) may have inttypes.h. The macro int64_t may be set
by "configure". */
-#if HAVE_STDINT_H
+#ifdef PHP_WIN32
+#include "win32/php_stdint.h"
+#elif HAVE_STDINT_H
#include <stdint.h>
#elif HAVE_INTTYPES_H
#include <inttypes.h>