---- php-5.5.0alpha6/ext/pcre/config0.m4~ 2013-03-19 18:08:15.000000000 +0200
-+++ php-5.5.0alpha6/ext/pcre/config0.m4 2013-03-19 18:09:26.732804962 +0200
-@@ -11,7 +11,7 @@
+diff -urN php-7.2.25.orig/ext/pcre/config0.m4 php-7.2.25/ext/pcre/config0.m4
+--- php-7.2.25.orig/ext/pcre/config0.m4 2019-12-12 23:55:51.061000000 +0100
++++ php-7.2.25/ext/pcre/config0.m4 2019-12-12 23:56:02.320000000 +0100
+@@ -13,7 +13,7 @@
if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
AC_MSG_CHECKING([for PCRE headers location])
test -f $i/pcre.h && PCRE_INCDIR=$i
done
-@@ -21,7 +21,7 @@
+@@ -23,7 +23,7 @@
AC_MSG_RESULT([$PCRE_INCDIR])
AC_MSG_CHECKING([for PCRE library location])
+ for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR /usr/$PHP_LIBDIR; do
test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
done
-
-@@ -43,12 +43,13 @@
- AC_MSG_ERROR([The PCRE extension requires PCRE library version >= 6.6])
- fi
+@@ -52,12 +52,13 @@
+ ],[
+ -L$PCRE_LIBDIR
+ ])
- PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR)
+ PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD)
-
+
AC_DEFINE(HAVE_PCRE, 1, [ ])
PHP_ADD_INCLUDE($PCRE_INCDIR)
-- PHP_NEW_EXTENSION(pcre, php_pcre.c, no)
-+ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared)
+- PHP_NEW_EXTENSION(pcre, php_pcre.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
++ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h])
+ EXTRA_LIBS="$EXTRA_LIBS -lpcre"
else
AC_MSG_CHECKING([for PCRE library to use])
AC_MSG_RESULT([bundled])
-@@ -61,7 +61,7 @@
- pcrelib/pcre_tables.c pcrelib/pcre_valid_utf8.c \
- pcrelib/pcre_version.c pcrelib/pcre_xclass.c"
- PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcrelib"
+@@ -70,7 +71,7 @@
+ pcrelib/pcre_version.c pcrelib/pcre_xclass.c \
+ pcrelib/pcre_jit_compile.c"
+ PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcrelib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
- PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS)
+ PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, $ext_shared,,$PHP_PCRE_CFLAGS)
PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/])
AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
---- php-5.3.1/ext/pcre/php_pcre.h 2009-11-30 20:59:04.046581246 +0200
-+++ php-5.3.1.pcre/ext/pcre/php_pcre.h 2009-11-30 21:38:06.435493243 +0000
-@@ -34,7 +34,12 @@
- #endif
-
- PHPAPI char *php_pcre_replace(char *regex, int regex_len, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int *result_len, int limit, int *replace_count TSRMLS_DC);
-+#if COMPILE_DL_PCRE
-+#define pcre_get_compiled_regex pcre_get_compiled_regex_p
-+extern PHPAPI pcre* (*pcre_get_compiled_regex)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
-+#else
- PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
-+#endif
- PHPAPI pcre* pcre_get_compiled_regex_ex(char *regex, pcre_extra **extra, int *preg_options, int *coptions TSRMLS_DC);
-
- extern zend_module_entry pcre_module_entry;
---- php-5.3.1/ext/pcre/php_pcre.c 2009-11-30 21:10:01.370473754 +0200
-+++ php-5.3.1.pcre/ext/pcre/php_pcre.c 2009-11-30 21:38:01.759684456 +0000
-@@ -27,6 +27,11 @@
-
- #if HAVE_PCRE || HAVE_BUNDLED_PCRE
-
+diff -urN php-7.2.25.orig/ext/pcre/php_pcre.c php-7.2.25/ext/pcre/php_pcre.c
+--- php-7.2.25.orig/ext/pcre/php_pcre.c 2019-12-12 23:55:51.061000000 +0100
++++ php-7.2.25/ext/pcre/php_pcre.c 2019-12-12 23:56:02.320000000 +0100
+@@ -21,6 +21,9 @@
+ #include "php.h"
+ #include "php_ini.h"
+ #include "php_globals.h"
+#if COMPILE_DL_PCRE
-+#undef pcre_get_compiled_regex
-+PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC);
++#define COMPILE_DL_PCRE_NOREDIRECT
+#endif
-+
- #include "ext/standard/php_string.h"
-
- #define PREG_PATTERN_ORDER 1
-@@ -153,6 +158,10 @@
- REGISTER_LONG_CONSTANT("PREG_BAD_UTF8_OFFSET_ERROR", PHP_PCRE_BAD_UTF8_OFFSET_ERROR, CONST_CS | CONST_PERSISTENT);
+ #include "php_pcre.h"
+ #include "ext/standard/info.h"
+ #include "ext/standard/basic_functions.h"
+@@ -222,6 +225,14 @@
+ REGISTER_LONG_CONSTANT("PREG_JIT_STACKLIMIT_ERROR", PHP_PCRE_JIT_STACKLIMIT_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("PCRE_VERSION", (char *)pcre_version(), CONST_CS | CONST_PERSISTENT);
+#if COMPILE_DL_PCRE
+ pcre_get_compiled_regex_p = pcre_get_compiled_regex;
++ pcre_get_compiled_regex_cache_p = pcre_get_compiled_regex_cache;
++ php_pcre_replace_impl_p = php_pcre_replace_impl;
++ php_pcre_match_impl_p = php_pcre_match_impl;
++ php_pcre_split_impl_p = php_pcre_split_impl;
+#endif
+
return SUCCESS;
}
/* }}} */
-@@ -429,6 +438,7 @@
- }
- /* }}} */
+diff -urN php-7.2.25.orig/ext/pcre/php_pcre.h php-7.2.25/ext/pcre/php_pcre.h
+--- php-7.2.25.orig/ext/pcre/php_pcre.h 2019-12-12 23:55:51.061000000 +0100
++++ php-7.2.25/ext/pcre/php_pcre.h 2019-12-12 23:56:56.743000000 +0100
+@@ -33,7 +33,29 @@
+ #include <locale.h>
+ #endif
++#if !defined(COMPILE_DL_PCRE_NOREDIRECT)
++#define pcre_get_compiled_regex (*pcre_get_compiled_regex_p)
++#define pcre_get_compiled_regex_cache (*pcre_get_compiled_regex_cache_p)
++#define php_pcre_replace_impl (*php_pcre_replace_impl_p)
++#define php_pcre_match_impl (*php_pcre_match_impl_p)
++#define php_pcre_split_impl (*php_pcre_split_impl_p)
++#if !defined(COMPILE_DL_PCRE_NOEXTERN)
++# define PCRE_EXTERN extern
++#else
++# define PCRE_EXTERN
++#endif
++#else
++// for pcre.c
++#define PCRE_EXTERN
++extern void *pcre_get_compiled_regex_p;
++extern void *pcre_get_compiled_regex_cache_p;
++extern void *php_pcre_replace_impl_p;
++extern void *php_pcre_match_impl_p;
++extern void *php_pcre_split_impl_p;
++#endif
+
- /* {{{ pcre_get_compiled_regex
- */
- PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC)
---- php-5.3.1/ext/standard/browscap.c 2009-06-06 02:40:49.000000000 +0000
-+++ php-5.3.1.pcre/ext/standard/browscap.c 2009-11-30 21:33:00.775241138 +0000
-@@ -31,6 +31,11 @@
- static zval *current_section;
- static char *current_section_name;
+ PHPAPI zend_string *php_pcre_replace(zend_string *regex, zend_string *subject_str, char *subject, int subject_len, zend_string *replace_str, int limit, int *replace_count);
++PCRE_EXTERN
+ PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *options);
+ PHPAPI pcre* pcre_get_compiled_regex_ex(zend_string *regex, pcre_extra **extra, int *preg_options, int *coptions);
+
+@@ -56,15 +78,19 @@
+ int refcount;
+ } pcre_cache_entry;
+
++PCRE_EXTERN
+ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex);
+ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, int locale_aware);
+
++PCRE_EXTERN
+ PHPAPI void php_pcre_match_impl( pcre_cache_entry *pce, char *subject, int subject_len, zval *return_value,
+ zval *subpats, int global, int use_flags, zend_long flags, zend_long start_offset);
+
++PCRE_EXTERN
+ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *subject_str, char *subject, int subject_len, zend_string *replace_str,
+ int limit, int *replace_count);
+
++PCRE_EXTERN
+ PHPAPI void php_pcre_split_impl( pcre_cache_entry *pce, zend_string *subject_str, zval *return_value,
+ zend_long limit_val, zend_long flags);
+
+diff -urN php-7.2.25.orig/ext/phar/Makefile.frag php-7.2.25/ext/phar/Makefile.frag
+--- php-7.2.25.orig/ext/phar/Makefile.frag 2019-12-12 23:55:51.636000000 +0100
++++ php-7.2.25/ext/phar/Makefile.frag 2019-12-12 23:56:02.320000000 +0100
+@@ -14,7 +14,7 @@
+ $(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
+ if test "x$(PHP_MODULES)" != "x"; then \
+ $(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
+- for i in spl bz2 zlib phar; do \
++ for i in pcre spl bz2 zlib phar; do \
+ if test -f "$(top_builddir)/modules/$$i.la"; then \
+ . $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
+ fi; \
+diff -urN php-7.2.25.orig/ext/standard/basic_functions.c php-7.2.25/ext/standard/basic_functions.c
+--- php-7.2.25.orig/ext/standard/basic_functions.c 2019-12-12 23:55:51.046000000 +0100
++++ php-7.2.25/ext/standard/basic_functions.c 2019-12-12 23:56:02.321000000 +0100
+@@ -113,6 +113,15 @@
+ PHPAPI php_basic_globals basic_globals;
+ #endif
+#if COMPILE_DL_PCRE
-+// will be visible in here
-+PHPAPI pcre* (*pcre_get_compiled_regex_p)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
++// for pcre shared patch symbol
++void *pcre_get_compiled_regex_p;
++void *pcre_get_compiled_regex_cache_p;
++void *php_pcre_replace_impl_p;
++void *php_pcre_match_impl_p;
++void *php_pcre_split_impl_p;
+#endif
+
- #define DEFAULT_SECTION_NAME "Default Browser Capability Settings"
+ #include "php_fopen_wrappers.h"
+ #include "streamsfuncs.h"
+
+diff -urN php-7.2.25.orig/main/php_ini.c php-7.2.25/main/php_ini.c
+--- php-7.2.25.orig/main/php_ini.c 2019-12-12 23:55:50.942000000 +0100
++++ php-7.2.25/main/php_ini.c 2019-12-12 23:56:02.322000000 +0100
+@@ -809,8 +809,8 @@
+ */
+ void php_ini_register_extensions(void)
+ {
+- zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb);
+ zend_llist_apply(&extension_lists.functions, php_load_php_extension_cb);
++ zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb);
- /* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */
---- php-5.3.2/sapi/cli/tests/018.phpt~ 2008-03-17 16:05:39.000000000 +0200
-+++ php-5.3.2/sapi/cli/tests/018.phpt 2010-03-16 20:41:11.341251246 +0200
+ zend_llist_destroy(&extension_lists.engine);
+ zend_llist_destroy(&extension_lists.functions);
+diff -urN php-7.2.25.orig/sapi/cli/tests/018.phpt php-7.2.25/sapi/cli/tests/018.phpt
+--- php-7.2.25.orig/sapi/cli/tests/018.phpt 2019-12-12 23:55:50.890000000 +0100
++++ php-7.2.25/sapi/cli/tests/018.phpt 2019-12-12 23:56:02.405000000 +0100
@@ -20,8 +20,6 @@
- --EXPECTF--
+ --EXPECTF--
[PHP Modules]
%a
-pcre