apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mladen Turk" <mt...@mappingsoft.com>
Subject RE: pcre in aprutil
Date Wed, 18 Sep 2002 16:54:11 GMT
> > 
> > We would like to use the pcre of httpd-2.0/srclib/pcre in mod_jk2 
> > (Jakarta-Tomcat).
> > 
> I don't have any objection to this, but one caveat: the 
> httpd-2.0 copy of pcre has at least one local change that the 
> httpd depends on (the patch has been submitted to the pcre 
> maintainer but there hasn't been a new pcre release since 
> then, so the change exists only in the Apache tree).  So if 
> you move pcre, please make sure to use the same version 
> that's in the httpd-2.0 tree.

We would like to use the same pcre as in the httpd-2.0.
Further more I think that the pcre code from server/util.c

AP_DECLARE(int) ap_is_matchexp(const char *str)

static apr_status_t regex_cleanup(void *preg)

AP_DECLARE(regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern,
				   int cflags)

AP_DECLARE(void) ap_pregfree(apr_pool_t *p, regex_t * reg)

AP_DECLARE(int) ap_regexec(regex_t *preg, const char *string,
                           size_t nmatch, regmatch_t pmatch[], int

AP_DECLARE(size_t) ap_regerror(int errcode, const regex_t *preg, char
*errbuf, size_t errbuf_size)

AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input, const
char *source,
			   size_t nmatch, regmatch_t pmatch[])

Can be moved to the apr-util and just renamed to the APU_DECLARE proto.
It changes nothing from the httpd point of view except the build
procedure, and the fact that the pcre is inside the apr-util like expat
for example.
Of course you can mimic the regex_t to something abstract like


View raw message