]> git.pld-linux.org Git - packages/php.git/blame - spl-shared.patch
Rel 11; fix openssl 3 build
[packages/php.git] / spl-shared.patch
CommitLineData
59609f89
JR
1diff -urNp -x '*.orig' php-7.0.33.org/ext/pdo/pdo.c php-7.0.33/ext/pdo/pdo.c
2--- php-7.0.33.org/ext/pdo/pdo.c 2018-12-04 18:23:01.000000000 +0100
3+++ php-7.0.33/ext/pdo/pdo.c 2021-08-23 23:36:38.248768024 +0200
4@@ -130,7 +130,7 @@ const zend_function_entry pdo_functions[
5 /* {{{ pdo_functions[] */
6 #if ZEND_MODULE_API_NO >= 20050922
7 static const zend_module_dep pdo_deps[] = {
8-#ifdef HAVE_SPL
9+#ifdef HAVE_SPL && !COMPILE_DL_SPL
10 ZEND_MOD_REQUIRED("spl")
11 #endif
12 ZEND_MOD_END
13diff -urNp -x '*.orig' php-7.0.33.org/ext/phar/Makefile.frag php-7.0.33/ext/phar/Makefile.frag
14--- php-7.0.33.org/ext/phar/Makefile.frag 2018-12-04 18:22:51.000000000 +0100
15+++ php-7.0.33/ext/phar/Makefile.frag 2021-08-23 23:36:38.248768024 +0200
16@@ -9,7 +9,7 @@ PHP_PHARCMD_EXECUTABLE = ` \
17 $(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
18 if test "x$(PHP_MODULES)" != "x"; then \
19 $(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
20- for i in bz2 zlib phar; do \
21+ for i in pcre spl bz2 zlib phar; do \
22 if test -f "$(top_builddir)/modules/$$i.la"; then \
23 . $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
24 fi; \
25diff -urNp -x '*.orig' php-7.0.33.org/ext/spl/config.m4 php-7.0.33/ext/spl/config.m4
26--- php-7.0.33.org/ext/spl/config.m4 2018-12-04 18:22:57.000000000 +0100
27+++ php-7.0.33/ext/spl/config.m4 2021-08-23 23:36:38.245434647 +0200
28@@ -2,6 +2,6 @@ dnl $Id$
29 dnl config.m4 for extension SPL
30
c0240cb1 31 AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support])
f4ee12ea
ER
32- PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
33+ PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
c0240cb1 34 PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h])
35 PHP_ADD_EXTENSION_DEP(spl, pcre, true)
59609f89
JR
36diff -urNp -x '*.orig' php-7.0.33.org/ext/spl/spl_iterators.c php-7.0.33/ext/spl/spl_iterators.c
37--- php-7.0.33.org/ext/spl/spl_iterators.c 2018-12-04 18:22:57.000000000 +0100
38+++ php-7.0.33/ext/spl/spl_iterators.c 2021-08-23 23:36:38.245434647 +0200
39@@ -60,7 +60,13 @@ PHPAPI zend_class_entry *spl_ce_EmptyIte
c0240cb1 40 PHPAPI zend_class_entry *spl_ce_AppendIterator;
41 PHPAPI zend_class_entry *spl_ce_RegexIterator;
42 PHPAPI zend_class_entry *spl_ce_RecursiveRegexIterator;
43+#if COMPILE_DL_SPL
44+#undef spl_ce_Countable
45+zend_class_entry *spl_ce_Countable; // real instance
46+extern PHPAPI zend_class_entry *spl_ce_Countable_p; // external one
47+#else
48 PHPAPI zend_class_entry *spl_ce_Countable;
49+#endif
50 PHPAPI zend_class_entry *spl_ce_RecursiveTreeIterator;
51
52 ZEND_BEGIN_ARG_INFO(arginfo_recursive_it_void, 0)
59609f89 53@@ -3791,6 +3797,10 @@ PHP_MINIT_FUNCTION(spl_iterators)
c0240cb1 54 REGISTER_SPL_STD_CLASS_EX(EmptyIterator, NULL, spl_funcs_EmptyIterator);
55 REGISTER_SPL_ITERATOR(EmptyIterator);
56
57+#if COMPILE_DL_SPL
58+ spl_ce_Countable_p = spl_ce_Countable;
59+#endif
60+
61 REGISTER_SPL_SUB_CLASS_EX(RecursiveTreeIterator, RecursiveIteratorIterator, spl_RecursiveTreeIterator_new, spl_funcs_RecursiveTreeIterator);
62 REGISTER_SPL_CLASS_CONST_LONG(RecursiveTreeIterator, "BYPASS_CURRENT", RTIT_BYPASS_CURRENT);
63 REGISTER_SPL_CLASS_CONST_LONG(RecursiveTreeIterator, "BYPASS_KEY", RTIT_BYPASS_KEY);
59609f89
JR
64diff -urNp -x '*.orig' php-7.0.33.org/ext/spl/spl_iterators.h php-7.0.33/ext/spl/spl_iterators.h
65--- php-7.0.33.org/ext/spl/spl_iterators.h 2018-12-04 18:22:57.000000000 +0100
66+++ php-7.0.33/ext/spl/spl_iterators.h 2021-08-23 23:36:38.245434647 +0200
67@@ -51,7 +51,12 @@ extern PHPAPI zend_class_entry *spl_ce_E
c0240cb1 68 extern PHPAPI zend_class_entry *spl_ce_AppendIterator;
69 extern PHPAPI zend_class_entry *spl_ce_RegexIterator;
70 extern PHPAPI zend_class_entry *spl_ce_RecursiveRegexIterator;
71+#if COMPILE_DL_SPL
72+#define spl_ce_Countable spl_ce_Countable_p
73+extern PHPAPI zend_class_entry *spl_ce_Countable_p;
74+#else
75 extern PHPAPI zend_class_entry *spl_ce_Countable;
76+#endif
9eb543e2
ER
77 extern PHPAPI zend_class_entry *spl_ce_CallbackFilterIterator;
78 extern PHPAPI zend_class_entry *spl_ce_RecursiveCallbackFilterIterator;
c0240cb1 79
59609f89
JR
80diff -urNp -x '*.orig' php-7.0.33.org/ext/standard/array.c php-7.0.33/ext/standard/array.c
81--- php-7.0.33.org/ext/standard/array.c 2018-12-04 18:22:44.000000000 +0100
82+++ php-7.0.33/ext/standard/array.c 2021-08-23 23:36:38.248768024 +0200
83@@ -50,6 +50,9 @@
c0240cb1 84 #ifdef HAVE_SPL
85 #include "ext/spl/spl_array.h"
86 #endif
87+#if COMPILE_DL_SPL
88+PHPAPI zend_class_entry *spl_ce_Countable_p = NULL; // external one
89+#endif
90
91 /* {{{ defines */
92 #define EXTR_OVERWRITE 0
This page took 0.08851 seconds and 4 git commands to generate.