rbb 99/06/02 11:45:07
Modified: include apr_general.h apr/file_io/beos dir.c fileacc.c filedup.c open.c pipe.c apr/file_io/unix dir.c fileacc.c filedup.c open.c pipe.c apr/include apr_lib.h apr_pools.h apr/lib Makefile.in apr_pools.c apr_snprintf.c apr/locks/beos crossproc.c intraproc.c locks.c apr/locks/unix crossproc.c intraproc.c locks.c apr/misc/unix Makefile.in start.c apr/network_io/beos poll.c sockets.c sockopt.c apr/network_io/unix poll.c sockets.c sockopt.c apr/test testfile.c testproc.c testsock.c apr/threadproc/beos proc.c thread.c threadpriv.c apr/threadproc/unix proc.c thread.c threadpriv.c apr/time/beos access.c time.c apr/time/unix access.c time.c Added: apr/misc/unix misc.h Log: Make ap_context_t an incomplete type. To do this, I had to change all the lib functions to use contexts instead of pools. This should have updated all of the platforms currently being supported, but everything other than unix needs to be tested. Revision Changes Path 1.13 +1 -6 apache-apr/include/apr_general.h Index: apr_general.h =================================================================== RCS file: /home/cvs/apache-apr/include/apr_general.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- apr_general.h 1999/05/25 03:22:08 1.12 +++ apr_general.h 1999/06/02 18:44:24 1.13 @@ -80,12 +80,7 @@ typedef off_t ap_off_t; -typedef struct context_t { - struct ap_pool_t *pool; - ap_int16_t signal_safe; - ap_int16_t cancel_safe; - void *prog_data; -} ap_context_t; +typedef struct context_t ap_context_t; /* Context functions */ ap_status_t ap_create_context(ap_context_t *, void *, ap_context_t **); 1.6 +6 -6 apache-apr/apr/file_io/beos/dir.c Index: dir.c =================================================================== RCS file: /home/cvs/apache-apr/apr/file_io/beos/dir.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- dir.c 1999/05/27 19:02:20 1.5 +++ dir.c 1999/06/02 18:44:26 1.6 @@ -74,7 +74,7 @@ ap_status_t ap_opendir(ap_context_t *cont, const char *dirname, ap_dir_t ** new) { - (*new) = (struct dir_t *)ap_palloc(cont->pool,sizeof(struct dir_t)); + (*new) = (struct dir_t *)ap_palloc(cont,sizeof(struct dir_t)); (*new)->cntxt = cont; (*new)->dirname = strdup(dirname); @@ -94,7 +94,7 @@ ap_status_t ap_closedir(struct dir_t *thedir) { if (dir_cleanup(thedir) == APR_SUCCESS) { - ap_kill_cleanup(thedir->cntxt->pool, thedir, dir_cleanup); + ap_kill_cleanup(thedir->cntxt, thedir, dir_cleanup); return APR_SUCCESS; } else { @@ -146,7 +146,7 @@ *size = -1; return APR_ENOFILE; } - fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", + fname = ap_pstrcat(thedir->cntxt, thedir->dirname, "/", thedir->entry->d_name, NULL); if (stat(fname, &filestat) == -1) { *size = -1; @@ -167,7 +167,7 @@ return APR_ENOFILE; } - fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", + fname = ap_pstrcat(thedir->cntxt, thedir->dirname, "/", thedir->entry->d_name, NULL); if (stat(fname, &filestat) == -1) { *time = -1; @@ -188,7 +188,7 @@ return APR_ENOFILE; } - fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", + fname = ap_pstrcat(thedir->cntxt, thedir->dirname, "/", thedir->entry->d_name, NULL); if (stat(fname, &filestat) == -1) { *type = APR_REG; @@ -214,7 +214,7 @@ ap_status_t ap_get_dir_filename(struct dir_t *thedir, char **new) { - (*new) = ap_pstrdup(thedir->cntxt->pool, thedir->entry->d_name); + (*new) = ap_pstrdup(thedir->cntxt, thedir->entry->d_name); return APR_SUCCESS; } 1.6 +1 -1 apache-apr/apr/file_io/beos/fileacc.c Index: fileacc.c =================================================================== RCS file: /home/cvs/apache-apr/apr/file_io/beos/fileacc.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- fileacc.c 1999/05/27 19:02:21 1.5 +++ fileacc.c 1999/06/02 18:44:26 1.6 @@ -64,7 +64,7 @@ ap_status_t ap_get_filename(struct file_t *thefile, char **new) { if (thefile != NULL) { - *new = (char*)ap_pstrdup(thefile->cntxt->pool, thefile->fname); + *new = (char*)ap_pstrdup(thefile->cntxt, thefile->fname); return APR_SUCCESS; } else { 1.6 +3 -3 apache-apr/apr/file_io/beos/filedup.c Index: filedup.c =================================================================== RCS file: /home/cvs/apache-apr/apr/file_io/beos/filedup.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- filedup.c 1999/05/27 19:02:21 1.5 +++ filedup.c 1999/06/02 18:44:27 1.6 @@ -60,7 +60,7 @@ ap_status_t ap_dupfile(struct file_t *old_file, struct file_t **new_file) { - (*new_file) = (struct file_t *)ap_palloc(old_file->cntxt->pool, + (*new_file) = (struct file_t *)ap_palloc(old_file->cntxt, sizeof(struct file_t)); if ((*new_file) == NULL) { @@ -68,7 +68,7 @@ } (*new_file)->cntxt = old_file->cntxt; (*new_file)->filedes = dup(old_file->filedes); - (*new_file)->fname = (char*)ap_pstrdup(old_file->cntxt->pool, old_file->fname); + (*new_file)->fname = (char*)ap_pstrdup(old_file->cntxt, old_file->fname); (*new_file)->buffered = old_file->buffered; (*new_file)->protection = old_file->protection; (*new_file)->user = old_file->user; @@ -77,6 +77,6 @@ (*new_file)->atime = old_file->atime; (*new_file)->mtime = old_file->mtime; (*new_file)->ctime = old_file->ctime; - ap_register_cleanup((*new_file)->cntxt->pool, (void *)(*new_file), file_cleanup, NULL); + ap_register_cleanup((*new_file)->cntxt, (void *)(*new_file), file_cleanup, NULL); return APR_SUCCESS; } 1.7 +3 -3 apache-apr/apr/file_io/beos/open.c Index: open.c =================================================================== RCS file: /home/cvs/apache-apr/apr/file_io/beos/open.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- open.c 1999/05/27 19:02:22 1.6 +++ open.c 1999/06/02 18:44:27 1.7 @@ -86,7 +86,7 @@ struct stat info; mode_t mode = get_fileperms(perm); - (*new) = (struct file_t *)ap_palloc(cont->pool, sizeof(struct file_t)); + (*new) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t)); (*new)->cntxt = cont; @@ -133,7 +133,7 @@ return errno; } if (ap_updatefileinfo(*new) == APR_SUCCESS) { - ap_register_cleanup((*new)->cntxt->pool, (void *)(*new), + ap_register_cleanup((*new)->cntxt, (void *)(*new), file_cleanup, NULL); return APR_SUCCESS; } @@ -146,7 +146,7 @@ ap_status_t ap_close(struct file_t * file) { if (file_cleanup(file) == APR_SUCCESS) { - ap_kill_cleanup(file->cntxt->pool, file, file_cleanup); + ap_kill_cleanup(file->cntxt, file, file_cleanup); return APR_SUCCESS; } else { 1.4 +2 -2 apache-apr/apr/file_io/beos/pipe.c Index: pipe.c =================================================================== RCS file: /home/cvs/apache-apr/apr/file_io/beos/pipe.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- pipe.c 1999/05/27 19:02:22 1.3 +++ pipe.c 1999/06/02 18:44:28 1.4 @@ -70,12 +70,12 @@ return errno; } - (*in) = (struct file_t *)ap_palloc(cont->pool, sizeof(struct file_t)); + (*in) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t)); (*in)->cntxt = cont; (*in)->filedes = filedes[0]; (*in)->fname = (char*)ap_pstrdup(cont->pool, "PIPE"); - (*out) = (struct file_t *)ap_palloc(cont->pool, sizeof(struct file_t)); + (*out) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t)); (*out)->cntxt = cont; (*out)->filedes = filedes[1]; (*out)->fname = (char*)ap_pstrdup(cont->pool, "PIPE"); 1.13 +7 -7 apache-apr/apr/file_io/unix/dir.c Index: dir.c =================================================================== RCS file: /home/cvs/apache-apr/apr/file_io/unix/dir.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- dir.c 1999/06/01 12:05:41 1.12 +++ dir.c 1999/06/02 18:44:32 1.13 @@ -80,7 +80,7 @@ */ ap_status_t ap_opendir(ap_context_t *cont, const char *dirname, struct dir_t **new) { - (*new) = (struct dir_t *)ap_palloc(cont->pool, sizeof(struct dir_t)); + (*new) = (struct dir_t *)ap_palloc(cont, sizeof(struct dir_t)); (*new)->cntxt = cont; (*new)->dirname = strdup(dirname); @@ -92,7 +92,7 @@ return errno; } else { - ap_register_cleanup((*new)->cntxt->pool, (void *)(*new), dir_cleanup, NULL); + ap_register_cleanup((*new)->cntxt, (void *)(*new), dir_cleanup, NULL); return APR_SUCCESS; } } @@ -107,7 +107,7 @@ ap_status_t rv; if ((rv = dir_cleanup(thedir)) == APR_SUCCESS) { - ap_kill_cleanup(thedir->cntxt->pool, thedir, dir_cleanup); + ap_kill_cleanup(thedir->cntxt, thedir, dir_cleanup); return APR_SUCCESS; } return rv; @@ -188,7 +188,7 @@ *size = -1; return APR_ENOFILE; } - fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", + fname = ap_pstrcat(thedir->cntxt, thedir->dirname, "/", thedir->entry->d_name, NULL); if (stat(fname, &filestat) == -1) { *size = -1; @@ -215,7 +215,7 @@ return APR_ENOFILE; } - fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", + fname = ap_pstrcat(thedir->cntxt, thedir->dirname, "/", thedir->entry->d_name, NULL); if (stat(fname, &filestat) == -1) { *time = -1; @@ -242,7 +242,7 @@ return APR_ENOFILE; } - fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", + fname = ap_pstrcat(thedir->cntxt, thedir->dirname, "/", thedir->entry->d_name, NULL); if (stat(fname, &filestat) == -1) { *type = APR_REG; @@ -274,7 +274,7 @@ */ ap_status_t ap_get_dir_filename(struct dir_t *thedir, char **new) { - (*new) = ap_pstrdup(thedir->cntxt->pool, thedir->entry->d_name); + (*new) = ap_pstrdup(thedir->cntxt, thedir->entry->d_name); return APR_SUCCESS; } 1.12 +1 -1 apache-apr/apr/file_io/unix/fileacc.c Index: fileacc.c =================================================================== RCS file: /home/cvs/apache-apr/apr/file_io/unix/fileacc.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- fileacc.c 1999/06/01 12:05:42 1.11 +++ fileacc.c 1999/06/02 18:44:33 1.12 @@ -72,7 +72,7 @@ ap_status_t ap_get_filename(struct file_t *thefile, char **new) { if (thefile != NULL) { - *new = ap_pstrdup(thefile->cntxt->pool, thefile->fname); + *new = ap_pstrdup(thefile->cntxt, thefile->fname); return APR_SUCCESS; } else { 1.15 +3 -3 apache-apr/apr/file_io/unix/filedup.c Index: filedup.c =================================================================== RCS file: /home/cvs/apache-apr/apr/file_io/unix/filedup.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- filedup.c 1999/06/01 12:05:42 1.14 +++ filedup.c 1999/06/02 18:44:33 1.15 @@ -67,7 +67,7 @@ */ ap_status_t ap_dupfile(struct file_t *old_file, struct file_t **new_file) { - (*new_file) = (struct file_t *)ap_palloc(old_file->cntxt->pool, + (*new_file) = (struct file_t *)ap_palloc(old_file->cntxt, sizeof(struct file_t)); if ((*new_file) == NULL) { @@ -75,7 +75,7 @@ } (*new_file)->cntxt = old_file->cntxt; (*new_file)->filedes = dup(old_file->filedes); - (*new_file)->fname = ap_pstrdup(old_file->cntxt->pool, old_file->fname); + (*new_file)->fname = ap_pstrdup(old_file->cntxt, old_file->fname); (*new_file)->buffered = old_file->buffered; (*new_file)->protection = old_file->protection; (*new_file)->user = old_file->user; @@ -84,7 +84,7 @@ (*new_file)->atime = old_file->atime; (*new_file)->mtime = old_file->mtime; (*new_file)->ctime = old_file->ctime; - ap_register_cleanup((*new_file)->cntxt->pool, (void *)(*new_file), file_cleanup, NULL); + ap_register_cleanup((*new_file)->cntxt, (void *)(*new_file), file_cleanup, NULL); return APR_SUCCESS; } 1.28 +3 -3 apache-apr/apr/file_io/unix/open.c Index: open.c =================================================================== RCS file: /home/cvs/apache-apr/apr/file_io/unix/open.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- open.c 1999/06/01 15:25:39 1.27 +++ open.c 1999/06/02 18:44:33 1.28 @@ -98,7 +98,7 @@ struct stat info; mode_t mode = get_fileperms(perm); - (*new) = (struct file_t *)ap_palloc(cont->pool, sizeof(struct file_t)); + (*new) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t)); (*new)->cntxt = cont; @@ -147,7 +147,7 @@ } if (ap_getfileinfo(*new) == APR_SUCCESS) { - ap_register_cleanup((*new)->cntxt->pool, (void *)(*new), file_cleanup, NULL); + ap_register_cleanup((*new)->cntxt, (void *)(*new), file_cleanup, NULL); return APR_SUCCESS; } else { @@ -166,7 +166,7 @@ ap_status_t rv; if ((rv = file_cleanup(file)) == APR_SUCCESS) { - ap_kill_cleanup(file->cntxt->pool, file, file_cleanup); + ap_kill_cleanup(file->cntxt, file, file_cleanup); return APR_SUCCESS; } return rv; 1.11 +4 -4 apache-apr/apr/file_io/unix/pipe.c Index: pipe.c =================================================================== RCS file: /home/cvs/apache-apr/apr/file_io/unix/pipe.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- pipe.c 1999/05/26 13:46:54 1.10 +++ pipe.c 1999/06/02 18:44:33 1.11 @@ -71,15 +71,15 @@ return errno; } - (*in) = (struct file_t *)ap_palloc(cont->pool, sizeof(struct file_t)); + (*in) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t)); (*in)->cntxt = cont; (*in)->filedes = filedes[0]; - (*in)->fname = ap_pstrdup(cont->pool, "PIPE"); + (*in)->fname = ap_pstrdup(cont, "PIPE"); - (*out) = (struct file_t *)ap_palloc(cont->pool, sizeof(struct file_t)); + (*out) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t)); (*out)->cntxt = cont; (*out)->filedes = filedes[1]; - (*out)->fname = ap_pstrdup(cont->pool, "PIPE"); + (*out)->fname = ap_pstrdup(cont, "PIPE"); return APR_SUCCESS; } 1.8 +20 -20 apache-apr/apr/include/apr_lib.h Index: apr_lib.h =================================================================== RCS file: /home/cvs/apache-apr/apr/include/apr_lib.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- apr_lib.h 1999/06/01 18:15:16 1.7 +++ apr_lib.h 1999/06/02 18:44:35 1.8 @@ -54,7 +54,7 @@ * project, please see <http://www.apache.org/>. * * The ap_vsnprintf/ap_snprintf functions are based on, and used with the - * permission of, the SIO stdio-replacement strx_* functions by Panos + * permission of, the SIO stdiocntxteplacement strx_* functions by Panos * Tsirigotis <[EMAIL PROTECTED]> for xinetd. * * This header file defines the public interfaces for the APR general-purpose @@ -88,7 +88,7 @@ typedef struct ap_child_info_t ap_child_info_t; typedef void ap_mutex_t; typedef struct ap_array_header_t { - ap_pool_t *pool; + ap_context_t *cont; int elt_size; int nelts; int nalloc; @@ -231,32 +231,32 @@ API_EXPORT(ap_pool_t *) ap_find_pool(const void *ts); API_EXPORT(int) ap_pool_is_ancestor(ap_pool_t *a, ap_pool_t *b); API_EXPORT(void) ap_pool_join(ap_pool_t *p, ap_pool_t *sub); -API_EXPORT(void *) ap_palloc(ap_pool_t *p, int reqsize); -API_EXPORT(void *) ap_pcalloc(ap_pool_t *p, int size); -API_EXPORT(char *) ap_pstrdup(ap_pool_t *p, const char *s); -API_EXPORT(char *) ap_pstrndup(ap_pool_t *p, const char *s, int n); -API_EXPORT_NONSTD(char *) ap_pstrcat(ap_pool_t *p, ...); -API_EXPORT(char *) ap_pvsprintf(ap_pool_t *p, const char *fmt, va_list ap); -API_EXPORT_NONSTD(char *) ap_psprintf(ap_pool_t *p, const char *fmt, ...); -API_EXPORT(ap_array_header_t *) ap_make_array(ap_pool_t *p, int nelts, +API_EXPORT(void *) ap_palloc(struct context_t *c, int reqsize); +API_EXPORT(void *) ap_pcalloc(struct context_t *p, int size); +API_EXPORT(char *) ap_pstrdup(struct context_t *p, const char *s); +API_EXPORT(char *) ap_pstrndup(struct context_t *p, const char *s, int n); +API_EXPORT_NONSTD(char *) ap_pstrcat(struct context_t *p, ...); +API_EXPORT(char *) ap_pvsprintf(struct context_t *p, const char *fmt, va_list ap); +API_EXPORT_NONSTD(char *) ap_psprintf(struct context_t *p, const char *fmt, ...); +API_EXPORT(ap_array_header_t *) ap_make_array(struct context_t *p, int nelts, int elt_size); API_EXPORT(void *) ap_push_array(ap_array_header_t *arr); API_EXPORT(void) ap_array_cat(ap_array_header_t *dst, const ap_array_header_t *src); -API_EXPORT(ap_array_header_t *) ap_copy_array(ap_pool_t *p, +API_EXPORT(ap_array_header_t *) ap_copy_array(struct context_t *p, const ap_array_header_t *arr); API_EXPORT(ap_array_header_t *) - ap_copy_array_hdr(ap_pool_t *p, + ap_copy_array_hdr(struct context_t *p, const ap_array_header_t *arr); API_EXPORT(ap_array_header_t *) - ap_append_arrays(ap_pool_t *p, + ap_append_arrays(struct context_t *p, const ap_array_header_t *first, const ap_array_header_t *second); -API_EXPORT(char *) ap_array_pstrcat(ap_pool_t *p, +API_EXPORT(char *) ap_array_pstrcat(struct context_t *p, const ap_array_header_t *arr, const char sep); -API_EXPORT(ap_table_t *) ap_make_table(ap_pool_t *p, int nelts); -API_EXPORT(ap_table_t *) ap_copy_table(ap_pool_t *p, const ap_table_t *t); +API_EXPORT(ap_table_t *) ap_make_table(struct context_t *p, int nelts); +API_EXPORT(ap_table_t *) ap_copy_table(struct context_t *p, const ap_table_t *t); API_EXPORT(void) ap_clear_table(ap_table_t *t); API_EXPORT(const char *) ap_table_get(const ap_table_t *t, const char *key); API_EXPORT(void) ap_table_set(ap_table_t *t, const char *key, @@ -272,7 +272,7 @@ const char *val); API_EXPORT(void) ap_table_addn(ap_table_t *t, const char *key, const char *val); -API_EXPORT(ap_table_t *) ap_overlay_tables(ap_pool_t *p, +API_EXPORT(ap_table_t *) ap_overlay_tables(struct context_t *p, const ap_table_t *overlay, const ap_table_t *base); API_EXPORT(void) @@ -280,12 +280,12 @@ void *rec, const ap_table_t *t, ...); API_EXPORT(void) ap_overlap_tables(ap_table_t *a, const ap_table_t *b, unsigned flags); -API_EXPORT(void) ap_register_cleanup(ap_pool_t *p, void *data, +API_EXPORT(void) ap_register_cleanup(struct context_t *p, void *data, ap_status_t (*plain_cleanup) (void *), ap_status_t (*child_cleanup) (void *)); -API_EXPORT(void) ap_kill_cleanup(ap_pool_t *p, void *data, +API_EXPORT(void) ap_kill_cleanup(struct context_t *p, void *data, ap_status_t (*cleanup) (void *)); -API_EXPORT(void) ap_run_cleanup(ap_pool_t *p, void *data, +API_EXPORT(void) ap_run_cleanup(struct context_t *p, void *data, ap_status_t (*cleanup) (void *)); API_EXPORT(void) ap_cleanup_for_exec(void); API_EXPORT_NONSTD(void) ap_null_cleanup(void *data); 1.4 +2 -2 apache-apr/apr/include/apr_pools.h Index: apr_pools.h =================================================================== RCS file: /home/cvs/apache-apr/apr/include/apr_pools.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- apr_pools.h 1999/06/01 15:09:41 1.3 +++ apr_pools.h 1999/06/02 18:44:36 1.4 @@ -162,7 +162,7 @@ /* routines to allocate memory from an pool... */ -API_EXPORT_NONSTD(char *) ap_psprintf(ap_pool_t *, const char *fmt, ...) +API_EXPORT_NONSTD(char *) ap_psprintf(struct context_t *, const char *fmt, ...) __attribute__((format(printf,2,3))); /* array and alist management... keeping lists of things. @@ -291,7 +291,7 @@ * to call in the child, and an argument to be passed to the function. */ -API_EXPORT(void) ap_note_subprocess(ap_pool_t *a, pid_t pid, +API_EXPORT(void) ap_note_subprocess(struct context_t *a, pid_t pid, enum kill_conditions how); /* magic numbers --- min free bytes to consider a free pool block useable, 1.8 +2 -1 apache-apr/apr/lib/Makefile.in Index: Makefile.in =================================================================== RCS file: /home/cvs/apache-apr/apr/lib/Makefile.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Makefile.in 1999/05/10 20:11:39 1.7 +++ Makefile.in 1999/06/02 18:44:37 1.8 @@ -10,7 +10,8 @@ [EMAIL PROTECTED]@ $(LDLIBS) INCDIR=../include INCDIR1=../../include -INCLUDES=-I$(INCDIR) -I$(INCDIR1) +INCDIR2=../misc/@OSDIR@ +INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I$(INCDIR2) LIB=libapr.a 1.6 +51 -47 apache-apr/apr/lib/apr_pools.c Index: apr_pools.c =================================================================== RCS file: /home/cvs/apache-apr/apr/lib/apr_pools.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- apr_pools.c 1999/06/01 18:15:35 1.5 +++ apr_pools.c 1999/06/02 18:44:37 1.6 @@ -71,6 +71,7 @@ #include "apr_general.h" #include "apr_pools.h" #include "apr_lib.h" +#include "misc.h" /* * Debugging support: Define this to enable code which helps detect re-use @@ -720,9 +721,10 @@ */ -API_EXPORT(void *) ap_palloc(ap_pool_t *a, int reqsize) +API_EXPORT(void *) ap_palloc(struct context_t *c, int reqsize) { #ifdef ALLOC_USE_MALLOC + ap_pool_t *a = c->pool; int size = reqsize + CLICK_SZ; void *ptr; @@ -743,7 +745,7 @@ * Round up requested size to an even number of alignment units * (core clicks) */ - + ap_pool_t *a = c->pool; int nclicks = 1 + ((reqsize - 1) / CLICK_SZ); int size = nclicks * CLICK_SZ; @@ -793,14 +795,14 @@ #endif } -API_EXPORT(void *) ap_pcalloc(ap_pool_t *a, int size) +API_EXPORT(void *) ap_pcalloc(struct context_t *a, int size) { void *res = ap_palloc(a, size); memset(res, '\0', size); return res; } -API_EXPORT(char *) ap_pstrdup(ap_pool_t *a, const char *s) +API_EXPORT(char *) ap_pstrdup(struct context_t *a, const char *s) { char *res; size_t len; @@ -814,7 +816,7 @@ return res; } -API_EXPORT(char *) ap_pstrndup(ap_pool_t *a, const char *s, int n) +API_EXPORT(char *) ap_pstrndup(struct context_t *a, const char *s, int n) { char *res; @@ -827,7 +829,7 @@ return res; } -API_EXPORT_NONSTD(char *) ap_pstrcat(ap_pool_t *a, ...) +API_EXPORT_NONSTD(char *) ap_pstrcat(struct context_t *a, ...) { char *cp, *argp, *res; @@ -944,9 +946,10 @@ #endif } -API_EXPORT(char *) ap_pvsprintf(ap_pool_t *p, const char *fmt, va_list ap) +API_EXPORT(char *) ap_pvsprintf(struct context_t *c, const char *fmt, va_list ap) { #ifdef ALLOC_USE_MALLOC + ap_pool_t *p = c->pool; struct psprintf_data ps; void *ptr; @@ -976,6 +979,7 @@ struct psprintf_data ps; char *strp; int size; + ap_pool_t *p = c->pool; ap_block_alarms(); ps.blok = p->last; @@ -1007,7 +1011,7 @@ #endif } -API_EXPORT_NONSTD(char *) ap_psprintf(ap_pool_t *p, const char *fmt, ...) +API_EXPORT_NONSTD(char *) ap_psprintf(struct context_t *p, const char *fmt, ...) { va_list ap; char *res; @@ -1023,7 +1027,7 @@ * The 'array' functions... */ -static void make_array_core(ap_array_header_t *res, ap_pool_t *p, +static void make_array_core(ap_array_header_t *res, struct context_t *c, int nelts, int elt_size) { /* @@ -1034,15 +1038,15 @@ nelts = 1; } - res->elts = ap_pcalloc(p, nelts * elt_size); + res->elts = ap_pcalloc(c, nelts * elt_size); - res->pool = p; + res->cont = c; res->elt_size = elt_size; res->nelts = 0; /* No active elements yet... */ res->nalloc = nelts; /* ...but this many allocated */ } -API_EXPORT(ap_array_header_t *) ap_make_array(ap_pool_t *p, +API_EXPORT(ap_array_header_t *) ap_make_array(struct context_t *p, int nelts, int elt_size) { ap_array_header_t *res; @@ -1058,7 +1062,7 @@ int new_size = (arr->nalloc <= 0) ? 1 : arr->nalloc * 2; char *new_data; - new_data = ap_pcalloc(arr->pool, arr->elt_size * new_size); + new_data = ap_pcalloc(arr->cont, arr->elt_size * new_size); memcpy(new_data, arr->elts, arr->nalloc * arr->elt_size); arr->elts = new_data; @@ -1082,7 +1086,7 @@ new_size *= 2; } - new_data = ap_pcalloc(dst->pool, elt_size * new_size); + new_data = ap_pcalloc(dst->cont, elt_size * new_size); memcpy(new_data, dst->elts, dst->nalloc * elt_size); dst->elts = new_data; @@ -1094,7 +1098,7 @@ dst->nelts += src->nelts; } -API_EXPORT(ap_array_header_t *) ap_copy_array(ap_pool_t *p, +API_EXPORT(ap_array_header_t *) ap_copy_array(struct context_t *p, const ap_array_header_t *arr) { ap_array_header_t *res = ap_make_array(p, arr->nalloc, arr->elt_size); @@ -1121,13 +1125,13 @@ } API_EXPORT(ap_array_header_t *) - ap_copy_array_hdr(ap_pool_t *p, + ap_copy_array_hdr(struct context_t *p, const ap_array_header_t *arr) { ap_array_header_t *res; res = (ap_array_header_t *) ap_palloc(p, sizeof(ap_array_header_t)); - res->pool = p; + res->cont = p; copy_array_hdr_core(res, arr); return res; } @@ -1135,7 +1139,7 @@ /* The above is used here to avoid consing multiple new array bodies... */ API_EXPORT(ap_array_header_t *) - ap_append_arrays(ap_pool_t *p, + ap_append_arrays(struct context_t *p, const ap_array_header_t *first, const ap_array_header_t *second) { @@ -1151,7 +1155,7 @@ * or if there are no elements in the array. * If sep is non-NUL, it will be inserted between elements as a separator. */ -API_EXPORT(char *) ap_array_pstrcat(ap_pool_t *p, +API_EXPORT(char *) ap_array_pstrcat(struct context_t *p, const ap_array_header_t *arr, const char sep) { @@ -1230,7 +1234,7 @@ #endif /* MAKE_TABLE_PROFILE */ -API_EXPORT(ap_table_t *) ap_make_table(ap_pool_t *p, int nelts) +API_EXPORT(ap_table_t *) ap_make_table(struct context_t *p, int nelts) { ap_table_t *t = ap_palloc(p, sizeof(ap_table_t)); @@ -1241,7 +1245,7 @@ return t; } -API_EXPORT(ap_table_t *) ap_copy_table(ap_pool_t *p, const ap_table_t *t) +API_EXPORT(ap_table_t *) ap_copy_table(struct context_t *p, const ap_table_t *t) { ap_table_t *new = ap_palloc(p, sizeof(ap_table_t)); @@ -1293,7 +1297,7 @@ for (i = 0; i < t->a.nelts; ) { if (!strcasecmp(elts[i].key, key)) { if (!done) { - elts[i].val = ap_pstrdup(t->a.pool, val); + elts[i].val = ap_pstrdup(t->a.cont, val); done = 1; ++i; } @@ -1312,8 +1316,8 @@ if (!done) { elts = (ap_table_entry_t *) table_push(t); - elts->key = ap_pstrdup(t->a.pool, key); - elts->val = ap_pstrdup(t->a.pool, val); + elts->key = ap_pstrdup(t->a.cont, key); + elts->val = ap_pstrdup(t->a.cont, val); } } @@ -1397,14 +1401,14 @@ for (i = 0; i < t->a.nelts; ++i) { if (!strcasecmp(elts[i].key, key)) { - elts[i].val = ap_pstrcat(t->a.pool, elts[i].val, ", ", val, NULL); + elts[i].val = ap_pstrcat(t->a.cont, elts[i].val, ", ", val, NULL); return; } } elts = (ap_table_entry_t *) table_push(t); - elts->key = ap_pstrdup(t->a.pool, key); - elts->val = ap_pstrdup(t->a.pool, val); + elts->key = ap_pstrdup(t->a.cont, key); + elts->val = ap_pstrdup(t->a.cont, val); } API_EXPORT(void) ap_table_mergen(ap_table_t *t, const char *key, @@ -1428,7 +1432,7 @@ for (i = 0; i < t->a.nelts; ++i) { if (!strcasecmp(elts[i].key, key)) { - elts[i].val = ap_pstrcat(t->a.pool, elts[i].val, ", ", val, NULL); + elts[i].val = ap_pstrcat(t->a.cont, elts[i].val, ", ", val, NULL); return; } } @@ -1444,8 +1448,8 @@ ap_table_entry_t *elts = (ap_table_entry_t *) t->a.elts; elts = (ap_table_entry_t *) table_push(t); - elts->key = ap_pstrdup(t->a.pool, key); - elts->val = ap_pstrdup(t->a.pool, val); + elts->key = ap_pstrdup(t->a.cont, key); + elts->val = ap_pstrdup(t->a.cont, val); } API_EXPORT(void) ap_table_addn(ap_table_t *t, const char *key, @@ -1471,7 +1475,7 @@ elts->val = (char *)val; } -API_EXPORT(ap_table_t *) ap_overlay_tables(ap_pool_t *p, +API_EXPORT(ap_table_t *) ap_overlay_tables(struct context_t *p, const ap_table_t *overlay, const ap_table_t *base) { @@ -1482,12 +1486,12 @@ * overlay->a.pool and base->a.pool have a life span at least * as long as p */ - if (!ap_pool_is_ancestor(overlay->a.pool, p)) { + if (!ap_pool_is_ancestor(overlay->a.pool, p->pool)) { fprintf(stderr, "overlay_tables: overlay's pool is not an ancestor of p\n"); abort(); } - if (!ap_pool_is_ancestor(base->a.pool, p)) { + if (!ap_pool_is_ancestor(base->a.pool, p->pool)) { fprintf(stderr, "overlay_tables: base's pool is not an ancestor of p\n"); abort(); @@ -1496,7 +1500,7 @@ res = ap_palloc(p, sizeof(ap_table_t)); /* behave like append_arrays */ - res->a.pool = p; + res->a.cont = p; copy_array_hdr_core(&res->a, &overlay->a); ap_array_cat(&res->a, &base->a); @@ -1600,7 +1604,7 @@ /* XXX: could use scratch free space in a or b's pool instead... * which could save an allocation in b's pool. */ - cat_keys = ap_palloc(b->a.pool, sizeof(overlap_key) * nkeys); + cat_keys = ap_palloc(b->a.cont, sizeof(overlap_key) * nkeys); } nkeys = 0; @@ -1635,7 +1639,7 @@ */ a->a.nelts = 0; if (a->a.nalloc < nkeys) { - a->a.elts = ap_palloc(a->a.pool, a->a.elt_size * nkeys * 2); + a->a.elts = ap_palloc(a->a.cont, a->a.elt_size * nkeys * 2); a->a.nalloc = nkeys * 2; } @@ -1677,7 +1681,7 @@ } while (right < last && !strcasecmp(left->key, right->key)); /* right points one past the last header to merge */ - value = ap_palloc(a->a.pool, len + 1); + value = ap_palloc(a->a.cont, len + 1); strp = value; for (;;) { memcpy(strp, left->val, left->order); @@ -1720,7 +1724,7 @@ struct cleanup *next; }; -API_EXPORT(void) ap_register_cleanup(ap_pool_t *p, void *data, +API_EXPORT(void) ap_register_cleanup(struct context_t *p, void *data, ap_status_t (*plain_cleanup) (void *), ap_status_t (*child_cleanup) (void *)) { @@ -1729,15 +1733,15 @@ c->data = data; c->plain_cleanup = plain_cleanup; c->child_cleanup = child_cleanup; - c->next = p->cleanups; - p->cleanups = c; + c->next = p->pool->cleanups; + p->pool->cleanups = c; } -API_EXPORT(void) ap_kill_cleanup(ap_pool_t *p, void *data, +API_EXPORT(void) ap_kill_cleanup(struct context_t *p, void *data, ap_status_t (*cleanup) (void *)) { - struct cleanup *c = p->cleanups; - struct cleanup **lastp = &p->cleanups; + struct cleanup *c = p->pool->cleanups; + struct cleanup **lastp = &p->pool->cleanups; while (c) { if (c->data == data && c->plain_cleanup == cleanup) { @@ -1750,7 +1754,7 @@ } } -API_EXPORT(void) ap_run_cleanup(ap_pool_t *p, void *data, +API_EXPORT(void) ap_run_cleanup(struct context_t *p, void *data, ap_status_t (*cleanup) (void *)) { ap_block_alarms(); /* Run cleanup only once! */ @@ -2114,7 +2118,7 @@ * generic interface, but for now, it's a special case */ -API_EXPORT(void) ap_note_subprocess(ap_pool_t *a, pid_t pid, +API_EXPORT(void) ap_note_subprocess(struct context_t *a, pid_t pid, enum kill_conditions how) { struct process_chain *new = @@ -2122,8 +2126,8 @@ new->pid = pid; new->kill_how = how; - new->next = a->subprocesses; - a->subprocesses = new; + new->next = a->pool->subprocesses; + a->pool->subprocesses = new; } #ifdef WIN32 1.4 +1 -1 apache-apr/apr/lib/apr_snprintf.c Index: apr_snprintf.c =================================================================== RCS file: /home/cvs/apache-apr/apr/lib/apr_snprintf.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- apr_snprintf.c 1999/06/01 18:15:37 1.3 +++ apr_snprintf.c 1999/06/02 18:44:38 1.4 @@ -54,7 +54,7 @@ * project, please see <http://www.apache.org/>. * * This code is based on, and used with the permission of, the - * SIO stdio-replacement strx_* functions by Panos Tsirigotis + * SIO stdiocntxteplacement strx_* functions by Panos Tsirigotis * <[EMAIL PROTECTED]> for xinetd. */ 1.3 +4 -4 apache-apr/apr/locks/beos/crossproc.c Index: crossproc.c =================================================================== RCS file: /home/cvs/apache-apr/apr/locks/beos/crossproc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- crossproc.c 1999/05/27 19:02:31 1.2 +++ crossproc.c 1999/06/02 18:44:39 1.3 @@ -69,8 +69,8 @@ ap_status_t create_inter_lock(ap_lock_t *new) { - new->sem_interproc = (sem_id)ap_palloc(new->cntxt->pool, sizeof(sem_id)); - new->ben_interproc = (int32)ap_palloc(new->cntxt->pool, sizeof(int32)); + new->sem_interproc = (sem_id)ap_palloc(new->cntxt, sizeof(sem_id)); + new->ben_interproc = (int32)ap_palloc(new->cntxt, sizeof(int32)); new->ben_interproc = 0; new->sem_interproc = create_sem(0, "ap_intraproc"); @@ -79,7 +79,7 @@ return errno; } new->curr_locked == 0; - ap_register_cleanup(new->cntxt->pool, (void *)new, lock_inter_cleanup, NULL); + ap_register_cleanup(new->cntxt, (void *)new, lock_inter_cleanup, NULL); return APR_SUCCESS; } @@ -109,7 +109,7 @@ { ap_status_t stat; if ((stat = lock_inter_cleanup(lock)) == APR_SUCCESS) { - ap_kill_cleanup(lock->cntxt->pool, lock, lock_inter_cleanup); + ap_kill_cleanup(lock->cntxt, lock, lock_inter_cleanup); return APR_SUCCESS; } return stat; 1.3 +4 -4 apache-apr/apr/locks/beos/intraproc.c Index: intraproc.c =================================================================== RCS file: /home/cvs/apache-apr/apr/locks/beos/intraproc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- intraproc.c 1999/05/27 19:02:31 1.2 +++ intraproc.c 1999/06/02 18:44:39 1.3 @@ -75,8 +75,8 @@ ap_status_t create_intra_lock(struct lock_t *new) { int32 stat; - new->sem_intraproc = (sem_id)ap_palloc(new->cntxt->pool, sizeof(sem_id)); - new->ben_intraproc = (int32)ap_palloc(new->cntxt->pool, sizeof(int32)); + new->sem_intraproc = (sem_id)ap_palloc(new->cntxt, sizeof(sem_id)); + new->ben_intraproc = (int32)ap_palloc(new->cntxt, sizeof(int32)); new->ben_intraproc = 0; stat = create_sem(0, "ap_intraproc"); @@ -86,7 +86,7 @@ } new->sem_intraproc = stat; new->curr_locked == 0; - ap_register_cleanup(new->cntxt->pool, (void *)new, lock_intra_cleanup, NULL); + ap_register_cleanup(new->cntxt, (void *)new, lock_intra_cleanup, NULL); return APR_SUCCESS; } @@ -115,7 +115,7 @@ { ap_status_t stat; if ((stat = lock_intra_cleanup(lock)) == APR_SUCCESS) { - ap_kill_cleanup(lock->cntxt->pool, lock, lock_intra_cleanup); + ap_kill_cleanup(lock->cntxt, lock, lock_intra_cleanup); return APR_SUCCESS; } return stat; 1.3 +2 -2 apache-apr/apr/locks/beos/locks.c Index: locks.c =================================================================== RCS file: /home/cvs/apache-apr/apr/locks/beos/locks.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- locks.c 1999/05/27 19:02:31 1.2 +++ locks.c 1999/06/02 18:44:39 1.3 @@ -64,13 +64,13 @@ struct lock_t *new; ap_status_t stat; - new = (struct lock_t *)ap_palloc(cont->pool, sizeof(struct lock_t)); + new = (struct lock_t *)ap_palloc(cont, sizeof(struct lock_t)); if (new == NULL){ return APR_ENOMEM; } new->cntxt = cont; - if (new->cntxt->pool == NULL){ + if (new->cntxt == NULL){ printf ("null pool\n"); return APR_ENOMEM; } 1.7 +8 -8 apache-apr/apr/locks/unix/crossproc.c Index: crossproc.c =================================================================== RCS file: /home/cvs/apache-apr/apr/locks/unix/crossproc.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- crossproc.c 1999/05/24 18:16:34 1.6 +++ crossproc.c 1999/06/02 18:44:40 1.7 @@ -95,7 +95,7 @@ new->op_off.sem_flg = SEM_UNDO; new->curr_locked == 0; - ap_register_cleanup(new->cntxt->pool, (void *)new, lock_cleanup, NULL); + ap_register_cleanup(new->cntxt, (void *)new, lock_cleanup, NULL); return APR_SUCCESS; } @@ -122,7 +122,7 @@ ap_status_t stat; if ((stat = lock_cleanup(lock)) == APR_SUCCESS) { - ap_kill_cleanup(lock->cntxt->pool, lock, lock_cleanup); + ap_kill_cleanup(lock->cntxt, lock, lock_cleanup); return APR_SUCCESS; } return stat; @@ -181,7 +181,7 @@ } new->curr_locked == 0; - ap_register_cleanup(new->cntxt->pool, (void *)new, lock_cleanup, NULL); + ap_register_cleanup(new->cntxt, (void *)new, lock_cleanup, NULL); return APR_SUCCESS; } @@ -210,7 +210,7 @@ { ap_status_t stat; if ((stat = lock_cleanup(lock)) == APR_SUCCESS) { - ap_kill_cleanup(lock->cntxt->pool, lock, lock_cleanup); + ap_kill_cleanup(lock->cntxt, lock, lock_cleanup); return APR_SUCCESS; } return stat; @@ -251,7 +251,7 @@ new->curr_locked == 0; unlink(new->fname); - ap_register_cleanup(new->cntxt->pool, (void *)new, lock_cleanup, NULL); + ap_register_cleanup(new->cntxt, (void *)new, lock_cleanup, NULL); return APR_SUCCESS; } @@ -277,7 +277,7 @@ { ap_status_t stat; if ((stat = lock_cleanup(lock)) == APR_SUCCESS) { - ap_kill_cleanup(lock->cntxt->pool, lock, lock_cleanup); + ap_kill_cleanup(lock->cntxt, lock, lock_cleanup); return APR_SUCCESS; } return stat; @@ -305,7 +305,7 @@ return errno; } new->curr_locked == 0; - ap_register_cleanup(new->cntxt->pool, (void *)new, lock_cleanup, NULL); + ap_register_cleanup(new->cntxt, (void *)new, lock_cleanup, NULL); return APR_SUCCESS; } @@ -331,7 +331,7 @@ { ap_status_t stat; if ((stat = lock_cleanup(lock)) == APR_SUCCESS) { - ap_kill_cleanup(lock->cntxt->pool, lock, lock_cleanup); + ap_kill_cleanup(lock->cntxt, lock, lock_cleanup); return APR_SUCCESS; } return stat; 1.7 +3 -3 apache-apr/apr/locks/unix/intraproc.c Index: intraproc.c =================================================================== RCS file: /home/cvs/apache-apr/apr/locks/unix/intraproc.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- intraproc.c 1999/05/24 18:16:37 1.6 +++ intraproc.c 1999/06/02 18:44:41 1.7 @@ -75,7 +75,7 @@ ap_status_t stat; pthread_mutexattr_t mattr; - new->intraproc = (pthread_mutex_t *)ap_palloc(new->cntxt->pool, + new->intraproc = (pthread_mutex_t *)ap_palloc(new->cntxt, sizeof(pthread_mutex_t)); if (new->intraproc == NULL ) { return errno; @@ -96,7 +96,7 @@ } new->curr_locked == 0; - ap_register_cleanup(new->cntxt->pool, (void *)new, lock_intra_cleanup, NULL); + ap_register_cleanup(new->cntxt, (void *)new, lock_intra_cleanup, NULL); return APR_SUCCESS; } @@ -126,7 +126,7 @@ { ap_status_t stat; if ((stat = lock_intra_cleanup(lock)) == APR_SUCCESS) { - ap_kill_cleanup(lock->cntxt->pool, lock, lock_intra_cleanup); + ap_kill_cleanup(lock->cntxt, lock, lock_intra_cleanup); return APR_SUCCESS; } return stat; 1.8 +1 -1 apache-apr/apr/locks/unix/locks.c Index: locks.c =================================================================== RCS file: /home/cvs/apache-apr/apr/locks/unix/locks.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- locks.c 1999/05/24 18:16:40 1.7 +++ locks.c 1999/06/02 18:44:41 1.8 @@ -62,7 +62,7 @@ struct lock_t *new; ap_status_t stat; - new = (struct lock_t *)ap_palloc(cont->pool, sizeof(struct lock_t)); + new = (struct lock_t *)ap_palloc(cont, sizeof(struct lock_t)); new->cntxt = cont; new->type = type; 1.2 +1 -0 apache-apr/apr/misc/unix/Makefile.in Index: Makefile.in =================================================================== RCS file: /home/cvs/apache-apr/apr/misc/unix/Makefile.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile.in 1999/05/12 20:32:08 1.1 +++ Makefile.in 1999/06/02 18:44:44 1.2 @@ -16,6 +16,7 @@ LIB=../libmisc.a OBJS=start.o \ + temp.o .c.o: $(CC) $(CFLAGS) -c $(INCLUDES) $< 1.5 +15 -7 apache-apr/apr/misc/unix/start.c Index: start.c =================================================================== RCS file: /home/cvs/apache-apr/apr/misc/unix/start.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- start.c 1999/05/25 03:22:06 1.4 +++ start.c 1999/06/02 18:44:48 1.5 @@ -56,12 +56,13 @@ #include "apr_general.h" #include "apr_errno.h" #include "apr_pools.h" +#include "misc.h" #include <errno.h> #include <string.h> -ap_status_t ap_create_context(ap_context_t *cont, void *data, ap_context_t **newcont) +ap_status_t ap_create_context(struct context_t *cont, void *data, ap_context_t **newcont) { - ap_context_t *new; + struct context_t *new; ap_pool_t *pool; if (cont) { @@ -73,8 +74,15 @@ if (pool == NULL) { return APR_ENOPOOL; - } - new = (ap_context_t *)ap_palloc(pool, sizeof(ap_context_t)); + } + + if (cont) { + new = (struct context_t *)ap_palloc(cont, sizeof(struct context_t)); + } + else { + new = (struct context_t *)malloc(sizeof(struct context_t)); + } + new->pool = pool; if (data == NULL && cont) { new->prog_data = cont->prog_data; @@ -95,7 +103,7 @@ return APR_SUCCESS; } -ap_status_t ap_set_signal_safe(ap_context_t *cont, ap_int16_t safe) +ap_status_t ap_set_signal_safe(struct context_t *cont, ap_int16_t safe) { if (cont) { cont->signal_safe = safe; @@ -104,7 +112,7 @@ return APR_ENOCONT; } -ap_status_t ap_set_cancel_safe(ap_context_t *cont, ap_int16_t safe) +ap_status_t ap_set_cancel_safe(struct context_t *cont, ap_int16_t safe) { if (cont) { cont->cancel_safe = safe; @@ -113,7 +121,7 @@ return APR_ENOCONT; } -ap_status_t ap_destroy_context(ap_context_t *cont) +ap_status_t ap_destroy_context(struct context_t *cont) { ap_destroy_pool(cont->pool); return APR_SUCCESS; 1.1 apache-apr/apr/misc/unix/misc.h Index: misc.h =================================================================== /* ==================================================================== * Copyright (c) 1999 The Apache Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the Apache Group * for use in the Apache HTTP server project (http://www.apache.org/)." * * 4. The names "Apache Server" and "Apache Group" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the Apache Group * for use in the Apache HTTP server project (http://www.apache.org/)." * * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Group. * For more information on the Apache Group and the Apache HTTP server * project, please see <http://www.apache.org/>. * */ #ifndef MISC_H #define MISC_H #include "apr_general.h" #include "apr_file_io.h" #include "apr_errno.h" struct context_t { struct ap_pool_t *pool; ap_int16_t signal_safe; ap_int16_t cancel_safe; void *prog_data; }; #endif /* ! MISC_H */ 1.4 +2 -2 apache-apr/apr/network_io/beos/poll.c Index: poll.c =================================================================== RCS file: /home/cvs/apache-apr/apr/network_io/beos/poll.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- poll.c 1999/05/27 19:02:34 1.3 +++ poll.c 1999/06/02 18:44:49 1.4 @@ -66,7 +66,7 @@ ap_status_t ap_setup_poll(ap_context_t *cont, ap_int32_t num, struct pollfd_t **new) { - (*new) = (struct pollfd_t *)ap_palloc(cont->pool, sizeof(struct pollfd_t) * num); + (*new) = (struct pollfd_t *)ap_palloc(cont, sizeof(struct pollfd_t) * num); if ((*new) == NULL) { return APR_ENOMEM; } @@ -133,7 +133,7 @@ fd_set rd; struct beos_pollfd_t *pollset; - pollset = (struct beos_pollfd_t *)ap_palloc(aprset->cntxt->pool, sizeof(struct beos_pollfd_t *) * *nsds);; + pollset = (struct beos_pollfd_t *)ap_palloc(aprset->cntxt, sizeof(struct beos_pollfd_t *) * *nsds);; FD_ZERO(&rd); 1.6 +7 -7 apache-apr/apr/network_io/beos/sockets.c Index: sockets.c =================================================================== RCS file: /home/cvs/apache-apr/apr/network_io/beos/sockets.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- sockets.c 1999/05/27 19:02:35 1.5 +++ sockets.c 1999/06/02 18:44:49 1.6 @@ -75,14 +75,14 @@ ap_status_t ap_create_tcp_socket(ap_context_t *cont, struct socket_t **new) { - (*new) = (struct socket_t *)ap_palloc(cont->pool,sizeof(struct socket_t)); + (*new) = (struct socket_t *)ap_palloc(cont,sizeof(struct socket_t)); if ((*new) == NULL){ return APR_ENOMEM; } (*new)->cntxt = cont; - (*new)->addr = (struct sockaddr_in *) ap_palloc((*new)->cntxt->pool, + (*new)->addr = (struct sockaddr_in *) ap_palloc((*new)->cntxt, sizeof (struct sockaddr_in)); if ((*new)->addr == NULL){ return APR_ENOMEM; @@ -100,7 +100,7 @@ return errno; } else { - ap_register_cleanup((*new)->cntxt->pool, (void *)(*new), + ap_register_cleanup((*new)->cntxt, (void *)(*new), socket_cleanup, NULL); return APR_SUCCESS; } @@ -118,7 +118,7 @@ ap_status_t ap_close_socket(struct socket_t *thesocket) { - ap_kill_cleanup(thesocket->cntxt->pool,thesocket,socket_cleanup); + ap_kill_cleanup(thesocket->cntxt,thesocket,socket_cleanup); return socket_cleanup(thesocket); } @@ -149,11 +149,11 @@ { struct hostent *hptr; - (*new) = (struct socket_t *)ap_palloc(sock->cntxt->pool, + (*new) = (struct socket_t *)ap_palloc(sock->cntxt, sizeof(ap_socket_t)); (*new)->cntxt = sock->cntxt; - (*new)->addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt->pool, + (*new)->addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, sizeof(struct sockaddr_in)); (*new)->addr_len = sizeof(struct sockaddr_in); @@ -170,7 +170,7 @@ (*new)->remote_hostname = strdup(hptr->h_name); } - ap_register_cleanup((*new)->cntxt->pool, (void *)new, + ap_register_cleanup((*new)->cntxt, (void *)new, socket_cleanup, NULL); return APR_SUCCESS; } 1.6 +1 -1 apache-apr/apr/network_io/beos/sockopt.c Index: sockopt.c =================================================================== RCS file: /home/cvs/apache-apr/apr/network_io/beos/sockopt.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- sockopt.c 1999/05/27 19:02:35 1.5 +++ sockopt.c 1999/06/02 18:44:50 1.6 @@ -99,7 +99,7 @@ ap_status_t ap_get_remote_hostname(struct socket_t *sock, char **name) { - (*name) = (char*)ap_pstrdup(sock->cntxt->pool, sock->remote_hostname); + (*name) = (char*)ap_pstrdup(sock->cntxt, sock->remote_hostname); if (*name) { return APR_SUCCESS; } 1.11 +2 -2 apache-apr/apr/network_io/unix/poll.c Index: poll.c =================================================================== RCS file: /home/cvs/apache-apr/apr/network_io/unix/poll.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- poll.c 1999/05/27 13:09:51 1.10 +++ poll.c 1999/06/02 18:44:53 1.11 @@ -63,7 +63,7 @@ ap_status_t ap_setup_poll(ap_context_t *cont, ap_int32_t num, struct pollfd_t **new) { - (*new) = (struct pollfd_t *)ap_palloc(cont->pool, sizeof(struct pollfd_t) * num); + (*new) = (struct pollfd_t *)ap_palloc(cont, sizeof(struct pollfd_t) * num); if ((*new) == NULL) { return APR_ENOMEM; } @@ -126,7 +126,7 @@ struct pollfd *pollset; int rv; - pollset = (struct pollfd *)ap_palloc(aprset->cntxt->pool, + pollset = (struct pollfd *)ap_palloc(aprset->cntxt, sizeof(struct pollfd) * (*nsds)); for (i = 0; i < (*nsds); i++) { 1.19 +7 -7 apache-apr/apr/network_io/unix/sockets.c Index: sockets.c =================================================================== RCS file: /home/cvs/apache-apr/apr/network_io/unix/sockets.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- sockets.c 1999/05/26 20:26:17 1.18 +++ sockets.c 1999/06/02 18:44:53 1.19 @@ -78,13 +78,13 @@ ap_status_t ap_create_tcp_socket(ap_context_t *cont, struct socket_t **new) { - (*new) = (struct socket_t *)ap_palloc(cont->pool, sizeof(struct socket_t)); + (*new) = (struct socket_t *)ap_palloc(cont, sizeof(struct socket_t)); if ((*new) == NULL) { return APR_ENOMEM; } (*new)->cntxt = cont; - (*new)->addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt->pool, + (*new)->addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, sizeof(struct sockaddr_in)); if ((*new)->addr == NULL) { @@ -101,7 +101,7 @@ if ((*new)->socketdes < 0) { return errno; } - ap_register_cleanup((*new)->cntxt->pool, (void *)(*new), + ap_register_cleanup((*new)->cntxt, (void *)(*new), socket_cleanup, NULL); return APR_SUCCESS; } @@ -118,7 +118,7 @@ ap_status_t ap_close_socket(struct socket_t *thesocket) { - ap_kill_cleanup(thesocket->cntxt->pool, thesocket, socket_cleanup); + ap_kill_cleanup(thesocket->cntxt, thesocket, socket_cleanup); return socket_cleanup(thesocket); } @@ -149,11 +149,11 @@ { struct hostent *hptr; - (*new) = (struct socket_t *)ap_palloc(sock->cntxt->pool, + (*new) = (struct socket_t *)ap_palloc(sock->cntxt, sizeof(struct socket_t)); (*new)->cntxt = sock->cntxt; - (*new)->addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt->pool, + (*new)->addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, sizeof(struct sockaddr_in)); (*new)->addr_len = sizeof(struct sockaddr_in); @@ -170,7 +170,7 @@ (*new)->remote_hostname = strdup(hptr->h_name); } - ap_register_cleanup((*new)->cntxt->pool, (void *)(*new), + ap_register_cleanup((*new)->cntxt, (void *)(*new), socket_cleanup, NULL); return APR_SUCCESS; } 1.9 +1 -1 apache-apr/apr/network_io/unix/sockopt.c Index: sockopt.c =================================================================== RCS file: /home/cvs/apache-apr/apr/network_io/unix/sockopt.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- sockopt.c 1999/05/27 13:09:51 1.8 +++ sockopt.c 1999/06/02 18:44:54 1.9 @@ -164,7 +164,7 @@ ap_status_t ap_get_remote_hostname(struct socket_t *sock, char **name) { - (*name) = ap_pstrdup(sock->cntxt->pool, sock->remote_hostname); + (*name) = ap_pstrdup(sock->cntxt, sock->remote_hostname); if (*name) { return APR_SUCCESS; } 1.24 +1 -1 apache-apr/apr/test/testfile.c Index: testfile.c =================================================================== RCS file: /home/cvs/apache-apr/apr/test/testfile.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- testfile.c 1999/05/27 19:02:38 1.23 +++ testfile.c 1999/06/02 18:44:55 1.24 @@ -133,7 +133,7 @@ fprintf(stdout, "\tReading from the file......."); nbytes = (ap_ssize_t)strlen("this is a test"); - buf = (char *)ap_palloc(context->pool, nbytes + 1); + buf = (char *)ap_palloc(context, nbytes + 1); if (ap_read(thefile, buf, &nbytes) != APR_SUCCESS) { perror("something's wrong"); exit(-1); 1.9 +4 -4 apache-apr/apr/test/testproc.c Index: testproc.c =================================================================== RCS file: /home/cvs/apache-apr/apr/test/testproc.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- testproc.c 1999/05/27 19:02:38 1.8 +++ testproc.c 1999/06/02 18:44:56 1.9 @@ -80,7 +80,7 @@ ap_create_context(NULL, NULL, &context); - teststr = ap_pstrdup(context->pool, "Whooo Hoooo\n"); + teststr = ap_pstrdup(context, "Whooo Hoooo\n"); if (argc > 1) { fprintf(stdout, "%s", teststr); @@ -114,8 +114,8 @@ } fprintf(stdout, "OK.\n"); - args[0] = ap_pstrdup(context->pool, "testproc"); - args[1] = ap_pstrdup(context->pool, "-X"); + args[0] = ap_pstrdup(context, "testproc"); + args[1] = ap_pstrdup(context, "-X"); args[2] = NULL; fprintf(stdout, "Creating a new process......."); @@ -134,7 +134,7 @@ length = 256; fprintf(stdout, "Checking the data read from pipe to child......."); - buf = ap_palloc(context->pool, length); + buf = ap_palloc(context, length); if (ap_read(testfile, buf, &length) == APR_SUCCESS) { if (!strcmp(buf, teststr)) fprintf(stdout,"OK\n"); 1.12 +2 -2 apache-apr/apr/test/testsock.c Index: testsock.c =================================================================== RCS file: /home/cvs/apache-apr/apr/test/testsock.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- testsock.c 1999/05/26 15:45:56 1.11 +++ testsock.c 1999/06/02 18:44:57 1.12 @@ -95,11 +95,11 @@ exit(-1); } - args[0] = ap_pstrdup(context->pool, "server"); + args[0] = ap_pstrdup(context, "server"); args[1] = NULL; s1 = ap_create_process(context, "./server", args, NULL, attr1, &proc1); - args[0] = ap_pstrdup(context->pool, "client"); + args[0] = ap_pstrdup(context, "client"); s2 = ap_create_process(context, "./client", args, NULL, attr2, &proc2); if (s1 != APR_SUCCESS || s2 != APR_SUCCESS) { 1.4 +4 -4 apache-apr/apr/threadproc/beos/proc.c Index: proc.c =================================================================== RCS file: /home/cvs/apache-apr/apr/threadproc/beos/proc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- proc.c 1999/05/27 19:02:40 1.3 +++ proc.c 1999/06/02 18:44:59 1.4 @@ -64,7 +64,7 @@ ap_status_t ap_createprocattr_init(ap_context_t *cont, struct procattr_t **new) { - (*new) = (struct procattr_t *)ap_palloc(cont->pool, + (*new) = (struct procattr_t *)ap_palloc(cont, sizeof(struct procattr_t)); if ((*new) == NULL) { @@ -110,7 +110,7 @@ ap_status_t ap_setprocattr_dir(struct procattr_t *attr, char *dir) { - attr->currdir = (char*)ap_pstrdup(attr->cntxt->pool, dir); + attr->currdir = (char*)ap_pstrdup(attr->cntxt, dir); if (attr->currdir) { return APR_SUCCESS; } @@ -128,7 +128,7 @@ { int pid; - (*proc) = (struct proc_t *)ap_palloc(cont->pool, sizeof(struct proc_t)); + (*proc) = (struct proc_t *)ap_palloc(cont, sizeof(struct proc_t)); if ((pid = fork()) < 0) { return errno; @@ -149,7 +149,7 @@ { int i; char **newargs; - (*new) = (struct proc_t *)ap_palloc(cont->pool, sizeof(struct proc_t)); + (*new) = (struct proc_t *)ap_palloc(cont, sizeof(struct proc_t)); if ((*new) == NULL){ return APR_ENOMEM; 1.4 +5 -5 apache-apr/apr/threadproc/beos/thread.c Index: thread.c =================================================================== RCS file: /home/cvs/apache-apr/apr/threadproc/beos/thread.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- thread.c 1999/05/27 19:02:41 1.3 +++ thread.c 1999/06/02 18:44:59 1.4 @@ -62,9 +62,9 @@ { ap_status_t stat; - (*new) = (struct threadattr_t *)ap_palloc(cont->pool, + (*new) = (struct threadattr_t *)ap_palloc(cont, sizeof(struct threadattr_t)); - (*new)->attr = (int32)ap_palloc(cont->pool, + (*new)->attr = (int32)ap_palloc(cont, sizeof(int32)); if ((*new) == NULL) { @@ -102,12 +102,12 @@ int32 temp; ap_status_t stat; - (*new) = (struct thread_t *)ap_palloc(cont->pool, sizeof(struct thread_t)); + (*new) = (struct thread_t *)ap_palloc(cont, sizeof(struct thread_t)); if ((*new) == NULL) { return APR_ENOMEM; } - (*new)->td = (thread_id) ap_palloc(cont->pool, sizeof(thread_id)); + (*new)->td = (thread_id) ap_palloc(cont, sizeof(thread_id)); if ((*new)->td == (thread_id)NULL) { return APR_ENOMEM; } @@ -137,7 +137,7 @@ ap_status_t ap_thread_exit(ap_thread_t *thd, ap_status_t *retval) { - ap_destroy_pool(thd->cntxt->pool); + ap_destroy_pool(thd->cntxt); exit_thread ((status_t)retval); } 1.4 +1 -1 apache-apr/apr/threadproc/beos/threadpriv.c Index: threadpriv.c =================================================================== RCS file: /home/cvs/apache-apr/apr/threadproc/beos/threadpriv.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- threadpriv.c 1999/05/27 19:02:41 1.3 +++ threadpriv.c 1999/06/02 18:44:59 1.4 @@ -65,7 +65,7 @@ ap_status_t ap_create_thread_private(ap_context_t *cont, void (*dest)(void *), struct threadkey_t **key) { - (*key) = (struct threadkey_t *)ap_palloc(cont->pool, sizeof(struct threadkey_t)); + (*key) = (struct threadkey_t *)ap_palloc(cont, sizeof(struct threadkey_t)); if ((*key) == NULL) { return APR_ENOMEM; } 1.16 +5 -5 apache-apr/apr/threadproc/unix/proc.c Index: proc.c =================================================================== RCS file: /home/cvs/apache-apr/apr/threadproc/unix/proc.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- proc.c 1999/05/26 15:45:57 1.15 +++ proc.c 1999/06/02 18:45:00 1.16 @@ -67,7 +67,7 @@ ap_status_t ap_createprocattr_init(ap_context_t *cont, struct procattr_t **new) { - (*new) = (struct procattr_t *)ap_palloc(cont->pool, + (*new) = (struct procattr_t *)ap_palloc(cont, sizeof(struct procattr_t)); if ((*new) == NULL) { @@ -113,7 +113,7 @@ ap_status_t ap_setprocattr_dir(struct procattr_t *attr, char *dir) { - attr->currdir = ap_pstrdup(attr->cntxt->pool, dir); + attr->currdir = ap_pstrdup(attr->cntxt, dir); if (attr->currdir) { return APR_SUCCESS; } @@ -131,7 +131,7 @@ { int pid; - (*proc) = ap_palloc(cont->pool, sizeof(struct proc_t)); + (*proc) = ap_palloc(cont, sizeof(struct proc_t)); if ((pid = fork()) < 0) { return errno; @@ -153,7 +153,7 @@ int i; char **newargs; - (*new) = (struct proc_t *)ap_palloc(cont->pool, sizeof(struct proc_t)); + (*new) = (struct proc_t *)ap_palloc(cont, sizeof(struct proc_t)); if ((*new) == NULL) { return APR_ENOMEM; @@ -194,7 +194,7 @@ while (args[i]) { i++; } - newargs = (char **)ap_palloc(cont->pool, sizeof (char *) * (i + 3)); + newargs = (char **)ap_palloc(cont, sizeof (char *) * (i + 3)); newargs[0] = strdup(SHELL_PATH); newargs[1] = strdup("-c"); i = 0; 1.8 +5 -5 apache-apr/apr/threadproc/unix/thread.c Index: thread.c =================================================================== RCS file: /home/cvs/apache-apr/apr/threadproc/unix/thread.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- thread.c 1999/05/25 17:04:03 1.7 +++ thread.c 1999/06/02 18:45:01 1.8 @@ -62,9 +62,9 @@ { ap_status_t stat; - (*new) = (struct threadattr_t *)ap_palloc(cont->pool, + (*new) = (struct threadattr_t *)ap_palloc(cont, sizeof(struct threadattr_t)); - (*new)->attr = (pthread_attr_t *)ap_palloc(cont->pool, + (*new)->attr = (pthread_attr_t *)ap_palloc(cont, sizeof(pthread_attr_t)); if ((*new) == NULL || (*new)->attr == NULL) { @@ -108,13 +108,13 @@ ap_status_t stat; pthread_attr_t *temp; - (*new) = (struct thread_t *)ap_palloc(cont->pool, sizeof(struct thread_t)); + (*new) = (struct thread_t *)ap_palloc(cont, sizeof(struct thread_t)); if ((*new) == NULL) { return APR_ENOMEM; } - (*new)->td = (pthread_t *)ap_palloc(cont->pool, sizeof(pthread_t)); + (*new)->td = (pthread_t *)ap_palloc(cont, sizeof(pthread_t)); if ((*new)->td == NULL) { return APR_ENOMEM; @@ -142,7 +142,7 @@ ap_status_t ap_thread_exit(ap_thread_t *thd, ap_status_t *retval) { - ap_destroy_pool(thd->cntxt->pool); + ap_destroy_pool(thd->cntxt); pthread_exit(retval); } 1.6 +1 -1 apache-apr/apr/threadproc/unix/threadpriv.c Index: threadpriv.c =================================================================== RCS file: /home/cvs/apache-apr/apr/threadproc/unix/threadpriv.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- threadpriv.c 1999/05/25 17:04:03 1.5 +++ threadpriv.c 1999/06/02 18:45:01 1.6 @@ -62,7 +62,7 @@ struct threadkey_t **key) { ap_status_t stat; - (*key) = (struct threadkey_t *)ap_palloc(cont->pool, sizeof(struct threadkey_t)); + (*key) = (struct threadkey_t *)ap_palloc(cont, sizeof(struct threadkey_t)); if ((*key) == NULL) { return APR_ENOMEM; 1.3 +7 -7 apache-apr/apr/time/beos/access.c Index: access.c =================================================================== RCS file: /home/cvs/apache-apr/apr/time/beos/access.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- access.c 1999/05/27 19:02:44 1.2 +++ access.c 1999/06/02 18:45:02 1.3 @@ -138,7 +138,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -154,7 +154,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -170,7 +170,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -186,7 +186,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -202,7 +202,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -218,7 +218,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -234,7 +234,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { 1.3 +1 -1 apache-apr/apr/time/beos/time.c Index: time.c =================================================================== RCS file: /home/cvs/apache-apr/apr/time/beos/time.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- time.c 1999/05/27 19:02:44 1.2 +++ time.c 1999/06/02 18:45:02 1.3 @@ -62,7 +62,7 @@ #include <string.h> ap_status_t ap_make_time(ap_context_t *cont, struct atime_t **new) { - (*new) = (struct atime_t *)ap_palloc(cont->pool, sizeof(struct atime_t)); + (*new) = (struct atime_t *)ap_palloc(cont, sizeof(struct atime_t)); if ((*new) == NULL) { return APR_ENOMEM; 1.5 +7 -7 apache-apr/apr/time/unix/access.c Index: access.c =================================================================== RCS file: /home/cvs/apache-apr/apr/time/unix/access.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- access.c 1999/05/25 17:04:07 1.4 +++ access.c 1999/06/02 18:45:04 1.5 @@ -138,7 +138,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -154,7 +154,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -170,7 +170,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -186,7 +186,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -202,7 +202,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -218,7 +218,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { @@ -234,7 +234,7 @@ return APR_ENOTIME; } if (time->explodedtime == NULL) { - time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, + time->explodedtime = (struct tm *)ap_palloc(time->cntxt, sizeof(struct tm)); } if (time->explodedtime == NULL) { 1.5 +1 -1 apache-apr/apr/time/unix/time.c Index: time.c =================================================================== RCS file: /home/cvs/apache-apr/apr/time/unix/time.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- time.c 1999/05/25 17:04:07 1.4 +++ time.c 1999/06/02 18:45:04 1.5 @@ -63,7 +63,7 @@ ap_status_t ap_make_time(ap_context_t *cont, struct atime_t **new) { - (*new) = (struct atime_t *)ap_palloc(cont->pool, sizeof(struct atime_t)); + (*new) = (struct atime_t *)ap_palloc(cont, sizeof(struct atime_t)); if ((*new) == NULL) { return APR_ENOMEM;