]>
Commit | Line | Data |
---|---|---|
59609f89 JR |
1 | diff -urNp -x '*.orig' php-7.0.33.org/ext/pcre/config0.m4 php-7.0.33/ext/pcre/config0.m4 |
2 | --- php-7.0.33.org/ext/pcre/config0.m4 2018-12-04 18:22:58.000000000 +0100 | |
3 | +++ php-7.0.33/ext/pcre/config0.m4 2021-08-23 23:36:40.675466313 +0200 | |
4 | @@ -11,7 +11,7 @@ PHP_ARG_WITH(pcre-regex,, | |
c0240cb1 | 5 | |
6 | if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then | |
7 | AC_MSG_CHECKING([for PCRE headers location]) | |
8 | - for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include; do | |
9 | + for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include /usr/include; do | |
10 | test -f $i/pcre.h && PCRE_INCDIR=$i | |
11 | done | |
12 | ||
59609f89 | 13 | @@ -21,7 +21,7 @@ PHP_ARG_WITH(pcre-regex,, |
c0240cb1 | 14 | AC_MSG_RESULT([$PCRE_INCDIR]) |
15 | ||
16 | AC_MSG_CHECKING([for PCRE library location]) | |
17 | - for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do | |
18 | + for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR /usr/$PHP_LIBDIR; do | |
19 | test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j | |
20 | done | |
21 | ||
59609f89 | 22 | @@ -43,12 +43,13 @@ PHP_ARG_WITH(pcre-regex,, |
c0240cb1 | 23 | AC_MSG_ERROR([The PCRE extension requires PCRE library version >= 6.6]) |
24 | fi | |
25 | ||
26 | - PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR) | |
27 | + PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD) | |
28 | ||
29 | AC_DEFINE(HAVE_PCRE, 1, [ ]) | |
30 | PHP_ADD_INCLUDE($PCRE_INCDIR) | |
f4ee12ea ER |
31 | - PHP_NEW_EXTENSION(pcre, php_pcre.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) |
32 | + PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) | |
c0240cb1 | 33 | PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h]) |
34 | + EXTRA_LIBS="$EXTRA_LIBS -lpcre" | |
35 | else | |
36 | AC_MSG_CHECKING([for PCRE library to use]) | |
37 | AC_MSG_RESULT([bundled]) | |
59609f89 | 38 | @@ -61,7 +62,7 @@ PHP_ARG_WITH(pcre-regex,, |
f4ee12ea ER |
39 | pcrelib/pcre_version.c pcrelib/pcre_xclass.c \ |
40 | pcrelib/pcre_jit_compile.c" | |
41 | PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcrelib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" | |
553dd2f2 ER |
42 | - PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS) |
43 | + PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, $ext_shared,,$PHP_PCRE_CFLAGS) | |
c0240cb1 | 44 | PHP_ADD_BUILD_DIR($ext_builddir/pcrelib) |
45 | PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/]) | |
46 | AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ]) | |
59609f89 JR |
47 | diff -urNp -x '*.orig' php-7.0.33.org/ext/pcre/php_pcre.c php-7.0.33/ext/pcre/php_pcre.c |
48 | --- php-7.0.33.org/ext/pcre/php_pcre.c 2018-12-04 18:22:58.000000000 +0100 | |
49 | +++ php-7.0.33/ext/pcre/php_pcre.c 2021-08-23 23:36:40.675466313 +0200 | |
50 | @@ -28,6 +28,11 @@ | |
c0240cb1 | 51 | |
52 | #if HAVE_PCRE || HAVE_BUNDLED_PCRE | |
53 | ||
54 | +#if COMPILE_DL_PCRE | |
55 | +#undef pcre_get_compiled_regex | |
f4ee12ea | 56 | +PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *options); |
c0240cb1 | 57 | +#endif |
58 | + | |
59 | #include "ext/standard/php_string.h" | |
60 | ||
61 | #define PREG_PATTERN_ORDER 1 | |
59609f89 JR |
62 | @@ -202,6 +207,10 @@ static PHP_MINIT_FUNCTION(pcre) |
63 | REGISTER_LONG_CONSTANT("PREG_JIT_STACKLIMIT_ERROR", PHP_PCRE_JIT_STACKLIMIT_ERROR, CONST_CS | CONST_PERSISTENT); | |
c0240cb1 | 64 | REGISTER_STRING_CONSTANT("PCRE_VERSION", (char *)pcre_version(), CONST_CS | CONST_PERSISTENT); |
65 | ||
66 | +#if COMPILE_DL_PCRE | |
67 | + pcre_get_compiled_regex_p = pcre_get_compiled_regex; | |
68 | +#endif | |
69 | + | |
70 | return SUCCESS; | |
71 | } | |
72 | /* }}} */ | |
59609f89 | 73 | @@ -610,6 +619,7 @@ PHPAPI pcre_cache_entry* pcre_get_compil |
c0240cb1 | 74 | } |
75 | /* }}} */ | |
76 | ||
77 | + | |
78 | /* {{{ pcre_get_compiled_regex | |
79 | */ | |
59609f89 JR |
80 | PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *preg_options) |
81 | diff -urNp -x '*.orig' php-7.0.33.org/ext/pcre/php_pcre.h php-7.0.33/ext/pcre/php_pcre.h | |
82 | --- php-7.0.33.org/ext/pcre/php_pcre.h 2018-12-04 18:22:58.000000000 +0100 | |
83 | +++ php-7.0.33/ext/pcre/php_pcre.h 2021-08-23 23:36:40.675466313 +0200 | |
84 | @@ -34,7 +34,12 @@ | |
85 | #endif | |
86 | ||
87 | PHPAPI zend_string *php_pcre_replace(zend_string *regex, zend_string *subject_str, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int limit, int *replace_count); | |
88 | +#if COMPILE_DL_PCRE | |
89 | +#define pcre_get_compiled_regex pcre_get_compiled_regex_p | |
90 | +extern PHPAPI pcre* (*pcre_get_compiled_regex)(zend_string *regex, pcre_extra **extra, int *options); | |
91 | +#else | |
92 | PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *options); | |
93 | +#endif | |
94 | PHPAPI pcre* pcre_get_compiled_regex_ex(zend_string *regex, pcre_extra **extra, int *preg_options, int *coptions); | |
95 | ||
96 | extern zend_module_entry pcre_module_entry; | |
97 | diff -urNp -x '*.orig' php-7.0.33.org/ext/standard/browscap.c php-7.0.33/ext/standard/browscap.c | |
98 | --- php-7.0.33.org/ext/standard/browscap.c 2018-12-04 18:22:44.000000000 +0100 | |
99 | +++ php-7.0.33/ext/standard/browscap.c 2021-08-23 23:36:40.675466313 +0200 | |
100 | @@ -65,6 +65,11 @@ ZEND_END_MODULE_GLOBALS(browscap) | |
101 | ZEND_DECLARE_MODULE_GLOBALS(browscap) | |
102 | #define BROWSCAP_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(browscap, v) | |
c0240cb1 | 103 | |
104 | +#if COMPILE_DL_PCRE | |
105 | +// will be visible in here | |
f4ee12ea | 106 | +PHPAPI pcre* (*pcre_get_compiled_regex_p)(zend_string *regex, pcre_extra **extra, int *options); |
c0240cb1 | 107 | +#endif |
108 | + | |
109 | #define DEFAULT_SECTION_NAME "Default Browser Capability Settings" | |
110 | ||
111 | /* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */ | |
59609f89 JR |
112 | diff -urNp -x '*.orig' php-7.0.33.org/main/php_ini.c php-7.0.33/main/php_ini.c |
113 | --- php-7.0.33.org/main/php_ini.c 2021-08-23 23:36:39.715453953 +0200 | |
114 | +++ php-7.0.33/main/php_ini.c 2021-08-23 23:36:40.675466313 +0200 | |
115 | @@ -771,8 +771,8 @@ int php_shutdown_config(void) | |
5dde8673 ER |
116 | */ |
117 | void php_ini_register_extensions(void) | |
118 | { | |
119 | - zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb); | |
120 | zend_llist_apply(&extension_lists.functions, php_load_php_extension_cb); | |
121 | + zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb); | |
122 | ||
123 | zend_llist_destroy(&extension_lists.engine); | |
124 | zend_llist_destroy(&extension_lists.functions); | |
59609f89 JR |
125 | diff -urNp -x '*.orig' php-7.0.33.org/sapi/cli/tests/018.phpt php-7.0.33/sapi/cli/tests/018.phpt |
126 | --- php-7.0.33.org/sapi/cli/tests/018.phpt 2018-12-04 18:23:02.000000000 +0100 | |
127 | +++ php-7.0.33/sapi/cli/tests/018.phpt 2021-08-23 23:36:40.675466313 +0200 | |
128 | @@ -20,8 +20,6 @@ echo "Done\n"; | |
129 | --EXPECTF-- | |
130 | [PHP Modules] | |
131 | %a | |
132 | -pcre | |
133 | -%a | |
134 | ||
135 | [Zend Modules] | |
136 | %aDone |