diff options
author | Rainer Jung <rjung@apache.org> | 2012-02-11 22:45:37 +0000 |
---|---|---|
committer | Rainer Jung <rjung@apache.org> | 2012-02-11 22:45:37 +0000 |
commit | 04158048140ce34fdd7279124f1e50233adb78d2 (patch) | |
tree | e3ce8cc07ef84ec5b8b7a8214651b28c9841b207 | |
parent | 9a0981b88d8abd93730e63970f70c6d91c50040c (diff) | |
download | httpd-04158048140ce34fdd7279124f1e50233adb78d2.tar.gz |
BZ 52623: Fix building against PCRE 8.30.
PCRE dropped support for pcre_info() which is
deprecated since a long time. Use pcre_fullinfo()
instead, which exists since version 3.0 of PCRE.
Patch provided by Ruediger Pluem.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1243176 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | include/ap_mmn.h | 3 | ||||
-rw-r--r-- | include/ap_regex.h | 2 | ||||
-rw-r--r-- | server/util_pcre.c | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h index b95600f4a1..e77690da84 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -392,12 +392,13 @@ * 20120201.0 (2.5.0-dev) Bump MODULE_MAGIC_COOKIE to "AP25"! * 20120204.0 (2.5.0-dev) Remove ap_create_core_ctx(), ap_core_ctx_get_bb(); * add insert_network_bucket hook, AP_DECLINED + * 20120211.0 (2.5.0-dev) Change re_nsub in ap_regex_t from apr_size_t to int. */ #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */ #ifndef MODULE_MAGIC_NUMBER_MAJOR -#define MODULE_MAGIC_NUMBER_MAJOR 20120204 +#define MODULE_MAGIC_NUMBER_MAJOR 20120211 #endif #define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */ diff --git a/include/ap_regex.h b/include/ap_regex.h index 787dc599a9..5122154d90 100644 --- a/include/ap_regex.h +++ b/include/ap_regex.h @@ -88,7 +88,7 @@ enum { /* The structure representing a compiled regular expression. */ typedef struct { void *re_pcre; - apr_size_t re_nsub; + int re_nsub; apr_size_t re_erroffset; } ap_regex_t; diff --git a/server/util_pcre.c b/server/util_pcre.c index 7196878d0c..2d157c0c10 100644 --- a/server/util_pcre.c +++ b/server/util_pcre.c @@ -139,7 +139,8 @@ AP_DECLARE(int) ap_regcomp(ap_regex_t * preg, const char *pattern, int cflags) 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, &(preg->re_nsub)); return 0; } |