]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* core: Fix building against external PCRE 8.30.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 4 Apr 2012 18:19:19 +0000 (18:19 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 4 Apr 2012 18:19:19 +0000 (18:19 +0000)
    PCRE has removed long deprecated pcre_info(). Use pcre_fullinfo()
    instead which is present as a replacement since PCRE 3.0 so
    would also be OK when building with bundled PCRE.

http://people.apache.org/~rjung/patches/pcre-httpd-2_2_x.patch
small indent change and explicit apr_size_t cast by wrowe

PR 52623
Backports: r1243176
Reviewed by: rjung, jorton, wrowe

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1309513 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
server/util_pcre.c

diff --git a/CHANGES b/CHANGES
index a5753c3e059f879f9fb59e19dac23cf0458fcd89..53b98b851e4e24e3b72336ca4ddacb8732c06602 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.23
 
-
+  *) core: Fix building against PCRE 8.30 by switching from the obsolete
+     pcre_info() to pcre_fullinfo(). PR 52623 [Ruediger Pluem, Rainer Jung]
 
 Changes with Apache 2.2.22
 
diff --git a/STATUS b/STATUS
index b5236ffd94babd7eae03b8d4ae495f5f9dd1cdce..34cf61abc57b2fd9f6dce530b435a5faaf67083c 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -114,20 +114,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
       +1: rjung, rpluem, jorton
       -1:
 
-   * core: Fix building against external PCRE 8.30.
-    PCRE has removed long deprecated pcre_info(). Use pcre_fullinfo()
-    instead which is present as a replacement since PCRE 3.0 so
-    would also be OK when building with bundled PCRE.
-    PR 52623.
-    Trunk patch:
-      http://svn.apache.org/viewvc?rev=r1243176&view=rev
-    2.4.x patch:
-      http://svn.apache.org/viewvc?rev=r1243177&view=rev
-    Backport version for 2.2.x of patch:
-      http://people.apache.org/~rjung/patches/pcre-httpd-2_2_x.patch
-    +1: rjung, jorton, wrowe
-    (Style nit; PCRE_... is indented one char too much)
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index c69c978503c9341ce64d90f3b40a5935996915db..980c7869c7384a7ebda6837ff8230c0d943e15fc 100644 (file)
@@ -128,6 +128,7 @@ AP_DECLARE(int) ap_regcomp(ap_regex_t *preg, const char *pattern, int cflags)
 const char *errorptr;
 int erroffset;
 int options = 0;
+int nsub;
 
 if ((cflags & AP_REG_ICASE) != 0) options |= PCRE_CASELESS;
 if ((cflags & AP_REG_NEWLINE) != 0) options |= PCRE_MULTILINE;
@@ -137,7 +138,9 @@ preg->re_erroffset = erroffset;
 
 if (preg->re_pcre == NULL) return AP_REG_INVARG;
 
-preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL);
+pcre_fullinfo((const pcre *)preg->re_pcre, NULL,
+              PCRE_INFO_CAPTURECOUNT, &nsub);
+preg->re_nsub = (apr_size_t)nsub;
 return 0;
 }