Browse Source

fix building against PCRE 8.30

Ralf S. Engelschall 13 years ago
parent
commit
27e788a24f
2 changed files with 21 additions and 1 deletions
  1. 20 0
      apache-php/apache-php.patch
  2. 1 1
      apache-php/apache-php.spec

+ 20 - 0
apache-php/apache-php.patch

@@ -27,3 +27,23 @@ Index: ext/gd/libgd/gd_compat.c
  # include <jpeglib.h>
  # include <jpeglib.h>
  #endif
  #endif
  
  
+Index: ext/pcre/php_pcre.c
+--- ext/pcre/php_pcre.c.orig	2012-01-01 14:15:04.000000000 +0100
++++ ext/pcre/php_pcre.c	2012-02-06 08:48:07.000000000 +0100
+@@ -247,6 +247,7 @@
+ #endif
+ 	pcre_cache_entry	*pce;
+ 	pcre_cache_entry	 new_entry;
++    int                  dummy;
+ 
+ 	/* Try to lookup the cached regex entry, and if successful, just pass
+ 	   back the compiled pattern, otherwise go on and compile it. */
+@@ -255,7 +256,7 @@
+ 		 * We use a quick pcre_info() check to see whether cache is corrupted, and if it
+ 		 * is, we flush it and compile the pattern from scratch.
+ 		 */
+-		if (pcre_info(pce->re, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
++        if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &dummy) == PCRE_ERROR_BADMAGIC) {
+ 			zend_hash_clean(&PCRE_G(pcre_cache));
+ 		} else {
+ #if HAVE_SETLOCALE

+ 1 - 1
apache-php/apache-php.spec

@@ -37,7 +37,7 @@ Class:        BASE
 Group:        Web
 Group:        Web
 License:      PHP
 License:      PHP
 Version:      %{V_php}
 Version:      %{V_php}
-Release:      20120204
+Release:      20120206
 
 
 #   package options
 #   package options
 %option       with_suhosin              no
 %option       with_suhosin              no