]>
Commit | Line | Data |
---|---|---|
f4ee12ea ER |
1 | --- php-7.0/ext/pcre/config0.m4~ 2015-05-24 14:39:04.000000000 +0300 |
2 | +++ php-7.0/ext/pcre/config0.m4 2015-05-24 14:53:49.980250297 +0300 | |
c0240cb1 | 3 | @@ -11,7 +11,7 @@ |
4 | ||
5 | if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then | |
6 | AC_MSG_CHECKING([for PCRE headers location]) | |
7 | - for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include; do | |
8 | + for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include /usr/include; do | |
9 | test -f $i/pcre.h && PCRE_INCDIR=$i | |
10 | done | |
11 | ||
12 | @@ -21,7 +21,7 @@ | |
13 | AC_MSG_RESULT([$PCRE_INCDIR]) | |
14 | ||
15 | AC_MSG_CHECKING([for PCRE library location]) | |
16 | - for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do | |
17 | + for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR /usr/$PHP_LIBDIR; do | |
18 | test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j | |
19 | done | |
20 | ||
21 | @@ -43,12 +43,13 @@ | |
22 | AC_MSG_ERROR([The PCRE extension requires PCRE library version >= 6.6]) | |
23 | fi | |
24 | ||
25 | - PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR) | |
26 | + PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD) | |
27 | ||
28 | AC_DEFINE(HAVE_PCRE, 1, [ ]) | |
29 | PHP_ADD_INCLUDE($PCRE_INCDIR) | |
f4ee12ea ER |
30 | - PHP_NEW_EXTENSION(pcre, php_pcre.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) |
31 | + PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) | |
c0240cb1 | 32 | PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h]) |
33 | + EXTRA_LIBS="$EXTRA_LIBS -lpcre" | |
34 | else | |
35 | AC_MSG_CHECKING([for PCRE library to use]) | |
36 | AC_MSG_RESULT([bundled]) | |
f4ee12ea ER |
37 | @@ -61,7 +62,7 @@ |
38 | pcrelib/pcre_version.c pcrelib/pcre_xclass.c \ | |
39 | pcrelib/pcre_jit_compile.c" | |
40 | PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcrelib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" | |
553dd2f2 ER |
41 | - PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS) |
42 | + PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, $ext_shared,,$PHP_PCRE_CFLAGS) | |
c0240cb1 | 43 | PHP_ADD_BUILD_DIR($ext_builddir/pcrelib) |
44 | PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/]) | |
45 | AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ]) | |
f389261f ER |
46 | --- php-7.2.0beta1/ext/pcre/php_pcre.h 2017-07-22 12:35:11.071146616 +0300 |
47 | +++ php-7.2.0beta1/ext/pcre/php_pcre.h 2017-07-22 12:41:01.858859537 +0300 | |
48 | @@ -33,7 +33,29 @@ | |
49 | #include <locale.h> | |
c0240cb1 | 50 | #endif |
51 | ||
f389261f ER |
52 | +#if !defined(COMPILE_DL_PCRE_NOREDIRECT) |
53 | +#define pcre_get_compiled_regex (*pcre_get_compiled_regex_p) | |
54 | +#define pcre_get_compiled_regex_cache (*pcre_get_compiled_regex_cache_p) | |
55 | +#define php_pcre_replace_impl (*php_pcre_replace_impl_p) | |
56 | +#define php_pcre_match_impl (*php_pcre_match_impl_p) | |
57 | +#define php_pcre_split_impl (*php_pcre_split_impl_p) | |
58 | +#if !defined(COMPILE_DL_PCRE_NOEXTERN) | |
59 | +# define PCRE_EXTERN extern | |
c0240cb1 | 60 | +#else |
f389261f | 61 | +# define PCRE_EXTERN |
c0240cb1 | 62 | +#endif |
f389261f ER |
63 | +#else |
64 | +// for pcre.c | |
65 | +#define PCRE_EXTERN | |
66 | +extern void *pcre_get_compiled_regex_p; | |
67 | +extern void *pcre_get_compiled_regex_cache_p; | |
68 | +extern void *php_pcre_replace_impl_p; | |
69 | +extern void *php_pcre_match_impl_p; | |
70 | +extern void *php_pcre_split_impl_p; | |
71 | +#endif | |
72 | + | |
73 | 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); | |
74 | +PCRE_EXTERN | |
75 | PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *options); | |
f4ee12ea | 76 | PHPAPI pcre* pcre_get_compiled_regex_ex(zend_string *regex, pcre_extra **extra, int *preg_options, int *coptions); |
c0240cb1 | 77 | |
f389261f ER |
78 | @@ -56,14 +78,18 @@ |
79 | int refcount; | |
80 | } pcre_cache_entry; | |
81 | ||
82 | +PCRE_EXTERN | |
83 | PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex); | |
84 | ||
85 | +PCRE_EXTERN | |
86 | PHPAPI void php_pcre_match_impl( pcre_cache_entry *pce, char *subject, int subject_len, zval *return_value, | |
87 | zval *subpats, int global, int use_flags, zend_long flags, zend_long start_offset); | |
88 | ||
89 | +PCRE_EXTERN | |
90 | PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *subject_str, char *subject, int subject_len, zend_string *replace_str, | |
91 | int limit, int *replace_count); | |
92 | ||
93 | +PCRE_EXTERN | |
94 | PHPAPI void php_pcre_split_impl( pcre_cache_entry *pce, zend_string *subject_str, zval *return_value, | |
95 | zend_long limit_val, zend_long flags); | |
96 | ||
97 | --- php-5.3.1.pcre/ext/pcre/php_pcre.c 2009-11-30 21:38:01.759684456 +0000 | |
98 | +++ php-7.2.0beta1/ext/pcre/php_pcre.c 2017-07-22 12:42:57.878062137 +0300 | |
99 | @@ -21,6 +21,9 @@ | |
100 | #include "php.h" | |
101 | #include "php_ini.h" | |
102 | #include "php_globals.h" | |
103 | +#if COMPILE_DL_PCRE | |
104 | +#define COMPILE_DL_PCRE_NOREDIRECT | |
105 | +#endif | |
106 | #include "php_pcre.h" | |
107 | #include "ext/standard/info.h" | |
108 | #include "ext/standard/basic_functions.h" | |
109 | @@ -28,6 +31,15 @@ | |
c0240cb1 | 110 | |
111 | #if HAVE_PCRE || HAVE_BUNDLED_PCRE | |
112 | ||
113 | +#if COMPILE_DL_PCRE | |
f389261f ER |
114 | +//extern void *pcre_get_compiled_regex_p; |
115 | +//extern void *pcre_get_compiled_regex_cache_p; | |
116 | +//extern void *php_pcre_replace_impl_p; | |
117 | +//extern void *php_pcre_match_impl_p; | |
118 | +//extern void *php_pcre_split_impl_p; | |
c0240cb1 | 119 | +#endif |
f389261f | 120 | + |
c0240cb1 | 121 | + |
122 | #include "ext/standard/php_string.h" | |
123 | ||
124 | #define PREG_PATTERN_ORDER 1 | |
f389261f ER |
125 | @@ -208,6 +220,14 @@ |
126 | REGISTER_LONG_CONSTANT("PREG_JIT_STACKLIMIT_ERROR", PHP_PCRE_JIT_STACKLIMIT_ERROR, CONST_CS | CONST_PERSISTENT); | |
c0240cb1 | 127 | REGISTER_STRING_CONSTANT("PCRE_VERSION", (char *)pcre_version(), CONST_CS | CONST_PERSISTENT); |
128 | ||
129 | +#if COMPILE_DL_PCRE | |
130 | + pcre_get_compiled_regex_p = pcre_get_compiled_regex; | |
f389261f ER |
131 | + pcre_get_compiled_regex_cache_p = pcre_get_compiled_regex_cache; |
132 | + php_pcre_replace_impl_p = php_pcre_replace_impl; | |
133 | + php_pcre_match_impl_p = php_pcre_match_impl; | |
134 | + php_pcre_split_impl_p = php_pcre_split_impl; | |
c0240cb1 | 135 | +#endif |
136 | + | |
137 | return SUCCESS; | |
138 | } | |
139 | /* }}} */ | |
c0240cb1 | 140 | --- php-5.3.1/ext/standard/browscap.c 2009-06-06 02:40:49.000000000 +0000 |
141 | +++ php-5.3.1.pcre/ext/standard/browscap.c 2009-11-30 21:33:00.775241138 +0000 | |
142 | @@ -31,6 +31,11 @@ | |
143 | static zval *current_section; | |
144 | static char *current_section_name; | |
145 | ||
146 | +#if COMPILE_DL_PCRE | |
147 | +// will be visible in here | |
f4ee12ea | 148 | +PHPAPI pcre* (*pcre_get_compiled_regex_p)(zend_string *regex, pcre_extra **extra, int *options); |
c0240cb1 | 149 | +#endif |
150 | + | |
151 | #define DEFAULT_SECTION_NAME "Default Browser Capability Settings" | |
152 | ||
153 | /* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */ | |
154 | --- php-5.3.2/sapi/cli/tests/018.phpt~ 2008-03-17 16:05:39.000000000 +0200 | |
155 | +++ php-5.3.2/sapi/cli/tests/018.phpt 2010-03-16 20:41:11.341251246 +0200 | |
156 | @@ -20,8 +20,6 @@ | |
157 | --EXPECTF-- | |
158 | [PHP Modules] | |
159 | %a | |
160 | -pcre | |
161 | -%a | |
162 | ||
163 | [Zend Modules] | |
164 | %aDone | |
5dde8673 ER |
165 | --- php-7.0.0beta3/main/php_ini.c~ 2015-08-26 18:50:15.000000000 +0300 |
166 | +++ php-7.0.0beta3/main/php_ini.c 2015-08-26 22:33:59.126957396 +0300 | |
167 | @@ -765,8 +765,8 @@ | |
168 | */ | |
169 | void php_ini_register_extensions(void) | |
170 | { | |
171 | - zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb); | |
172 | zend_llist_apply(&extension_lists.functions, php_load_php_extension_cb); | |
173 | + zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb); | |
174 | ||
175 | zend_llist_destroy(&extension_lists.engine); | |
176 | zend_llist_destroy(&extension_lists.functions); | |
736fd708 ER |
177 | --- php-5.3.1/ext/phar/Makefile.frag~ 2009-07-23 15:48:04.000000000 +0000 |
178 | +++ php-5.3.1/ext/phar/Makefile.frag 2009-11-30 16:10:29.687175948 +0000 | |
179 | @@ -10,7 +10,7 @@ | |
180 | $(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \ | |
181 | if test "x$(PHP_MODULES)" != "x"; then \ | |
182 | $(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \ | |
183 | - for i in spl bz2 zlib phar; do \ | |
184 | + for i in pcre spl bz2 zlib phar; do \ | |
185 | if test -f "$(top_builddir)/modules/$$i.la"; then \ | |
186 | . $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \ | |
187 | fi; \ | |
f389261f ER |
188 | --- php-7.2.0beta1/ext/spl/spl_iterators.h 2017-07-18 18:58:54.000000000 +0300 |
189 | +++ php-7.2.0beta1-pcre-shared/ext/spl/spl_iterators.h 2017-07-24 22:55:20.641679202 +0300 | |
190 | @@ -24,9 +24,15 @@ | |
191 | #include "php.h" | |
192 | #include "php_spl.h" | |
193 | #if HAVE_PCRE || HAVE_BUNDLED_PCRE | |
194 | + | |
195 | +#if COMPILE_DL_PCRE | |
196 | +// make pcre symbols will be declared here | |
197 | +#define COMPILE_DL_PCRE_NOEXTERN | |
198 | #include "ext/pcre/php_pcre.h" | |
199 | #endif | |
200 | ||
201 | +#endif | |
202 | + | |
203 | #define spl_ce_Traversable zend_ce_traversable | |
204 | #define spl_ce_Iterator zend_ce_iterator | |
205 | #define spl_ce_Aggregate zend_ce_aggregate |