httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52623] does not build with pcre-8.30
Date Sat, 11 Feb 2012 22:39:55 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52623

--- Comment #3 from Rainer Jung <rainer.jung@kippdata.de> 2012-02-11 22:39:55 UTC ---
Hi RĂ¼diger,

both of your patch variants seem right to me. I tested them as follows:

(In reply to comment #2)
> (In reply to comment #1)
> Index: server/util_pcre.c
> ===================================================================
> --- server/util_pcre.c  (revision 1241805)
> +++ server/util_pcre.c  (working copy)
> @@ -124,6 +124,7 @@
>      const char *errorptr;
>      int erroffset;
>      int options = 0;
> +    int nsub;
> 
>      if ((cflags & AP_REG_ICASE) != 0)
>          options |= PCRE_CASELESS;
> @@ -139,7 +140,9 @@
>      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 = nsub;
>      return 0;
>  }

Tested on trunk and 2.2.x. No additional build warnings or test suite failures.
This seems to be the best solution for 2.2.x, because no MMN bump is needed.

> or even better:
> 
> Index: server/util_pcre.c
> ===================================================================
> --- server/util_pcre.c  (revision 1241805)
> +++ server/util_pcre.c  (working copy)
> @@ -139,7 +139,8 @@
>      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;
>  }
> 
> Index: include/ap_regex.h
> ===================================================================
> --- include/ap_regex.h  (revision 1241805)
> +++ include/ap_regex.h  (working copy)
> @@ -88,7 +88,7 @@
>  /* 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;

I tested this one only for trunk. Again no additional warnings, no test suite
failures.

I will apply this one to trunk and 2.4.x and propose the other one for 2.2.x.

Regards,

Rainer

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message