Commit 477d6af4 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

* 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



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1309513 13f79535-47bb-0310-9956-ffa450edef68
parent e5375c50
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
                                                         -*- 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

+0 −14
Original line number Diff line number Diff line
@@ -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 ]

+4 −1
Original line number Diff line number Diff line
@@ -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;
}