You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@hyperreal.org on 1999/05/21 21:54:10 UTC

cvs commit: apache-apr/apr/time/unix access.c atime.h time.c

rbb         99/05/21 12:54:08

  Modified:    apr/file_io/unix dir.c filedup.c fileio.h open.c pipe.c
               apr/locks/unix crossproc.c intraproc.c locks.c locks.h
               apr/network_io/unix networkio.h poll.c sockets.c
               apr/test testsock.c
               apr/threadproc/unix proc.c signals.c thread.c threadpriv.c
                        threadproc.h
               apr/time/unix access.c atime.h time.c
  Log:
  All exposed apr types now have a context field in them.  More commits to
  come.
  
  Revision  Changes    Path
  1.8       +12 -11    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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- dir.c	1999/05/20 19:05:02	1.7
  +++ dir.c	1999/05/21 19:53:11	1.8
  @@ -76,6 +76,7 @@
   {
       struct dir_t *thedir = (struct dir_t *)ap_palloc(cont->pool, sizeof(struct dir_t));
   
  +    thedir->cntxt = cont;
       thedir->dirname = strdup(dirname);
       thedir->dirstruct = opendir(dirname);
       thedir->entry = NULL;
  @@ -85,7 +86,7 @@
           return NULL;
       }    
       else {
  -        ap_register_cleanup(cont->pool, (void *)thedir, dir_cleanup, NULL);
  +        ap_register_cleanup(thedir->cntxt->pool, (void *)thedir, dir_cleanup, NULL);
           return thedir;
       }
   }
  @@ -93,7 +94,7 @@
   ap_status_t ap_closedir(ap_context_t *cont, struct dir_t *thedir)
   {
       if (dir_cleanup(thedir) == APR_SUCCESS) {
  -        ap_kill_cleanup(cont->pool, thedir, dir_cleanup);
  +        ap_kill_cleanup(thedir->cntxt->pool, thedir, dir_cleanup);
           return APR_SUCCESS;
       }
       return APR_FAILURE;
  @@ -135,7 +136,7 @@
       }
   }
   
  -ap_ssize_t ap_dir_entry_size(ap_context_t *context, ap_dir_t *thedir)
  +ap_ssize_t ap_dir_entry_size(ap_context_t *cont, ap_dir_t *thedir)
   {
       struct stat filestat;
       char *fname = NULL;    
  @@ -144,7 +145,7 @@
           errno = ENOFILE;
           return -1;
       }
  -    fname = ap_pstrcat(context->pool, thedir->dirname, "/", 
  +    fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", 
                          thedir->entry->d_name, NULL);
       if (stat(fname, &filestat) == -1) {
           errno = ENOSTAT;
  @@ -154,7 +155,7 @@
       return filestat.st_size;
   }
   
  -time_t ap_dir_entry_mtime(ap_context_t *context, ap_dir_t *thedir)
  +time_t ap_dir_entry_mtime(ap_context_t *cont, ap_dir_t *thedir)
   {
       struct stat filestat;
       char *fname = NULL;
  @@ -164,7 +165,7 @@
           return -1;
       }
   
  -    fname = ap_pstrcat(context->pool, thedir->dirname, "/", 
  +    fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", 
                          thedir->entry->d_name, NULL);
       if (stat(fname, &filestat) == -1) {
           errno = ENOSTAT;
  @@ -174,7 +175,7 @@
       return filestat.st_mtime;
   }
    
  -ap_filetype_e ap_dir_entry_ftype(ap_context_t *context, ap_dir_t *thedir)
  +ap_filetype_e ap_dir_entry_ftype(ap_context_t *cont, ap_dir_t *thedir)
   {
       struct stat filestat;
       char *fname = NULL;
  @@ -184,7 +185,7 @@
           return -1;
       }
   
  -    fname = ap_pstrcat(context->pool, thedir->dirname, "/", 
  +    fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", 
                          thedir->entry->d_name, NULL);
       if (stat(fname, &filestat) == -1) {
           errno = ENOSTAT;
  @@ -207,10 +208,10 @@
           return APR_SOCK;    
   }
   
  -char * ap_get_dir_filename(ap_context_t * context, ap_dir_t *thedir)
  +char * ap_get_dir_filename(ap_context_t * cont, ap_dir_t *thedir)
   {
  -    char *name = (char *)ap_palloc(context->pool, strlen(thedir->entry->d_name));
  -    name = ap_pstrdup(context->pool, thedir->entry->d_name);
  +    char *name = (char *)ap_palloc(thedir->cntxt->pool, strlen(thedir->entry->d_name));
  +    name = ap_pstrdup(thedir->cntxt->pool, thedir->entry->d_name);
       return name;
   }
   
  
  
  
  1.10      +3 -2      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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- filedup.c	1999/05/21 13:02:28	1.9
  +++ filedup.c	1999/05/21 19:53:12	1.10
  @@ -60,7 +60,8 @@
   
   struct file_t *ap_dupfile(ap_context_t *cont, struct file_t *old_file)
   {
  -    struct file_t *new_file = (struct file_t *)ap_palloc(cont->pool, sizeof(struct file_t));
  +    struct file_t *new_file = (struct file_t *)ap_palloc(old_file->cntxt->pool,
  +                               sizeof(struct file_t));
       
       if (new_file == NULL) {
           errno = ENOMEM;
  @@ -76,6 +77,6 @@
       old_file->atime = new_file->atime;    
       old_file->mtime = new_file->mtime;
       old_file->ctime = new_file->ctime;
  -    ap_register_cleanup(cont->pool, (void *)new_file, file_cleanup, NULL);
  +    ap_register_cleanup(old_file->cntxt->pool, (void *)new_file, file_cleanup, NULL);
   }
   
  
  
  
  1.7       +3 -0      apache-apr/apr/file_io/unix/fileio.h
  
  Index: fileio.h
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/fileio.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- fileio.h	1999/05/12 19:15:30	1.6
  +++ fileio.h	1999/05/21 19:53:13	1.7
  @@ -67,6 +67,7 @@
   #include "apr_errno.h"
   
   struct file_t {
  +    ap_context_t *cntxt;
       int filedes;
       char * fname;
       int buffered;
  @@ -80,12 +81,14 @@
   };
   
   struct dir_t {
  +    ap_context_t *cntxt;
       char *dirname;
       DIR *dirstruct;
       struct dirent *entry;
   };
   
   struct iovec_t {
  +    ap_context_t *cntxt;
       struct iovec *iovec;
   };
   
  
  
  
  1.21      +5 -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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- open.c	1999/05/20 19:05:03	1.20
  +++ open.c	1999/05/21 19:53:13	1.21
  @@ -82,6 +82,8 @@
   
       dafile = (struct file_t *)ap_palloc(cont->pool, sizeof(struct file_t));
   
  +    dafile->cntxt = cont;
  +
       if ((flag & APR_READ) && (flag & APR_WRITE)) {
           oflags = O_RDWR;
       }
  @@ -128,8 +130,8 @@
           return NULL;
       }
   
  -    if (ap_updatefileinfo(cont, dafile) == APR_SUCCESS) {
  -	ap_register_cleanup(cont->pool, (void *)dafile, file_cleanup, NULL);
  +    if (ap_updatefileinfo(dafile->cntxt, dafile) == APR_SUCCESS) {
  +	ap_register_cleanup(dafile->cntxt->pool, (void *)dafile, file_cleanup, NULL);
           return dafile;
       }
       else {
  @@ -142,7 +144,7 @@
   ap_status_t ap_close(ap_context_t *cont, struct file_t *file)
   {
       if (file_cleanup(file) == APR_SUCCESS) {
  -        ap_kill_cleanup(cont->pool, file, file_cleanup);
  +        ap_kill_cleanup(file->cntxt->pool, file, file_cleanup);
           return APR_SUCCESS;
       }
       return APR_FAILURE;
  
  
  
  1.7       +2 -0      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- pipe.c	1999/05/20 19:05:03	1.6
  +++ pipe.c	1999/05/21 19:53:14	1.7
  @@ -70,9 +70,11 @@
           return APR_FAILURE;
       }
       
  +    in->cntxt = cont;
       in->filedes = filedes[0];
       in->fname = strdup("PIPE");
   
  +    out->cntxt = cont;
       out->filedes = filedes[1];
       out->fname = strdup("PIPE");
   
  
  
  
  1.4       +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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- crossproc.c	1999/05/21 13:02:29	1.3
  +++ crossproc.c	1999/05/21 19:53:23	1.4
  @@ -95,7 +95,7 @@
       new->op_off.sem_flg = SEM_UNDO;
   
       new->curr_locked == 0;
  -    ap_register_cleanup(cont->pool, (void *)new, lock_cleanup, NULL);
  +    ap_register_cleanup(new->cntxt->pool, (void *)new, lock_cleanup, NULL);
       return APR_SUCCESS;
   }
   
  @@ -120,7 +120,7 @@
   ap_status_t destroy_inter_lock(ap_context_t *cont, struct lock_t *lock)
   {
       if (lock_cleanup(lock) == APR_SUCCESS) {
  -        ap_kill_cleanup(cont->pool, lock, lock_cleanup);
  +        ap_kill_cleanup(lock->cntxt->pool, lock, lock_cleanup);
           return APR_SUCCESS;
       }
       return APR_FAILURE;
  @@ -178,7 +178,7 @@
       }
   
       new->curr_locked == 0;
  -    ap_register_cleanup(cont->pool, (void *)new, lock_cleanup, NULL);
  +    ap_register_cleanup(new->cntxt->pool, (void *)new, lock_cleanup, NULL);
       return APR_SUCCESS;
   }
   
  @@ -203,7 +203,7 @@
   ap_status_t destroy_inter_lock(ap_context_t *cont, struct lock_t *lock)
   {
       if (lock_cleanup(lock) == APR_SUCCESS) {
  -        ap_kill_cleanup(cont->pool, lock, lock_cleanup);
  +        ap_kill_cleanup(lock->cntxt->pool, lock, lock_cleanup);
           return APR_SUCCESS;
       }
       return APR_FAILURE;
  @@ -244,7 +244,7 @@
   
       new->curr_locked == 0;
       unlink(new->fname);
  -    ap_register_cleanup(cont->pool, (void *)new, lock_cleanup, NULL);
  +    ap_register_cleanup(new->cntxt->pool, (void *)new, lock_cleanup, NULL);
       return APR_SUCCESS; 
   }
   
  @@ -269,7 +269,7 @@
   ap_status_t destroy_inter_lock(ap_context_t *cont, struct lock_t *lock)
   {
       if (lock_cleanup(lock) == APR_SUCCESS) {
  -        ap_kill_cleanup(cont->pool, lock, lock_cleanup);
  +        ap_kill_cleanup(lock->cntxt->pool, lock, lock_cleanup);
           return APR_SUCCESS;
       }
       return APR_FAILURE;
  @@ -296,7 +296,7 @@
           return APR_FAILURE;
       }
       new->curr_locked == 0;
  -    ap_register_cleanup(cont->pool, (void *)new, lock_cleanup, NULL);
  +    ap_register_cleanup(new->cntxt->pool, (void *)new, lock_cleanup, NULL);
       return APR_SUCCESS;
   }
   
  @@ -321,7 +321,7 @@
   ap_status_t destroy_inter_lock(ap_context_t *cont, struct lock_t *lock)
   {
       if (lock_cleanup(lock) == APR_SUCCESS) {
  -        ap_kill_cleanup(cont->pool, lock, lock_cleanup);
  +        ap_kill_cleanup(lock->cntxt->pool, lock, lock_cleanup);
           return APR_SUCCESS;
       }
       return APR_FAILURE;
  
  
  
  1.4       +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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- intraproc.c	1999/05/21 13:02:30	1.3
  +++ intraproc.c	1999/05/21 19:53:25	1.4
  @@ -73,7 +73,7 @@
   {
       pthread_mutexattr_t mattr;
   
  -    new->intraproc = (pthread_mutex_t *)ap_palloc(cont->pool, 
  +    new->intraproc = (pthread_mutex_t *)ap_palloc(new->cntxt->pool, 
                                 sizeof(pthread_mutex_t));
       if (new->intraproc == NULL ) {
           return APR_FAILURE;
  @@ -94,7 +94,7 @@
       }
   
       new->curr_locked == 0;
  -    ap_register_cleanup(cont->pool, (void *)new, lock_intra_cleanup, NULL);
  +    ap_register_cleanup(new->cntxt->pool, (void *)new, lock_intra_cleanup, NULL);
       return APR_SUCCESS;
   }
   
  @@ -119,7 +119,7 @@
   ap_status_t destroy_intra_lock(ap_context_t *cont, struct lock_t *lock)
   {
       if (lock_intra_cleanup(lock) == APR_SUCCESS) {
  -        ap_kill_cleanup(cont->pool, lock, lock_intra_cleanup);
  +        ap_kill_cleanup(lock->cntxt->pool, lock, lock_intra_cleanup);
           return APR_SUCCESS;
       }
       return APR_FAILURE;
  
  
  
  1.4       +9 -8      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- locks.c	1999/05/21 13:02:30	1.3
  +++ locks.c	1999/05/21 19:53:26	1.4
  @@ -63,16 +63,17 @@
   
       new = (struct lock_t *)ap_palloc(cont->pool, sizeof(struct lock_t));
   
  +    new->cntxt = cont;
       new->type = type;
       new->fname = strdup(fname);
   
       if (type != APR_CROSS_PROCESS) {
  -        if (create_intra_lock(cont, new) == APR_FAILURE) {
  +        if (create_intra_lock(new->cntxt, new) == APR_FAILURE) {
               return NULL;
           }
       }
       if (type != APR_INTRAPROCESS) {
  -        if (create_inter_lock(cont, new) == APR_FAILURE) {
  +        if (create_inter_lock(new->cntxt, new) == APR_FAILURE) {
               return NULL;
           }
       }
  @@ -82,12 +83,12 @@
   ap_status_t ap_lock(ap_context_t *cont, struct lock_t *lock)
   {
       if (lock->type != APR_CROSS_PROCESS) {
  -        if (lock_intra(cont, lock) == APR_FAILURE) {
  +        if (lock_intra(lock->cntxt, lock) == APR_FAILURE) {
               return APR_FAILURE;
           }
       }
       if (lock->type != APR_INTRAPROCESS) {
  -        if (lock_inter(cont, lock) == APR_FAILURE) {
  +        if (lock_inter(lock->cntxt, lock) == APR_FAILURE) {
               return APR_FAILURE;
           }
       }
  @@ -97,12 +98,12 @@
   ap_status_t ap_unlock(ap_context_t *cont, struct lock_t *lock)
   {
       if (lock->type != APR_CROSS_PROCESS) {
  -        if (unlock_intra(cont, lock) == APR_FAILURE) {
  +        if (unlock_intra(lock->cntxt, lock) == APR_FAILURE) {
               return APR_FAILURE;
           }
       }
       if (lock->type != APR_INTRAPROCESS) {
  -        if (unlock_inter(cont, lock) == APR_FAILURE) {
  +        if (unlock_inter(lock->cntxt, lock) == APR_FAILURE) {
               return APR_FAILURE;
           }
       }
  @@ -112,12 +113,12 @@
   ap_status_t ap_destroy_lock(ap_context_t *cont, struct lock_t *lock)
   {
       if (lock->type != APR_CROSS_PROCESS) {
  -        if (destroy_intra_lock(cont, lock) == APR_FAILURE) {
  +        if (destroy_intra_lock(lock->cntxt, lock) == APR_FAILURE) {
               return APR_FAILURE;
           }
       }
       if (lock->type != APR_INTRAPROCESS) {
  -        if (destroy_inter_lock(cont, lock) == APR_FAILURE) {
  +        if (destroy_inter_lock(lock->cntxt, lock) == APR_FAILURE) {
               return APR_FAILURE;
           }
       }
  
  
  
  1.5       +1 -0      apache-apr/apr/locks/unix/locks.h
  
  Index: locks.h
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/locks/unix/locks.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- locks.h	1999/05/21 13:02:31	1.4
  +++ locks.h	1999/05/21 19:53:26	1.5
  @@ -81,6 +81,7 @@
   #endif
   
   struct lock_t {
  +    ap_context_t *cntxt;
       ap_locktype_e type;
       int curr_locked;
       char *fname;
  
  
  
  1.9       +2 -0      apache-apr/apr/network_io/unix/networkio.h
  
  Index: networkio.h
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/network_io/unix/networkio.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- networkio.h	1999/05/12 19:46:16	1.8
  +++ networkio.h	1999/05/21 19:53:36	1.9
  @@ -61,6 +61,7 @@
   #include <poll.h>
   
   struct socket_t {
  +    ap_context_t *cntxt;
       int socketdes;
       char *remote_hostname;
       struct sockaddr_in *addr;
  @@ -68,6 +69,7 @@
   };
   
   struct pollfd_t {
  +    ap_context_t *cntxt;
       struct socket_t *sock;
       ap_int16_t events;
       ap_int16_t revents;
  
  
  
  1.6       +5 -3      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- poll.c	1999/05/19 15:17:17	1.5
  +++ poll.c	1999/05/21 19:53:37	1.6
  @@ -60,10 +60,11 @@
   #include <sys/poll.h>
   
   
  -ap_pollfd_t *ap_setup_poll(ap_context_t *context, ap_int32_t num)
  +ap_pollfd_t *ap_setup_poll(ap_context_t *cont, ap_int32_t num)
   {
       struct pollfd_t *new;
  -    new = (struct pollfd_t *)ap_palloc(context->pool, sizeof(struct pollfd_t) * num);
  +    new = (struct pollfd_t *)ap_palloc(cont->pool, sizeof(struct pollfd_t) * num);
  +    new->cntxt = cont;
       return new;
   }
   
  @@ -121,7 +122,8 @@
       struct pollfd *pollset;
       int rv;
   
  -    pollset = (struct pollfd *)ap_palloc(cont->pool, sizeof(struct pollfd) * nsds);
  +    pollset = (struct pollfd *)ap_palloc(aprset->cntxt->pool, 
  +                                         sizeof(struct pollfd) * nsds);
   
       for (i = 0; i < nsds; i++) {
           pollset[i].fd = aprset[i].sock->socketdes;
  
  
  
  1.15      +16 -8     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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- sockets.c	1999/05/12 19:46:17	1.14
  +++ sockets.c	1999/05/21 19:53:39	1.15
  @@ -78,12 +78,16 @@
   
   struct socket_t *ap_create_tcp_socket(ap_context_t *cont)
   {
  -    struct socket_t *thesocket = (struct socket_t *)ap_palloc(cont->pool, sizeof(struct socket_t));
  -    
  +    struct socket_t *thesocket;
  +
  +    thesocket = (struct socket_t *)ap_palloc(cont->pool, sizeof(struct socket_t));
  +   
  +    thesocket->cntxt = cont; 
       thesocket->socketdes = socket(AF_INET ,SOCK_STREAM, IPPROTO_TCP);
       thesocket->remote_hostname = NULL;
   
  -    thesocket->addr = (struct sockaddr_in *)ap_palloc(cont->pool, sizeof(struct sockaddr_in));
  +    thesocket->addr = (struct sockaddr_in *)ap_palloc(thesocket->cntxt->pool,
  +                       sizeof(struct sockaddr_in));
       thesocket->addr->sin_family = AF_INET;
   
       thesocket->addr_len = sizeof(*thesocket->addr);
  @@ -92,7 +96,8 @@
           return NULL;
       }
       else {
  -        ap_register_cleanup(cont->pool, (void *)thesocket, socket_cleanup, NULL);
  +        ap_register_cleanup(thesocket->cntxt->pool, (void *)thesocket, 
  +                            socket_cleanup, NULL);
           return thesocket;
       }
   } 
  @@ -110,7 +115,7 @@
   ap_status_t ap_close_socket(ap_context_t *cont, struct socket_t *thesocket)
   {
       socket_cleanup(thesocket);
  -    ap_kill_cleanup(cont->pool, thesocket, socket_cleanup);
  +    ap_kill_cleanup(thesocket->cntxt->pool, thesocket, socket_cleanup);
   }
   
   ap_status_t ap_setport(ap_context_t *cont, struct socket_t *sock, ap_uint32_t port)
  @@ -138,10 +143,13 @@
   
   struct socket_t *ap_accept(ap_context_t *cont, const struct socket_t *sock)
   {
  -    struct socket_t *new = (struct socket_t *)ap_palloc(cont->pool, sizeof(struct socket_t));
  +    struct socket_t *new = (struct socket_t *)ap_palloc(sock->cntxt->pool, 
  +                            sizeof(struct socket_t));
       struct hostent *hptr;
   
  -    new->addr = (struct sockaddr_in *)ap_palloc(cont->pool, sizeof(struct sockaddr_in));
  +    new->cntxt = sock->cntxt;
  +    new->addr = (struct sockaddr_in *)ap_palloc(new->cntxt->pool, 
  +                 sizeof(struct sockaddr_in));
       new->addr_len = sizeof(struct sockaddr_in);
   
       new->socketdes = accept(sock->socketdes, (struct sockaddr *)new->addr, &new->addr_len);
  @@ -155,7 +163,7 @@
           new->remote_hostname = strdup(hptr->h_name);
       }
       
  -    ap_register_cleanup(cont->pool, (void *)new, socket_cleanup, NULL);
  +    ap_register_cleanup(new->cntxt->pool, (void *)new, socket_cleanup, NULL);
       return new;
   }
   
  
  
  
  1.7       +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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- testsock.c	1999/05/12 20:04:35	1.6
  +++ testsock.c	1999/05/21 19:53:50	1.7
  @@ -102,11 +102,11 @@
           continue;
   
       if (s1 == APR_SUCCESS) {
  -        ap_kill(proc2, SIGTERM);
  +        ap_kill(context,proc2, SIGTERM);
           ap_wait_proc(context, proc2, APR_WAIT);
       }
       else {
  -        ap_kill(proc1, SIGTERM);
  +        ap_kill(context, proc1, SIGTERM);
           ap_wait_proc(context, proc1, APR_WAIT);
       }
       fprintf(stdout, "Network test completed.\n");   
  
  
  
  1.11      +1 -0      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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- proc.c	1999/05/20 19:05:06	1.10
  +++ proc.c	1999/05/21 19:53:54	1.11
  @@ -67,6 +67,7 @@
   {
       struct procattr_t *new = (struct procattr_t *)ap_palloc(cont->pool, sizeof(struct procattr_t));
   
  +    new->cntxt = cont;
       new->parent_in = NULL;
       new->child_in = NULL;
       new->parent_out = NULL;
  
  
  
  1.2       +1 -1      apache-apr/apr/threadproc/unix/signals.c
  
  Index: signals.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/threadproc/unix/signals.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- signals.c	1999/05/12 20:04:24	1.1
  +++ signals.c	1999/05/21 19:53:55	1.2
  @@ -62,7 +62,7 @@
   #include <string.h>
   #include <sys/wait.h>
   
  -void ap_kill(struct proc_t *proc, int signal)
  +void ap_kill(ap_context_t *cont, struct proc_t *proc, int signal)
   {
       kill(proc->pid, signal);
   }
  
  
  
  1.4       +4 -2      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- thread.c	1999/05/17 13:11:51	1.3
  +++ thread.c	1999/05/21 19:53:55	1.4
  @@ -63,7 +63,8 @@
       struct threadattr_t *new;
     
       new = (struct threadattr_t *)ap_palloc(cont->pool, sizeof(struct threadattr_t));
  -    new->attr = (pthread_attr_t *)ap_palloc(cont->pool, sizeof(pthread_attr_t));
  +    new->cntxt = cont;
  +    new->attr = (pthread_attr_t *)ap_palloc(new->cntxt->pool, sizeof(pthread_attr_t));
       pthread_attr_init(new->attr);
   }
   
  @@ -94,7 +95,8 @@
    
       new = (struct thread_t *)ap_palloc(cont->pool, sizeof(struct thread_t));
   
  -    new->td = (pthread_t *)ap_palloc(cont->pool, sizeof(pthread_t));
  +    new->cntxt = cont;
  +    new->td = (pthread_t *)ap_palloc(new->cntxt->pool, sizeof(pthread_t));
   
       if (attr)
           temp = attr->attr;
  
  
  
  1.3       +1 -0      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- threadpriv.c	1999/05/12 20:04:25	1.2
  +++ threadpriv.c	1999/05/21 19:53:56	1.3
  @@ -62,6 +62,7 @@
   {
       struct threadkey_t *key;
       key = (struct threadkey_t *)ap_palloc(cont->pool, sizeof(struct threadkey_t));
  +    key->cntxt = cont;
   
       if (pthread_key_create(&key->key, dest) == 0) {
           return key;
  
  
  
  1.6       +5 -0      apache-apr/apr/threadproc/unix/threadproc.h
  
  Index: threadproc.h
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/threadproc/unix/threadproc.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- threadproc.h	1999/05/21 13:02:33	1.5
  +++ threadproc.h	1999/05/21 19:53:57	1.6
  @@ -63,18 +63,22 @@
   #define SHELL_PATH "/bin/sh"
   
   struct thread_t {
  +    ap_context_t *cntxt;
       pthread_t *td;
   };
   
   struct threadattr_t {
  +    ap_context_t *cntxt;
       pthread_attr_t *attr;
   };
   
   struct threadkey_t {
  +    ap_context_t *cntxt;
       pthread_key_t key;
   };
   
   struct procattr_t {
  +    ap_context_t *cntxt;
       ap_file_t *parent_in;
       ap_file_t *child_in;
       ap_file_t *parent_out;
  @@ -86,6 +90,7 @@
   };
   
   struct proc_t {
  +    ap_context_t *cntxt;
       pid_t pid;
       struct procattr_t *attr;
   };
  
  
  
  1.2       +14 -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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- access.c	1999/05/16 13:24:49	1.1
  +++ access.c	1999/05/21 19:54:03	1.2
  @@ -103,7 +103,8 @@
   void ap_set_sec(ap_context_t *context, struct atime_t *time, ap_int32_t value)
   {
       if (time->explodedtime == NULL) {
  -        time->explodedtime = (struct tm *)ap_palloc(context->pool, sizeof(struct tm));
  +        time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, 
  +                              sizeof(struct tm));
       }
       time->explodedtime->tm_sec = value;
   }
  @@ -111,7 +112,8 @@
   void ap_set_min(ap_context_t *context, struct atime_t *time, ap_int32_t value)
   {
       if (time->explodedtime == NULL) {
  -        time->explodedtime = (struct tm *)ap_palloc(context->pool, sizeof(struct tm));
  +        time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, 
  +                              sizeof(struct tm));
       }
       time->explodedtime->tm_min = value;
   }
  @@ -119,7 +121,8 @@
   void ap_set_hour(ap_context_t *context, struct atime_t *time, ap_int32_t value)
   {
       if (time->explodedtime == NULL) {
  -        time->explodedtime = (struct tm *)ap_palloc(context->pool, sizeof(struct tm));
  +        time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, 
  +                              sizeof(struct tm));
       }
       time->explodedtime->tm_hour = value;
   }
  @@ -127,7 +130,8 @@
   void ap_set_mday(ap_context_t *context, struct atime_t *time, ap_int32_t value)
   {
       if (time->explodedtime == NULL) {
  -        time->explodedtime = (struct tm *)ap_palloc(context->pool, sizeof(struct tm));
  +        time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, 
  +                              sizeof(struct tm));
       }
       time->explodedtime->tm_mday = value;
   }
  @@ -135,7 +139,8 @@
   void ap_set_mon(ap_context_t *context, struct atime_t *time, ap_int32_t value)
   {
       if (time->explodedtime == NULL) {
  -        time->explodedtime = (struct tm *)ap_palloc(context->pool, sizeof(struct tm));
  +        time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, 
  +                              sizeof(struct tm));
       }
       time->explodedtime->tm_mon = value;
   }
  @@ -143,7 +148,8 @@
   void ap_set_year(ap_context_t *context, struct atime_t *time, ap_int32_t value)
   {
       if (time->explodedtime == NULL) {
  -        time->explodedtime = (struct tm *)ap_palloc(context->pool, sizeof(struct tm));
  +        time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, 
  +                              sizeof(struct tm));
       }
       time->explodedtime->tm_year = value;
   }
  @@ -151,7 +157,8 @@
   void ap_set_wday(ap_context_t *context, struct atime_t *time, ap_int32_t value)
   {
       if (time->explodedtime == NULL) {
  -        time->explodedtime = (struct tm *)ap_palloc(context->pool, sizeof(struct tm));
  +        time->explodedtime = (struct tm *)ap_palloc(time->cntxt->pool, 
  +                              sizeof(struct tm));
       }
       time->explodedtime->tm_wday = value;
   }
  
  
  
  1.2       +1 -0      apache-apr/apr/time/unix/atime.h
  
  Index: atime.h
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/time/unix/atime.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- atime.h	1999/05/16 13:24:49	1.1
  +++ atime.h	1999/05/21 19:54:04	1.2
  @@ -60,6 +60,7 @@
   #include <time.h>
   
   struct atime_t {
  +    ap_context_t *cntxt;
       time_t currtime;
       struct tm *explodedtime;
   };
  
  
  
  1.2       +3 -2      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- time.c	1999/05/16 13:24:49	1.1
  +++ time.c	1999/05/21 19:54:04	1.2
  @@ -61,11 +61,12 @@
   #include <errno.h>
   #include <string.h>
   
  -struct atime_t *ap_make_time(ap_context_t *context)
  +struct atime_t *ap_make_time(ap_context_t *cont)
   {
       struct atime_t *new;
  -    new = (struct atime_t *)ap_palloc(context->pool, sizeof(struct atime_t));
  +    new = (struct atime_t *)ap_palloc(cont->pool, sizeof(struct atime_t));
   
  +    new->cntxt = cont;
       new->explodedtime = NULL;
       return new;
   }