Hi all,
I would like to get this patch into CVS in order to use PCRE on NetWare where only the 
ap_ prefixed pcre functions are exported. I have tested that the patch below compiles 
fine with NetWare, Linux and Win32.
As a positive side effect on Win32 the binary is about 24 kb smaller.

Guenter.

http://www.gknw.com/test/pcre_patch

###############################################################################
--- ./jk/native2/include/jk_global.h.orig       2004-02-24 12:30:10.000000000 +0100
+++ ./jk/native2/include/jk_global.h    2004-02-25 20:44:36.000000000 +0100
@@ -32,6 +32,7 @@
 #include "apr_errno.h"
 #include "apr_version.h"
 #include "apr_time.h"
+#include "httpd.h"
 
 #include <stdio.h>
 #include <stdlib.h>
###############################################################################
--- ./jk/native2/common/jk_uriEnv.c.orig        2004-02-24 12:30:10.000000000 +0100
+++ ./jk/native2/common/jk_uriEnv.c     2004-02-25 20:43:59.000000000 +0100
@@ -73,8 +73,8 @@
                     "uriEnv.parseName() parsing %s regexp\n",
                     name);
         {
-            regex_t *preg = (regex_t *)uriEnv->pool->calloc( env, uriEnv->pool, 
sizeof(regex_t));
-            if (regcomp(preg, uriEnv->uri, REG_EXTENDED)) {
+            apr_pool_t *preg = (apr_pool_t *)uriEnv->pool->calloc( env, uriEnv->pool, 
sizeof(regex_t));
+            if (ap_pregcomp(preg, uriEnv->uri, REG_EXTENDED)) {
                 env->l->jkLog(env, env->l, JK_LOG_DEBUG,
                               "uriEnv.parseName() error compiling regexp %s\n",
                               uri);
@@ -138,8 +138,8 @@
                     "uriEnv.parseName() parsing regexp %s\n",
                     uri);
         {
-            regex_t *preg = (regex_t *)uriEnv->pool->calloc( env, uriEnv->pool, 
sizeof(regex_t));
-            if (regcomp(preg, uriEnv->uri, REG_EXTENDED)) {
+            apr_pool_t *preg = (apr_pool_t *)uriEnv->pool->calloc( env, uriEnv->pool, 
sizeof(regex_t));
+            if (ap_pregcomp(preg, uriEnv->uri, REG_EXTENDED)) {
                 env->l->jkLog(env, env->l, JK_LOG_DEBUG,

                               "uriEnv.parseName() error compiling regexp %s\n",
                               uri);
###############################################################################
--- ./jk/native2/common/jk_uriMap.c.orig        2004-02-24 12:30:10.000000000 +0100
+++ ./jk/native2/common/jk_uriMap.c     2004-02-25 20:43:47.000000000 +0100
@@ -317,7 +317,7 @@
         if (uwr->regexp) {
             regex_t *r = (regex_t *)uwr->regexp;
             regmatch_t regm[10];
-            if (!regexec(r, uri, r->re_nsub + 1, regm, 0)) {
+            if (!ap_regexec(r, uri, r->re_nsub + 1, regm, 0)) {
                 return uwr;
             }
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to