You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2012/04/04 20:19:20 UTC

svn commit: r1309513 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS server/util_pcre.c

Author: wrowe
Date: Wed Apr  4 18:19:19 2012
New Revision: 1309513

URL: http://svn.apache.org/viewvc?rev=1309513&view=rev
Log:
  * 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.

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


Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/server/util_pcre.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=1309513&r1=1309512&r2=1309513&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Wed Apr  4 18:19:19 2012
@@ -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
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=1309513&r1=1309512&r2=1309513&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Wed Apr  4 18:19:19 2012
@@ -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 ]
 

Modified: httpd/httpd/branches/2.2.x/server/util_pcre.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/util_pcre.c?rev=1309513&r1=1309512&r2=1309513&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/server/util_pcre.c (original)
+++ httpd/httpd/branches/2.2.x/server/util_pcre.c Wed Apr  4 18:19:19 2012
@@ -128,6 +128,7 @@ AP_DECLARE(int) ap_regcomp(ap_regex_t *p
 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;
 }