summaryrefslogtreecommitdiff
path: root/www/php4
diff options
context:
space:
mode:
authorcjones <cjones>2004-05-18 18:30:39 +0000
committercjones <cjones>2004-05-18 18:30:39 +0000
commitfe3d4deb44188c0198417b9b6ccd4717a764efe7 (patch)
treec6477e5b63721b4053a69c1fc4d6c2ce62493cb9 /www/php4
parent2052d97c87e8cde72fcd9d1be990fa878768f9fe (diff)
downloadpkgsrc-fe3d4deb44188c0198417b9b6ccd4717a764efe7.tar.gz
Added this patch from FreeBSD
(ports/lang/php4/files/patch-ext::pcre::php_pcre.c). Fixes a bug (described at http://bugs.php.net/bug.php?id=27810) which causes apache2 to dump core on receiving SIGHUP. This is supposedly fixed in the next release of PHP.
Diffstat (limited to 'www/php4')
-rw-r--r--www/php4/patches/patch-ac46
1 files changed, 46 insertions, 0 deletions
diff --git a/www/php4/patches/patch-ac b/www/php4/patches/patch-ac
new file mode 100644
index 00000000000..74609b916de
--- /dev/null
+++ b/www/php4/patches/patch-ac
@@ -0,0 +1,46 @@
+$NetBSD: patch-ac,v 1.8 2004/05/18 18:30:39 cjones Exp $
+
+--- ext/pcre/php_pcre.c.orig Fri Apr 16 09:21:14 2004
++++ ext/pcre/php_pcre.c Fri Apr 16 09:23:36 2004
+@@ -106,15 +106,6 @@
+ REGISTER_LONG_CONSTANT("PREG_SPLIT_DELIM_CAPTURE", PREG_SPLIT_DELIM_CAPTURE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("PREG_SPLIT_OFFSET_CAPTURE", PREG_SPLIT_OFFSET_CAPTURE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("PREG_GREP_INVERT", PREG_GREP_INVERT, CONST_CS | CONST_PERSISTENT);
+-
+- pcre_malloc = php_pcre_malloc;
+- pcre_free = php_pcre_free;
+-
+-#ifdef NO_RECURSE
+- pcre_stack_malloc = php_pcre_malloc;
+- pcre_stack_free = php_pcre_free;
+-#endif
+-
+ return SUCCESS;
+ }
+ /* }}} */
+@@ -130,6 +121,16 @@
+ }
+ /* }}} */
+
++/* {{{ PHP_RINIT_FUNCTION(pcre) */
++static PHP_RINIT_FUNCTION(pcre)
++{
++ pcre_malloc = php_pcre_malloc;
++ pcre_free = php_pcre_free;
++
++ return SUCCESS;
++}
++/* }}} */
++
+ /* {{{ pcre_get_compiled_regex
+ */
+ PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options) {
+@@ -1527,7 +1528,7 @@
+ pcre_functions,
+ PHP_MINIT(pcre),
+ PHP_MSHUTDOWN(pcre),
+- NULL,
++ PHP_RINIT(pcre),
+ NULL,
+ PHP_MINFO(pcre),
+ NO_VERSION_YET,