+diff -urN mod_fastcgi-2.4.2.org/fcgi_buf.c mod_fastcgi-2.4.2/fcgi_buf.c
+--- mod_fastcgi-2.4.2.org/fcgi_buf.c 2004-10-06 20:30:46.335894544 +0200
++++ mod_fastcgi-2.4.2/fcgi_buf.c 2004-10-06 21:34:57.412891616 +0200
+@@ -50,7 +50,7 @@
+ {
+ Buffer *buf;
+
+- buf = (Buffer *)ap_pcalloc(p, sizeof(Buffer) + size);
++ buf = (Buffer *)apr_pcalloc(p, sizeof(Buffer) + size);
+ buf->size = size;
+ fcgi_buf_reset(buf);
+ return buf;
+@@ -487,7 +487,7 @@
+ char *new_elts;
+ int new_nalloc = (arr->nalloc <= 0) ? n : arr->nelts + n;
+
+- new_elts = ap_pcalloc(arr->pool, arr->elt_size * new_nalloc);
++ new_elts = apr_pcalloc(arr->pool, arr->elt_size * new_nalloc);
+ memcpy(new_elts, arr->elts, arr->nelts * arr->elt_size);
+
+ arr->elts = new_elts;
diff -urN mod_fastcgi-2.4.2.org/fcgi_config.c mod_fastcgi-2.4.2/fcgi_config.c
--- mod_fastcgi-2.4.2.org/fcgi_config.c 2004-10-06 20:30:46.336894330 +0200
-+++ mod_fastcgi-2.4.2/fcgi_config.c 2004-10-06 21:33:50.361255856 +0200
++++ mod_fastcgi-2.4.2/fcgi_config.c 2004-10-06 21:34:57.417890545 +0200
@@ -50,7 +50,7 @@
/* Convert port number */
tmp = (u_short) strtol(portStr, &cvptr, 10);
#else
err = fcgi_config_make_dir(tp, fcgi_socket_dir);
if (err != NULL)
+@@ -596,7 +596,7 @@
+ const char *option, *err;
+
+ /* Allocate temp storage for the array of initial environment variables */
+- char **envp = ap_pcalloc(tp, sizeof(char *) * (MAX_INIT_ENV_VARS + 3));
++ char **envp = apr_pcalloc(tp, sizeof(char *) * (MAX_INIT_ENV_VARS + 3));
+ unsigned int envc = 0;
+
+ #ifdef WIN32
+@@ -789,7 +789,7 @@
+ }
+
+ /* Move env array to a surviving pool */
+- s->envp = (char **)ap_pcalloc(p, sizeof(char *) * (envc + 4));
++ s->envp = (char **)apr_pcalloc(p, sizeof(char *) * (envc + 4));
+ memcpy(s->envp, envp, sizeof(char *) * envc);
+
+ /* Initialize process structs */
@@ -853,7 +853,7 @@
}
}
#ifdef APACHE2
+@@ -1037,7 +1037,7 @@
+
+ /* Allocate temp storage for an initial environment */
+ unsigned int envc = 0;
+- char **envp = (char **)ap_pcalloc(tp, sizeof(char *) * (MAX_INIT_ENV_VARS + 3));
++ char **envp = (char **)apr_pcalloc(tp, sizeof(char *) * (MAX_INIT_ENV_VARS + 3));
+
+ err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+ if (err)
+@@ -1144,7 +1144,7 @@
+
+ /* Move env array to a surviving pool, leave 2 extra slots for
+ * WIN32 _FCGI_MUTEX_ and _FCGI_SHUTDOWN_EVENT_ */
+- dynamicEnvp = (char **)ap_pcalloc(p, sizeof(char *) * (envc + 4));
++ dynamicEnvp = (char **)apr_pcalloc(p, sizeof(char *) * (envc + 4));
+ memcpy(dynamicEnvp, envp, sizeof(char *) * envc);
+
+ return NULL;
+@@ -1152,7 +1152,7 @@
+
+ void *fcgi_config_create_dir_config(pool *p, char *dummy)
+ {
+- fcgi_dir_config *dir_config = ap_pcalloc(p, sizeof(fcgi_dir_config));
++ fcgi_dir_config *dir_config = apr_pcalloc(p, sizeof(fcgi_dir_config));
+
+ dir_config->authenticator_options = FCGI_AUTHORITATIVE;
+ dir_config->authorizer_options = FCGI_AUTHORITATIVE;
diff -urN mod_fastcgi-2.4.2.org/fcgi_pm.c mod_fastcgi-2.4.2/fcgi_pm.c
--- mod_fastcgi-2.4.2.org/fcgi_pm.c 2004-10-06 20:30:46.337894116 +0200
-+++ mod_fastcgi-2.4.2/fcgi_pm.c 2004-10-06 21:33:50.371253714 +0200
++++ mod_fastcgi-2.4.2/fcgi_pm.c 2004-10-06 21:34:57.428888189 +0200
+@@ -365,7 +365,7 @@
+ if (dnEnd == NULL) {
+ dirName = "./";
+ } else {
+- dirName = ap_pcalloc(fcgi_config_pool, dnEnd - fs->fs_path + 1);
++ dirName = apr_pcalloc(fcgi_config_pool, dnEnd - fs->fs_path + 1);
+ dirName = memcpy(dirName, fs->fs_path, dnEnd - fs->fs_path);
+ }
+ if (chdir(dirName) < 0) {
@@ -576,7 +576,7 @@
fs->envp[i - 1] = NULL;
}
}
else {
pCommand = quoted_filename;
+@@ -704,7 +704,7 @@
+ iEnvBlockLen += strlen(termination_env_string) + 1;
+ iEnvBlockLen += strlen(fs->mutex_env_string) + 1;
+
+- pEnvBlock = (char *) ap_pcalloc(tp, iEnvBlockLen);
++ pEnvBlock = (char *) apr_pcalloc(tp, iEnvBlockLen);
+
+ i = 0;
+ pNext = pEnvBlock;
@@ -744,7 +744,7 @@
CloseHandle(listen_handle);
}
return pid;
+@@ -1094,7 +1094,7 @@
+ s->socket_path = fcgi_util_socket_make_path_absolute(sp, s->socket_path, 1);
+
+ /* Create sockaddr, prealloc it so it won't get created in tp */
+- s->socket_addr = ap_pcalloc(sp, sizeof(struct sockaddr_un));
++ s->socket_addr = apr_pcalloc(sp, sizeof(struct sockaddr_un));
+ err = fcgi_util_socket_make_domain_addr(tp, (struct sockaddr_un **)&s->socket_addr,
+ &s->socket_addr_len, s->socket_path);
+ if (err) {
@@ -1340,7 +1340,7 @@
continue;
/*
diff -urN mod_fastcgi-2.4.2.org/fcgi_protocol.c mod_fastcgi-2.4.2/fcgi_protocol.c
--- mod_fastcgi-2.4.2.org/fcgi_protocol.c 2004-10-06 20:30:46.338893902 +0200
-+++ mod_fastcgi-2.4.2/fcgi_protocol.c 2004-10-06 21:33:50.374253072 +0200
++++ mod_fastcgi-2.4.2/fcgi_protocol.c 2004-10-06 21:34:57.430887761 +0200
+@@ -110,7 +110,7 @@
+ char *first, *last;
+
+ if (r->the_request == NULL)
+- return (char *) ap_pcalloc(r->pool, 1);
++ return (char *) apr_pcalloc(r->pool, 1);
+
+ first = r->the_request; /* use the request-line */
+
@@ -135,18 +135,18 @@
{
table *e = r->subprocess_env;
/* We're gonna consume all thats here */
diff -urN mod_fastcgi-2.4.2.org/fcgi_util.c mod_fastcgi-2.4.2/fcgi_util.c
--- mod_fastcgi-2.4.2.org/fcgi_util.c 2004-10-06 20:30:46.339893687 +0200
-+++ mod_fastcgi-2.4.2/fcgi_util.c 2004-10-06 21:33:50.378252215 +0200
++++ mod_fastcgi-2.4.2/fcgi_util.c 2004-10-06 21:34:57.435886690 +0200
@@ -55,7 +55,7 @@
fcgi_util_socket_hash_filename(pool *p, const char *path,
const char *user, const char *group)
}
q = p ;
-@@ -137,7 +137,7 @@
+@@ -137,12 +137,12 @@
int socket_pathLen = strlen(socket_path);
if (socket_pathLen >= sizeof((*socket_addr)->sun_path)) {
"\" is too long for a Domain socket", NULL);
}
+ if (*socket_addr == NULL)
+- *socket_addr = ap_pcalloc(p, sizeof(struct sockaddr_un));
++ *socket_addr = apr_pcalloc(p, sizeof(struct sockaddr_un));
+ else
+ memset(*socket_addr, 0, sizeof(struct sockaddr_un));
+
+@@ -194,7 +194,7 @@
+ int *socket_addr_len, const char *host, unsigned short port)
+ {
+ if (*socket_addr == NULL)
+- *socket_addr = ap_pcalloc(p, sizeof(struct sockaddr_in));
++ *socket_addr = apr_pcalloc(p, sizeof(struct sockaddr_in));
+ else
+ memset(*socket_addr, 0, sizeof(struct sockaddr_in));
+
@@ -204,7 +204,7 @@
/* Get an in_addr represention of the host */
if (host != NULL) {
if (stat(fs_path, finfo) < 0)
return ap_psprintf(p, "stat(%s) failed: %s", fs_path, strerror(errno));
}
+@@ -409,7 +409,7 @@
+ fcgi_server *
+ fcgi_util_fs_new(pool *p)
+ {
+- fcgi_server *s = (fcgi_server *) ap_pcalloc(p, sizeof(fcgi_server));
++ fcgi_server *s = (fcgi_server *) apr_pcalloc(p, sizeof(fcgi_server));
+
+ /* Initialize anything who's init state is not zeroizzzzed */
+ s->listenQueueDepth = FCGI_DEFAULT_LISTEN_Q;
+@@ -492,7 +492,7 @@
+ fcgi_util_fs_create_procs(pool *p, int num)
+ {
+ int i;
+- ServerProcess *proc = (ServerProcess *)ap_pcalloc(p, sizeof(ServerProcess) * num);
++ ServerProcess *proc = (ServerProcess *)apr_pcalloc(p, sizeof(ServerProcess) * num);
+
+ for (i = 0; i < num; i++) {
+ #ifdef WIN32
diff -urN mod_fastcgi-2.4.2.org/mod_fastcgi.c mod_fastcgi-2.4.2/mod_fastcgi.c
--- mod_fastcgi-2.4.2.org/mod_fastcgi.c 2004-10-06 20:30:46.355890260 +0200
-+++ mod_fastcgi-2.4.2/mod_fastcgi.c 2004-10-06 21:33:50.392249217 +0200
++++ mod_fastcgi-2.4.2/mod_fastcgi.c 2004-10-06 21:34:57.449883691 +0200
@@ -267,7 +267,7 @@
/* Register to reset to default values when the config pool is cleaned */
/*
* Based on internal redirect handling in mod_cgi.c...
*
+@@ -1019,7 +1019,7 @@
+ char *end = strchr(r->uri + 2, '/');
+
+ if (end)
+- *user = memcpy(ap_pcalloc(r->pool, end - r->uri), r->uri + 1, end - r->uri - 1);
++ *user = memcpy(apr_pcalloc(r->pool, end - r->uri), r->uri + 1, end - r->uri - 1);
+ else
+ *user = ap_pstrdup(r->pool, r->uri + 1);
+ *group = "-";
@@ -2318,7 +2318,7 @@
}
ap_unblock_alarms();
#ifdef WIN32
+@@ -2422,7 +2422,7 @@
+ const char *fs_path;
+ pool * const p = r->pool;
+ fcgi_server *fs;
+- fcgi_request * const fr = (fcgi_request *)ap_pcalloc(p, sizeof(fcgi_request));
++ fcgi_request * const fr = (fcgi_request *)apr_pcalloc(p, sizeof(fcgi_request));
+ uid_t uid;
+ gid_t gid;
+
@@ -2450,7 +2450,7 @@
else
#endif