rbb         99/12/06 10:19:54

  Modified:    src/lib/apr configure.in
               src/lib/apr/include apr.h.in apr_portable.h
               src/lib/apr/locks/unix locks.h
               src/lib/apr/time/unix atime.h
  Log:
  Cleaning up the config stuff for APR even more.  We had some small
  macros that weren't getting defined since the leakage problem was
  cleared up.  I think I fixed this.  And all APR macros will be using
  #if instead of #ifdef from now on.
  
  Revision  Changes    Path
  1.33      +33 -2     apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- configure.in      1999/12/06 15:47:42     1.32
  +++ configure.in      1999/12/06 18:19:26     1.33
  @@ -127,8 +127,39 @@
   AC_END_DECISION
   AC_DEFINE_UNQUOTED($ac_decision) 
   
  -AC_CHECK_LIB(pthread, pthread_mutex_init, AC_DEFINE(USE_PTHREAD_SERIALIZE))
  -AC_CHECK_LIB(c_r, pthread_mutex_init, AC_DEFINE(USE_PTHREAD_SERIALIZE))
  +if test ".$ac_decision" = ".USE_FLOCK_SERIALIZE"; then
  +    flockser="1"
  +else
  +    flockser="0"
  +fi 
  +if test ".$ac_decision" = ".USE_SYSVSEM_SERIALIZE"; then
  +    sysvser="1"
  +else
  +    sysvser="0"
  +fi
  +if test ".$ac_decision" = ".USE_FCNTL_SERIALIZE"; then
  +    fcntlser="1"
  +else
  +    fcntlser="0"
  +fi
  +if test ".$ac_decision" = ".USE_PROC_PTHREAD_SERIALIZE"; then
  +    procpthreadser="1"
  +else
  +    procpthreadser="0"
  +fi
  +
  +AC_SUBST(flockser)
  +AC_SUBST(sysvser)
  +AC_SUBST(fcntlser)
  +AC_SUBST(procpthreadser)
  +
  +AC_CHECK_LIB(pthread, pthread_mutex_init, [ 
  +    AC_DEFINE(USE_PTHREAD_SERIALIZE)
  +    pthreadser="1" ], [ pthreadser="0" ])
  +AC_CHECK_LIB(c_r, pthread_mutex_init, [ 
  +    AC_DEFINE(USE_PTHREAD_SERIALIZE)
  +    pthreadser="1" ], [ pthreadser="0" ])
  +AC_SUBST(pthreadser)
   ac_cv_define_READDIR_IS_THREAD_SAFE=no
   AC_CHECK_LIB(c_r, readdir, AC_DEFINE(READDIR_IS_THREAD_SAFE))
   
  
  
  
  1.6       +29 -1     apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- apr.h.in  1999/12/06 15:47:43     1.5
  +++ apr.h.in  1999/12/06 18:19:33     1.6
  @@ -1,7 +1,29 @@
  -
   #ifndef APR_H
   #define APR_H
   
  +/* So that we can use inline on some critical functions, and use
  + * GNUC attributes (such as to get -Wall warnings for printf-like
  + * functions).  Only do this in gcc 2.7 or later ... it may work
  + * on earlier stuff, but why chance it.
  + *
  + * We've since discovered that the gcc shipped with NeXT systems
  + * as "cc" is completely broken.  It claims to be __GNUC__ and so
  + * on, but it doesn't implement half of the things that __GNUC__
  + * means.  In particular it's missing inline and the __attribute__
  + * stuff.  So we hack around it.  PR#1613. -djg
  + */
  +#if !defined(__GNUC__) || __GNUC__ < 2 || \
  +    (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
  +    defined(NEXT)
  +#define ap_inline
  +#define __attribute__(__x)
  +#define ENUM_BITFIELD(e,n,w)  signed int n : w
  +#else
  +#define ap_inline __inline__
  +#define USE_GNU_INLINE
  +#define ENUM_BITFIELD(e,n,w)  e n : w
  +#endif
  +
   #define APR_HAVE_ERRNO_H        @errnoh@
   #define APR_HAVE_DIRENT_H       @direnth@
   #define APR_HAVE_FCNTL_H        @fcntlh@
  @@ -11,6 +33,12 @@
   #define APR_HAVE_STDIO_H        @stdioh@
   #define APR_HAVE_SYS_TYPES_H    @sys_typesh@
   #define APR_HAVE_SYS_UIO_H      @sys_uioh@
  +
  +#define APR_USE_FLOCK_SERIALIZE           @flockser@ 
  +#define APR_USE_SYSVSEM_SERIALIZE         @sysvser@
  +#define APR_USE_FCNTL_SERIALIZE           @fcntlser@
  +#define APR_USE_PROC_PTHREAD_SERIALIZE    @procpthreadser@ 
  +#define APR_USE_PTHREAD_SERIALIZE         @pthreadser@ 
   
   #if APR_HAVE_SYS_TYPES_H
   #include <sys/types.h>
  
  
  
  1.17      +5 -5      apache-2.0/src/lib/apr/include/apr_portable.h
  
  Index: apr_portable.h
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- apr_portable.h    1999/12/01 20:35:41     1.16
  +++ apr_portable.h    1999/12/06 18:19:34     1.17
  @@ -141,24 +141,24 @@
   #endif
   
   struct os_lock_t {
  -#if defined USE_SYSVSEM_SERIALIZE
  +#if APR_USE_SYSVSEM_SERIALIZE
       int crossproc;
       struct sembuf op_on;
       struct sembuf op_off;
  -#elif defined (USE_FCNTL_SERIALIZE)
  +#elif APR_USE_FCNTL_SERIALIZE
       int crossproc;
       struct flock lock_it;
       struct flock unlock_it;
  -#elif defined (USE_PROC_PTHREAD_SERIALIZE)
  +#elif APR_USE_PROC_PTHREAD_SERIALIZE
       pthread_mutex_t *crossproc; 
  -#elif defined (USE_FLOCK_SERIALIZE)
  +#elif APR_USE_FLOCK_SERIALIZE
       int crossproc;
   #else
       /* No Interprocess serialization, too bad. */
   #endif
   #if APR_HAS_THREADS
       /* If no threads, no need for thread locks */
  -#if defined (USE_PTHREAD_SERIALIZE)
  +#if APR_USE_PTHREAD_SERIALIZE
       pthread_mutex_t *intraproc;
   #endif
   #endif
  
  
  
  1.7       +4 -4      apache-2.0/src/lib/apr/locks/unix/locks.h
  
  Index: locks.h
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/src/lib/apr/locks/unix/locks.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- locks.h   1999/12/03 15:18:27     1.6
  +++ locks.h   1999/12/06 18:19:41     1.7
  @@ -110,17 +110,17 @@
       ap_locktype_e type;
       int curr_locked;
       char *fname;
  -#if defined (USE_SYSVSEM_SERIALIZE)
  +#if USE_SYSVSEM_SERIALIZE
       int interproc;
       struct sembuf op_on;
       struct sembuf op_off;
  -#elif defined (USE_FCNTL_SERIALIZE) 
  +#elif USE_FCNTL_SERIALIZE
       int interproc;
       struct flock lock_it;
       struct flock unlock_it;
  -#elif defined (USE_PROC_PTHREAD_SERIALIZE)
  +#elif USE_PROC_PTHREAD_SERIALIZE
       pthread_mutex_t *interproc;
  -#elif defined (USE_FLOCK_SERIALIZE)
  +#elif USE_FLOCK_SERIALIZE
       int interproc;
   #else
       /* No Interprocess serialization.  Too bad. */
  
  
  
  1.3       +3 -0      apache-2.0/src/lib/apr/time/unix/atime.h
  
  Index: atime.h
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/src/lib/apr/time/unix/atime.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- atime.h   1999/12/03 15:18:49     1.2
  +++ atime.h   1999/12/06 18:19:48     1.3
  @@ -64,6 +64,9 @@
   #if HAVE_SYS_TIME_H
   #include <sys/time.h>
   #endif
  +#if HAVE_TIME_H
  +#include <time.h>
  +#endif
   /* End System Headers */
   
   struct atime_t {
  
  
  

Reply via email to