Parcourir la source

fix buildung against PCRE 8.30

Ralf S. Engelschall il y a 13 ans
Parent
commit
65f8db1da3
2 fichiers modifiés avec 21 ajouts et 1 suppressions
  1. 20 0
      php/php.patch
  2. 1 1
      php/php.spec

+ 20 - 0
php/php.patch

@@ -27,3 +27,23 @@ Index: ext/gd/libgd/gd_compat.c
  # include <jpeglib.h>
  #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
php/php.spec

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