You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by gs...@locus.apache.org on 2000/11/26 04:00:21 UTC

cvs commit: apr/include apr_dso.h apr_file_io.h apr_general.h apr_getopt.h apr_lib.h apr_lock.h apr_md5.h apr_mmap.h apr_network_io.h apr_pools.h apr_portable.h apr_shmem.h apr_strings.h apr_tables.h apr_thread_proc.h apr_time.h apr_user.h apr_xlate.h

gstein      00/11/25 19:00:20

  Modified:    lib      apr_pools.c
               strings  apr_strnatcmp.c
               include  apr_dso.h apr_file_io.h apr_general.h apr_getopt.h
                        apr_lib.h apr_lock.h apr_md5.h apr_mmap.h
                        apr_network_io.h apr_pools.h apr_portable.h
                        apr_shmem.h apr_strings.h apr_tables.h
                        apr_thread_proc.h apr_time.h apr_user.h apr_xlate.h
  Log:
  Make the APR headers sane.
  
  *) Reduce the dependencies between APR headers. This assists APR clients who
     generate dependencies, and (used to) pick up "all" of the APR headers.
     Basically, this was trimming back the headers to just what was needed.
     Some unneeded system headers were removed, too. The most common headers
     to put back in were: apr.h, apr_pools.h, and apr_errno.h.
  
  *) move apr_pool_t declaration and a few pool functions from apr_general.h
     to apr_pools.h.
  
  *) move kill_conditions and process_chain from apr_pools.h to
     apr_thread_proc.h.
  
  *) move apr_note_subprocess() from apr_general.h to apr_thread_proc.h
  
  *) add stdio.h to apr_pools.c (compensate for removal from apr_general.h)
  
  *) add apr_lib.h to apr_strnatcmp.c (compensate for apr_strings.h no longer
     including apr_lib.h)
  
  Revision  Changes    Path
  1.72      +3 -0      apr/lib/apr_pools.c
  
  Index: apr_pools.c
  ===================================================================
  RCS file: /home/cvs/apr/lib/apr_pools.c,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -u -r1.71 -r1.72
  --- apr_pools.c	2000/11/09 18:17:29	1.71
  +++ apr_pools.c	2000/11/26 02:59:56	1.72
  @@ -69,6 +69,9 @@
   #include "apr_lib.h"
   #include "apr_lock.h"
   
  +#ifdef HAVE_STDIO_H
  +#include <stdio.h>
  +#endif
   #ifdef HAVE_SYS_STAT_H
   #include <sys/stat.h>
   #endif
  
  
  
  1.5       +1 -1      apr/strings/apr_strnatcmp.c
  
  Index: apr_strnatcmp.c
  ===================================================================
  RCS file: /home/cvs/apr/strings/apr_strnatcmp.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -u -r1.4 -r1.5
  --- apr_strnatcmp.c	2000/08/06 15:48:40	1.4
  +++ apr_strnatcmp.c	2000/11/26 02:59:59	1.5
  @@ -23,9 +23,9 @@
   #include <ctype.h>
   #include <string.h>
   #include <assert.h>
  -#include <stdio.h>
   
   #include "apr_strings.h"
  +#include "apr_lib.h"            /* for apr_is*() */
   
   #if defined(__GNUC__)
   #  define UNUSED __attribute__((__unused__))
  
  
  
  1.23      +2 -1      apr/include/apr_dso.h
  
  Index: apr_dso.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_dso.h,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -u -r1.22 -r1.23
  --- apr_dso.h	2000/10/09 14:07:54	1.22
  +++ apr_dso.h	2000/11/26 02:59:59	1.23
  @@ -55,7 +55,8 @@
   #ifndef APR_DSO_DOT_H
   #define APR_DSO_DOT_H
   
  -#include "apr_general.h"
  +#include "apr.h"
  +#include "apr_pools.h"
   #include "apr_errno.h"
   
   /**
  
  
  
  1.74      +2 -4      apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_file_io.h,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -u -r1.73 -r1.74
  --- apr_file_io.h	2000/11/10 15:19:53	1.73
  +++ apr_file_io.h	2000/11/26 03:00:00	1.74
  @@ -55,12 +55,10 @@
   #ifndef APR_FILE_IO_H
   #define APR_FILE_IO_H
   
  -#include "apr_general.h"
  +#include "apr.h"
  +#include "apr_pools.h"
   #include "apr_time.h"
   #include "apr_errno.h"
  -#if APR_HAVE_SYS_UIO_H
  -#include <sys/uio.h>
  -#endif
   
   #ifdef __cplusplus
   extern "C" {
  
  
  
  1.44      +2 -105    apr/include/apr_general.h
  
  Index: apr_general.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_general.h,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -u -r1.43 -r1.44
  --- apr_general.h	2000/10/09 14:07:54	1.43
  +++ apr_general.h	2000/11/26 03:00:00	1.44
  @@ -56,17 +56,12 @@
   #define APR_GENERAL_H
   
   #include "apr.h"
  +#include "apr_pools.h"
  +#include "apr_errno.h"
   
  -#if APR_HAVE_STDIO_H
  -#include <stdio.h>
  -#endif
  -#if APR_HAVE_SYS_TYPES_H
  -#include <sys/types.h>
  -#endif
   #if APR_HAVE_SIGNAL_H
   #include <signal.h>
   #endif
  -#include "apr_errno.h"
   
   #ifdef __cplusplus
   extern "C" {
  @@ -255,104 +250,6 @@
   /* TODO: I'm not sure this is the best place to put this prototype...*/
   apr_status_t apr_generate_random_bytes(unsigned char * buf, int length);
   #endif
  -
  -/* Memory allocation/Pool debugging options... 
  - *
  - * Look in the developer documentation for details of what these do.
  - *
  - * NB These should ALL normally be commented out unless you REALLY
  - * need them!!
  - */
  - 
  -/*
  -#define ALLOC_DEBUG
  -#define POOL_DEBUG
  -#define ALLOC_USE_MALLOC
  -#define MAKE_TABLE_PROFILE
  -#define ALLOC_STATS
  -*/
  -
  -/**
  - * @package APR memory allocation
  - */
  -typedef struct apr_pool_t apr_pool_t;
  -
  -/** The memory allocation structure
  - */
  -struct apr_pool_t {
  -    /** The first block in this pool. */
  -    union block_hdr *first;
  -    /** The last block in this pool. */
  -    union block_hdr *last;
  -    /** The list of cleanups to run on pool cleanup. */
  -    struct cleanup *cleanups;
  -    /** A list of processes to kill when this pool is cleared */
  -    struct process_chain *subprocesses;
  -    /** The first sub_pool of this pool */
  -    struct apr_pool_t *sub_pools;
  -    /** The next sibling pool */
  -    struct apr_pool_t *sub_next;
  -    /** The previous sibling pool */
  -    struct apr_pool_t *sub_prev;
  -    /** The parent pool of this pool */
  -    struct apr_pool_t *parent;
  -    /** The first free byte in this pool */
  -    char *free_first_avail;
  -#ifdef ALLOC_USE_MALLOC
  -    /** The allocation list if using malloc */
  -    void *allocation_list;
  -#endif
  -#ifdef POOL_DEBUG
  -    /** a list of joined pools 
  -     *  @defvar apr_pool_t *joined */
  -    struct apr_pool_t *joined;
  -#endif
  -    /** A function to control how pools behave when they receive ENOMEM
  -     *  @deffunc int apr_abort(int retcode) */
  -    int (*apr_abort)(int retcode);
  -    /** A place to hand user data associated with this pool 
  -     *  @defvar datastruct *prog_data */
  -    struct datastruct *prog_data;
  -};
  - 
  -/* pool functions */
  -
  -/**
  - * Create a new pool.
  - * @param newcont The pool we have just created.
  - * @param cont The parent pool.  If this is NULL, the new pool is a root
  - *        pool.  If it is non-NULL, the new pool will inherit all
  - *        of it's parent pool's attributes, except the apr_pool_t will 
  - *        be a sub-pool.
  - */
  -apr_status_t apr_create_pool(apr_pool_t **newcont, apr_pool_t *cont);
  -
  -/**
  - * Set the data associated with the current pool
  - * @param data The user data associated with the pool.
  - * @param key The key to use for association
  - * @param cleanup The cleanup program to use to cleanup the data;
  - * @param cont The current pool.
  - * @tip The data to be attached to the pool should have the same
  - *      life span as the pool it is being attached to.
  - *
  - *      Users of APR must take EXTREME care when choosing a key to
  - *      use for their data.  It is possible to accidentally overwrite
  - *      data by choosing a key that another part of the program is using
  - *      It is advised that steps are taken to ensure that a unique
  - *      key is used at all times.
  - */
  -apr_status_t apr_set_userdata(const void *data, const char *key, 
  -                            apr_status_t (*cleanup) (void *), 
  -                            apr_pool_t *cont);
  -
  -/**
  - * Return the data associated with the current pool.
  - * @param data The key for the data to retrieve
  - * @param key The user data associated with the pool.
  - * @param cont The current pool.
  - */
  -apr_status_t apr_get_userdata(void **data, const char *key, apr_pool_t *cont);
   
   /**
    * Setup any APR internal data structures.  This MUST be the first function 
  
  
  
  1.26      +2 -0      apr/include/apr_getopt.h
  
  Index: apr_getopt.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_getopt.h,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -u -r1.25 -r1.26
  --- apr_getopt.h	2000/11/25 05:27:39	1.25
  +++ apr_getopt.h	2000/11/26 03:00:01	1.26
  @@ -55,6 +55,8 @@
   #ifndef APR_GETOPT_H
   #define APR_GETOPT_H
   
  +#include "apr_pools.h"
  +
   /**
    * @package APR command arguments
    */ 
  
  
  
  1.44      +1 -25     apr/include/apr_lib.h
  
  Index: apr_lib.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_lib.h,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -u -r1.43 -r1.44
  --- apr_lib.h	2000/10/16 06:04:43	1.43
  +++ apr_lib.h	2000/11/26 03:00:01	1.44
  @@ -56,11 +56,7 @@
   #define APR_LIB_H
   
   #include "apr.h"
  -#include "apr_pools.h"
  -#include "apr_general.h"
  -#include "apr_tables.h"
  -#include "apr_file_io.h"
  -#include "apr_thread_proc.h"
  +#include "apr_errno.h"
   
   #if APR_HAVE_CTYPE_H
   #include <ctype.h>
  @@ -68,9 +64,6 @@
   #if APR_HAVE_STDARG_H
   #include <stdarg.h>
   #endif
  -#if APR_HAVE_SYS_TYPES_H
  -#include <sys/types.h>
  -#endif
   
   /**
    * @package APR general-purpose library
  @@ -265,23 +258,6 @@
    * @deffunc apr_status_t apr_getpass(const char *prompt, char *pwbuf, size_t *bufsize)
    */
   APR_DECLARE(apr_status_t) apr_getpass(const char *prompt, char *pwbuf, size_t *bufsize);
  -
  -/**
  - * Register a process to be killed when a pool dies.
  - * @param a The pool to use to define the processes lifetime 
  - * @param pid The process to register
  - * @param how How to kill the process, one of:
  - * <PRE>
  - *         kill_never   	   -- process is never sent any signals
  - *         kill_always 	   -- process is sent SIGKILL on apr_pool_t cleanup	
  - *         kill_after_timeout -- SIGTERM, wait 3 seconds, SIGKILL
  - *         just_wait          -- wait forever for the process to complete
  - *         kill_only_once     -- send SIGTERM and then wait
  - * </PRE>
  - * @deffunc void apr_note_subprocess(struct apr_pool_t *a, apr_proc_t *pid, enum kill_conditions how)
  - */
  -APR_DECLARE(void) apr_note_subprocess(struct apr_pool_t *a, apr_proc_t *pid,
  -				     enum kill_conditions how);
   
   #ifdef __cplusplus
   }
  
  
  
  1.18      +2 -1      apr/include/apr_lock.h
  
  Index: apr_lock.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_lock.h,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -u -r1.17 -r1.18
  --- apr_lock.h	2000/08/02 05:26:05	1.17
  +++ apr_lock.h	2000/11/26 03:00:01	1.18
  @@ -55,7 +55,8 @@
   #ifndef APR_LOCKS_H
   #define APR_LOCKS_H
   
  -#include "apr_general.h"
  +#include "apr.h"
  +#include "apr_pools.h"
   #include "apr_errno.h"
   
   #ifdef __cplusplus
  
  
  
  1.19      +1 -1      apr/include/apr_md5.h
  
  Index: apr_md5.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_md5.h,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -u -r1.18 -r1.19
  --- apr_md5.h	2000/10/16 06:04:44	1.18
  +++ apr_md5.h	2000/11/26 03:00:02	1.19
  @@ -85,7 +85,7 @@
   #ifndef APR_MD5_H
   #define APR_MD5_H
   
  -#include "apr_lib.h"
  +#include "apr.h"
   #include "apr_xlate.h"
   
   #ifdef __cplusplus
  
  
  
  1.15      +3 -3      apr/include/apr_mmap.h
  
  Index: apr_mmap.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_mmap.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -u -r1.14 -r1.15
  --- apr_mmap.h	2000/08/05 04:26:45	1.14
  +++ apr_mmap.h	2000/11/26 03:00:02	1.15
  @@ -55,10 +55,10 @@
   #ifndef APR_MMAP_H
   #define APR_MMAP_H
   
  -#include "apr_general.h"
  +#include "apr.h"
  +#include "apr_pools.h"
   #include "apr_errno.h"
  -#include "apr_network_io.h"
  -#include "apr_portable.h"
  +#include "apr_file_io.h"        /* for apr_file_t */
   
   #ifdef __cplusplus
   extern "C" {
  
  
  
  1.84      +3 -1      apr/include/apr_network_io.h
  
  Index: apr_network_io.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_network_io.h,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -u -r1.83 -r1.84
  --- apr_network_io.h	2000/11/26 00:04:49	1.83
  +++ apr_network_io.h	2000/11/26 03:00:02	1.84
  @@ -59,9 +59,11 @@
    * @package APR Network library
    */
   
  -#include "apr_general.h"
  +#include "apr.h"
  +#include "apr_pools.h"
   #include "apr_file_io.h"
   #include "apr_errno.h"
  +
   #if APR_HAVE_NETINET_IN_H
   #include <netinet/in.h>
   #endif
  
  
  
  1.32      +95 -29    apr/include/apr_pools.h
  
  Index: apr_pools.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_pools.h,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -u -r1.31 -r1.32
  --- apr_pools.h	2000/10/16 06:04:44	1.31
  +++ apr_pools.h	2000/11/26 03:00:02	1.32
  @@ -85,38 +85,65 @@
    */
   
   #include "apr.h"
  -#include "apr_thread_proc.h"
  +#include "apr_errno.h"
   
  -#if APR_HAVE_SYS_TYPES_H
  -#include <sys/types.h>
  -#endif
  -#if APR_HAVE_STDARG_H
  -#include <stdarg.h>
  -#endif
  +/* Memory allocation/Pool debugging options... 
  + *
  + * Look in the developer documentation for details of what these do.
  + *
  + * NB These should ALL normally be commented out unless you REALLY
  + * need them!!
  + */
  + 
  +/*
  +#define ALLOC_DEBUG
  +#define POOL_DEBUG
  +#define ALLOC_USE_MALLOC
  +#define MAKE_TABLE_PROFILE
  +#define ALLOC_STATS
  +*/
   
  -enum kill_conditions {
  -    kill_never,                 /* process is never sent any signals */
  -    kill_always,                /* process is sent SIGKILL on apr_pool_t cleanup */
  -    kill_after_timeout,         /* SIGTERM, wait 3 seconds, SIGKILL */
  -    just_wait,                  /* wait forever for the process to complete */
  -    kill_only_once              /* send SIGTERM and then wait */
  -};
  +/**
  + * @package APR memory allocation
  + */
  +typedef struct apr_pool_t apr_pool_t;
   
  -/** A list of processes */
  -struct process_chain {
  -    /** The process ID */
  -    apr_proc_t *pid;
  -    /** When the process should be sent a signal. <PRE>
  -     *           kill_never   -- process is never sent any signals
  -     *           kill_always  -- process is sent SIGKILL on apr_pool_t cleanup
  -     *           kill_after_timeout -- SIGTERM, wait 3 seconds, SIGKILL
  -     *           just_wait    -- wait forever for the process to complete
  -     *           kill_only_once -- send SIGTERM and then wait </PRE>
  -     */
  -    enum kill_conditions kill_how;
  -    /** The next process in the list 
  -     *  @defvar process_chain *next */
  -    struct process_chain *next;
  +/** The memory allocation structure
  + */
  +struct apr_pool_t {
  +    /** The first block in this pool. */
  +    union block_hdr *first;
  +    /** The last block in this pool. */
  +    union block_hdr *last;
  +    /** The list of cleanups to run on pool cleanup. */
  +    struct cleanup *cleanups;
  +    /** A list of processes to kill when this pool is cleared */
  +    struct process_chain *subprocesses;
  +    /** The first sub_pool of this pool */
  +    struct apr_pool_t *sub_pools;
  +    /** The next sibling pool */
  +    struct apr_pool_t *sub_next;
  +    /** The previous sibling pool */
  +    struct apr_pool_t *sub_prev;
  +    /** The parent pool of this pool */
  +    struct apr_pool_t *parent;
  +    /** The first free byte in this pool */
  +    char *free_first_avail;
  +#ifdef ALLOC_USE_MALLOC
  +    /** The allocation list if using malloc */
  +    void *allocation_list;
  +#endif
  +#ifdef POOL_DEBUG
  +    /** a list of joined pools 
  +     *  @defvar apr_pool_t *joined */
  +    struct apr_pool_t *joined;
  +#endif
  +    /** A function to control how pools behave when they receive ENOMEM
  +     *  @deffunc int apr_abort(int retcode) */
  +    int (*apr_abort)(int retcode);
  +    /** A place to hand user data associated with this pool 
  +     *  @defvar datastruct *prog_data */
  +    struct datastruct *prog_data;
   };
   
   /* pools have nested lifetimes -- sub_pools are destroyed when the
  @@ -190,6 +217,45 @@
    *      automatically from apr_terminate. 
    */
   void apr_term_alloc(void);        /* Tear down everything */
  + 
  +/* pool functions */
  +
  +/**
  + * Create a new pool.
  + * @param newcont The pool we have just created.
  + * @param cont The parent pool.  If this is NULL, the new pool is a root
  + *        pool.  If it is non-NULL, the new pool will inherit all
  + *        of it's parent pool's attributes, except the apr_pool_t will 
  + *        be a sub-pool.
  + */
  +apr_status_t apr_create_pool(apr_pool_t **newcont, apr_pool_t *cont);
  +
  +/**
  + * Set the data associated with the current pool
  + * @param data The user data associated with the pool.
  + * @param key The key to use for association
  + * @param cleanup The cleanup program to use to cleanup the data;
  + * @param cont The current pool.
  + * @tip The data to be attached to the pool should have the same
  + *      life span as the pool it is being attached to.
  + *
  + *      Users of APR must take EXTREME care when choosing a key to
  + *      use for their data.  It is possible to accidentally overwrite
  + *      data by choosing a key that another part of the program is using
  + *      It is advised that steps are taken to ensure that a unique
  + *      key is used at all times.
  + */
  +apr_status_t apr_set_userdata(const void *data, const char *key, 
  +                            apr_status_t (*cleanup) (void *), 
  +                            apr_pool_t *cont);
  +
  +/**
  + * Return the data associated with the current pool.
  + * @param data The key for the data to retrieve
  + * @param key The user data associated with the pool.
  + * @param cont The current pool.
  + */
  +apr_status_t apr_get_userdata(void **data, const char *key, apr_pool_t *cont);
   
   /**
    * make a sub pool from the current pool
  
  
  
  1.40      +6 -5      apr/include/apr_portable.h
  
  Index: apr_portable.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_portable.h,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -u -r1.39 -r1.40
  --- apr_portable.h	2000/08/06 06:07:09	1.39
  +++ apr_portable.h	2000/11/26 03:00:03	1.40
  @@ -63,11 +63,8 @@
    * @package APR portability Routines
    */
   
  -#ifdef __cplusplus
  -extern "C" {
  -#endif /* __cplusplus */
  -
  -#include "apr_general.h"
  +#include "apr.h"
  +#include "apr_pools.h"
   #include "apr_thread_proc.h"
   #include "apr_file_io.h"
   #include "apr_network_io.h"
  @@ -88,6 +85,10 @@
   #if APR_HAVE_UNION_SEMUN
   #include <sys/sem.h>
   #endif
  +
  +#ifdef __cplusplus
  +extern "C" {
  +#endif /* __cplusplus */
   
   #ifdef WIN32
   /* The primitives for Windows types */
  
  
  
  1.13      +1 -1      apr/include/apr_shmem.h
  
  Index: apr_shmem.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_shmem.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -u -r1.12 -r1.13
  --- apr_shmem.h	2000/11/09 21:11:37	1.12
  +++ apr_shmem.h	2000/11/26 03:00:03	1.13
  @@ -60,7 +60,7 @@
    */
   
   #include "apr.h"
  -#include "apr_general.h"
  +#include "apr_pools.h"
   #include "apr_errno.h"
   
   #ifdef __cplusplus
  
  
  
  1.7       +7 -3      apr/include/apr_strings.h
  
  Index: apr_strings.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_strings.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -u -r1.6 -r1.7
  --- apr_strings.h	2000/10/28 15:01:34	1.6
  +++ apr_strings.h	2000/11/26 03:00:03	1.7
  @@ -75,12 +75,16 @@
     3. This notice may not be removed or altered from any source distribution.
   */
   
  +#ifndef APR_STRINGS_H
  +#define APR_STRINGS_H
   
   #include "apr.h"
  -#include "apr_lib.h"
  +#include "apr_errno.h"
  +#include "apr_pools.h"
   
  -#ifndef APR_STRINGS_H
  -#define APR_STRINGS_H
  +#if APR_HAVE_STDARG_H
  +#include <stdarg.h>
  +#endif
   
   #ifdef __cplusplus
   extern "C" {
  
  
  
  1.9       +3 -7      apr/include/apr_tables.h
  
  Index: apr_tables.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_tables.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -u -r1.8 -r1.9
  --- apr_tables.h	2000/10/16 06:04:44	1.8
  +++ apr_tables.h	2000/11/26 03:00:04	1.9
  @@ -55,15 +55,11 @@
   #ifndef APR_TABLES_H
   #define APR_TABLES_H
   
  -#include "apr_general.h"
  -#include "apr_file_io.h"
  -#include "apr_thread_proc.h"
  +#include "apr.h"
  +#include "apr_pools.h"
   
   #if APR_HAVE_STDARG_H
  -#include <stdarg.h>
  -#endif
  -#if APR_HAVE_SYS_TYPES_H
  -#include <sys/types.h>
  +#include <stdarg.h>     /* for va_list */
   #endif
   
   #ifdef __cplusplus
  
  
  
  1.48      +46 -1     apr/include/apr_thread_proc.h
  
  Index: apr_thread_proc.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_thread_proc.h,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -u -r1.47 -r1.48
  --- apr_thread_proc.h	2000/11/26 02:03:09	1.47
  +++ apr_thread_proc.h	2000/11/26 03:00:04	1.48
  @@ -55,9 +55,11 @@
   #ifndef APR_THREAD_PROC_H
   #define APR_THREAD_PROC_H
   
  +#include "apr.h"
   #include "apr_file_io.h"
  -#include "apr_general.h"
  +#include "apr_pools.h"
   #include "apr_errno.h"
  +
   #if APR_HAVE_STRUCT_RLIMIT
   #include <sys/time.h>
   #include <sys/resource.h>
  @@ -124,6 +126,31 @@
   
   typedef void *(APR_THREAD_FUNC *apr_thread_start_t)(void *);
   
  +enum kill_conditions {
  +    kill_never,                 /* process is never sent any signals */
  +    kill_always,                /* process is sent SIGKILL on apr_pool_t cleanup */
  +    kill_after_timeout,         /* SIGTERM, wait 3 seconds, SIGKILL */
  +    just_wait,                  /* wait forever for the process to complete */
  +    kill_only_once              /* send SIGTERM and then wait */
  +};
  +
  +/** A list of processes */
  +struct process_chain {
  +    /** The process ID */
  +    apr_proc_t *pid;
  +    /** When the process should be sent a signal. <PRE>
  +     *           kill_never   -- process is never sent any signals
  +     *           kill_always  -- process is sent SIGKILL on apr_pool_t cleanup
  +     *           kill_after_timeout -- SIGTERM, wait 3 seconds, SIGKILL
  +     *           just_wait    -- wait forever for the process to complete
  +     *           kill_only_once -- send SIGTERM and then wait </PRE>
  +     */
  +    enum kill_conditions kill_how;
  +    /** The next process in the list 
  +     *  @defvar process_chain *next */
  +    struct process_chain *next;
  +};
  +
   /* Thread Function definitions */
   
   /**
  @@ -480,6 +507,24 @@
    * @param sig How to kill the process.
    */
   apr_status_t apr_kill(apr_proc_t *proc, int sig);
  +
  +/**
  + * Register a process to be killed when a pool dies.
  + * @param a The pool to use to define the processes lifetime 
  + * @param pid The process to register
  + * @param how How to kill the process, one of:
  + * <PRE>
  + *         kill_never   	   -- process is never sent any signals
  + *         kill_always 	   -- process is sent SIGKILL on apr_pool_t cleanup	
  + *         kill_after_timeout -- SIGTERM, wait 3 seconds, SIGKILL
  + *         just_wait          -- wait forever for the process to complete
  + *         kill_only_once     -- send SIGTERM and then wait
  + * </PRE>
  + * @deffunc void apr_note_subprocess(struct apr_pool_t *a, apr_proc_t *pid, enum kill_conditions how)
  + */
  +APR_DECLARE(void) apr_note_subprocess(apr_pool_t *a, apr_proc_t *pid,
  +                                      enum kill_conditions how);
  +
   #ifdef __cplusplus
   }
   #endif
  
  
  
  1.29      +2 -1      apr/include/apr_time.h
  
  Index: apr_time.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_time.h,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -u -r1.28 -r1.29
  --- apr_time.h	2000/10/17 03:54:43	1.28
  +++ apr_time.h	2000/11/26 03:00:04	1.29
  @@ -55,7 +55,8 @@
   #ifndef APR_TIME_H
   #define APR_TIME_H
   
  -#include "apr_general.h"
  +#include "apr.h"
  +#include "apr_pools.h"
   #include "apr_errno.h"
   
   #ifdef __cplusplus
  
  
  
  1.2       +2 -0      apr/include/apr_user.h
  
  Index: apr_user.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_user.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- apr_user.h	2000/11/13 03:18:19	1.1
  +++ apr_user.h	2000/11/26 03:00:04	1.2
  @@ -56,6 +56,8 @@
   #define APR_USER_H
   
   #include "apr.h"
  +#include "apr_errno.h"
  +#include "apr_pools.h"
   
   #if APR_HAS_USER
   
  
  
  
  1.8       +1 -2      apr/include/apr_xlate.h
  
  Index: apr_xlate.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_xlate.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- apr_xlate.h	2000/08/06 06:07:10	1.7
  +++ apr_xlate.h	2000/11/26 03:00:05	1.8
  @@ -56,8 +56,7 @@
   #define APR_XLATE_H
   
   #include "apr.h"
  -#include "apr_general.h"
  -#include "apr_time.h"
  +#include "apr_pools.h"
   #include "apr_errno.h"
   
   #ifdef __cplusplus