]> git.pld-linux.org Git - packages/php.git/blame - pcre-shared.patch
up to php-7.3.0RC
[packages/php.git] / pcre-shared.patch
CommitLineData
86b12e82
ER
1--- php-7.3.0RC5/ext/pcre/config0.m4~ 2018-11-06 12:22:53.000000000 +0200
2+++ php-7.3.0RC5/ext/pcre/config0.m4 2018-11-12 13:30:52.805036671 +0200
3@@ -84,8 +84,9 @@
4 ])
5 fi
6
f4ee12ea
ER
7- PHP_NEW_EXTENSION(pcre, php_pcre.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
8+ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
c0240cb1 9 PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h])
7f8db867 10+ EXTRA_LIBS="$EXTRA_LIBS -lpcre2-8"
c0240cb1 11 else
12 AC_MSG_CHECKING([for PCRE library to use])
13 AC_MSG_RESULT([bundled])
7f8db867
ER
14--- php-7.3.0alpha3/ext/pcre/php_pcre.h~ 2018-07-03 15:56:43.000000000 +0300
15+++ php-7.3.0alpha3/ext/pcre/php_pcre.h 2018-07-10 11:11:55.739017013 +0300
f389261f
ER
16@@ -33,7 +33,29 @@
17 #include <locale.h>
c0240cb1 18 #endif
19
f389261f
ER
20+#if !defined(COMPILE_DL_PCRE_NOREDIRECT)
21+#define pcre_get_compiled_regex (*pcre_get_compiled_regex_p)
22+#define pcre_get_compiled_regex_cache (*pcre_get_compiled_regex_cache_p)
23+#define php_pcre_replace_impl (*php_pcre_replace_impl_p)
24+#define php_pcre_match_impl (*php_pcre_match_impl_p)
25+#define php_pcre_split_impl (*php_pcre_split_impl_p)
26+#if !defined(COMPILE_DL_PCRE_NOEXTERN)
27+# define PCRE_EXTERN extern
c0240cb1 28+#else
f389261f 29+# define PCRE_EXTERN
c0240cb1 30+#endif
f389261f
ER
31+#else
32+// for pcre.c
33+#define PCRE_EXTERN
34+extern void *pcre_get_compiled_regex_p;
35+extern void *pcre_get_compiled_regex_cache_p;
36+extern void *php_pcre_replace_impl_p;
37+extern void *php_pcre_match_impl_p;
38+extern void *php_pcre_split_impl_p;
39+#endif
40+
7f8db867 41 PHPAPI zend_string *php_pcre_replace(zend_string *regex, zend_string *subject_str, char *subject, size_t subject_len, zend_string *replace_str, size_t limit, size_t *replace_count);
f389261f 42+PCRE_EXTERN
7f8db867
ER
43 PHPAPI pcre2_code* pcre_get_compiled_regex(zend_string *regex, uint32_t *capture_count, uint32_t *options);
44 PHPAPI pcre2_code* pcre_get_compiled_regex_ex(zend_string *regex, uint32_t *capture_count, uint32_t *preg_options, uint32_t *coptions);
c0240cb1 45
7f8db867
ER
46@@ -45,14 +67,18 @@
47
48 typedef struct _pcre_cache_entry pcre_cache_entry;
f389261f
ER
49
50+PCRE_EXTERN
51 PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex);
52
53+PCRE_EXTERN
7f8db867
ER
54 PHPAPI void php_pcre_match_impl( pcre_cache_entry *pce, char *subject, size_t subject_len, zval *return_value,
55 zval *subpats, int global, int use_flags, zend_long flags, zend_off_t start_offset);
f389261f
ER
56
57+PCRE_EXTERN
7f8db867
ER
58 PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *subject_str, char *subject, size_t subject_len, zend_string *replace_str,
59 size_t limit, size_t *replace_count);
f389261f
ER
60
61+PCRE_EXTERN
62 PHPAPI void php_pcre_split_impl( pcre_cache_entry *pce, zend_string *subject_str, zval *return_value,
63 zend_long limit_val, zend_long flags);
64
7f8db867
ER
65--- php-7.3.0beta3/ext/pcre/php_pcre.c~ 2018-09-11 11:43:27.000000000 +0300
66+++ php-7.3.0beta3/ext/pcre/php_pcre.c 2018-09-11 11:43:30.747506034 +0300
f389261f
ER
67@@ -21,6 +21,9 @@
68 #include "php.h"
69 #include "php_ini.h"
70 #include "php_globals.h"
71+#if COMPILE_DL_PCRE
72+#define COMPILE_DL_PCRE_NOREDIRECT
73+#endif
74 #include "php_pcre.h"
75 #include "ext/standard/info.h"
76 #include "ext/standard/basic_functions.h"
7f8db867 77@@ -208,6 +211,17 @@
f389261f 78 REGISTER_LONG_CONSTANT("PREG_JIT_STACKLIMIT_ERROR", PHP_PCRE_JIT_STACKLIMIT_ERROR, CONST_CS | CONST_PERSISTENT);
c0240cb1 79 REGISTER_STRING_CONSTANT("PCRE_VERSION", (char *)pcre_version(), CONST_CS | CONST_PERSISTENT);
80
81+#if COMPILE_DL_PCRE
82+ pcre_get_compiled_regex_p = pcre_get_compiled_regex;
f389261f
ER
83+ pcre_get_compiled_regex_cache_p = pcre_get_compiled_regex_cache;
84+ php_pcre_replace_impl_p = php_pcre_replace_impl;
85+ php_pcre_match_impl_p = php_pcre_match_impl;
86+ php_pcre_split_impl_p = php_pcre_split_impl;
7f8db867
ER
87+ php_pcre_create_match_data_p = php_pcre_create_match_data;
88+ php_pcre_free_match_data_p = php_pcre_free_match_data;
89+ php_pcre_mctx_p = php_pcre_mctx;
c0240cb1 90+#endif
91+
92 return SUCCESS;
93 }
94 /* }}} */
1e0b2f69
ER
95--- php-7.2.0RC5/ext/standard/basic_functions.c 2017-10-28 21:08:47.383549141 +0300
96+++ php-7.2.0RC5/ext/standard/basic_functions.c 2017-10-28 21:10:20.625051932 +0300
7f8db867 97@@ -113,6 +113,18 @@
1e0b2f69
ER
98 PHPAPI php_basic_globals basic_globals;
99 #endif
c0240cb1 100
101+#if COMPILE_DL_PCRE
7f8db867 102+// Declare the pointers in core library
1e0b2f69
ER
103+void *pcre_get_compiled_regex_p;
104+void *pcre_get_compiled_regex_cache_p;
105+void *php_pcre_replace_impl_p;
106+void *php_pcre_match_impl_p;
107+void *php_pcre_split_impl_p;
7f8db867
ER
108+void *php_pcre_create_match_data_p;
109+void *php_pcre_free_match_data_p;
110+void *php_pcre_mctx_p;
c0240cb1 111+#endif
112+
1e0b2f69
ER
113 #include "php_fopen_wrappers.h"
114 #include "streamsfuncs.h"
c0240cb1 115
c0240cb1 116--- php-5.3.2/sapi/cli/tests/018.phpt~ 2008-03-17 16:05:39.000000000 +0200
117+++ php-5.3.2/sapi/cli/tests/018.phpt 2010-03-16 20:41:11.341251246 +0200
118@@ -20,8 +20,6 @@
119 --EXPECTF--
120 [PHP Modules]
121 %a
122-pcre
123-%a
124
125 [Zend Modules]
126 %aDone
5dde8673
ER
127--- php-7.0.0beta3/main/php_ini.c~ 2015-08-26 18:50:15.000000000 +0300
128+++ php-7.0.0beta3/main/php_ini.c 2015-08-26 22:33:59.126957396 +0300
129@@ -765,8 +765,8 @@
130 */
131 void php_ini_register_extensions(void)
132 {
133- zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb);
134 zend_llist_apply(&extension_lists.functions, php_load_php_extension_cb);
135+ zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb);
136
137 zend_llist_destroy(&extension_lists.engine);
138 zend_llist_destroy(&extension_lists.functions);
736fd708
ER
139--- php-5.3.1/ext/phar/Makefile.frag~ 2009-07-23 15:48:04.000000000 +0000
140+++ php-5.3.1/ext/phar/Makefile.frag 2009-11-30 16:10:29.687175948 +0000
141@@ -10,7 +10,7 @@
142 $(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
143 if test "x$(PHP_MODULES)" != "x"; then \
144 $(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
145- for i in spl bz2 zlib phar; do \
146+ for i in pcre spl bz2 zlib phar; do \
147 if test -f "$(top_builddir)/modules/$$i.la"; then \
148 . $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
149 fi; \
7f8db867
ER
150--- php-7.3.0beta3/ext/pcre/php_pcre.h~ 2018-09-11 11:41:50.000000000 +0300
151+++ php-7.3.0beta3/ext/pcre/php_pcre.h 2018-09-11 11:41:54.865778887 +0300
152@@ -37,6 +37,9 @@
153 #define php_pcre_replace_impl (*php_pcre_replace_impl_p)
154 #define php_pcre_match_impl (*php_pcre_match_impl_p)
155 #define php_pcre_split_impl (*php_pcre_split_impl_p)
156+#define php_pcre_create_match_data (*php_pcre_create_match_data_p)
157+#define php_pcre_free_match_data (*php_pcre_free_match_data_p)
158+#define php_pcre_mctx (*php_pcre_mctx_p)
159 #if !defined(COMPILE_DL_PCRE_NOEXTERN)
160 # define PCRE_EXTERN extern
161 #else
162@@ -50,6 +53,9 @@
163 extern void *php_pcre_replace_impl_p;
164 extern void *php_pcre_match_impl_p;
165 extern void *php_pcre_split_impl_p;
166+extern void *php_pcre_create_match_data_p;
167+extern void *php_pcre_free_match_data_p;
168+extern void *php_pcre_mctx_p;
169 #endif
170
171 PHPAPI zend_string *php_pcre_replace(zend_string *regex, zend_string *subject_str, char *subject, size_t subject_len, zend_string *replace_str, size_t limit, size_t *replace_count);
172@@ -83,6 +89,7 @@
173 PHPAPI void php_pcre_grep_impl( pcre_cache_entry *pce, zval *input, zval *return_value,
174 zend_long flags);
175
176+PCRE_EXTERN
177 PHPAPI pcre2_match_context *php_pcre_mctx(void);
178 PHPAPI pcre2_general_context *php_pcre_gctx(void);
179 PHPAPI pcre2_compile_context *php_pcre_cctx(void);
180@@ -90,7 +97,9 @@
181 PHPAPI void php_pcre_pce_decref(pcre_cache_entry *);
182 PHPAPI pcre2_code *php_pcre_pce_re(pcre_cache_entry *);
183 /* capture_count can be ignored, re is required. */
184+PCRE_EXTERN
185 PHPAPI pcre2_match_data *php_pcre_create_match_data(uint32_t, pcre2_code *);
186+PCRE_EXTERN
187 PHPAPI void php_pcre_free_match_data(pcre2_match_data *);
188
189 ZEND_BEGIN_MODULE_GLOBALS(pcre)
This page took 0.450259 seconds and 4 git commands to generate.