rbb         99/10/14 11:14:39

  Modified:    src/lib/apr/time/unix time.c
  Log:
  Rid ourselves of a warning, and make all the time functions use one lock.
  This is because all the time functions supposedly may use the same
  static memory space for their work.
  
  Revision  Changes    Path
  1.8       +5 -4      apache-2.0/src/lib/apr/time/unix/time.c
  
  Index: time.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/time.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- time.c    1999/10/14 17:39:03     1.7
  +++ time.c    1999/10/14 18:14:38     1.8
  @@ -63,8 +63,9 @@
   #include <errno.h>
   #include <string.h>
   
  -static ap_lock_t *lock_gmtime = NULL;
  -static ap_lock_t *lock_localtime = NULL;
  +#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
  +static ap_lock_t *lock_time = NULL;
  +#endif
   
   
   /* ***APRDOC********************************************************
  @@ -112,13 +113,13 @@
   {
       switch (type) {
       case APR_LOCALTIME: {
  -        SAFETY_LOCK(localtime, "localtimefile");
  +        SAFETY_LOCK(time, "timefile");
           LOCALTIME_R(&atime->currtime->tv_sec, atime->explodedtime);
           SAFETY_UNLOCK(localtime);
           break;
       }
       case APR_UTCTIME: {
  -        SAFETY_LOCK(gmtime, "gmtimefile");
  +        SAFETY_LOCK(time, "timefile");
           GMTIME_R(&atime->currtime->tv_sec, atime->explodedtime);
           SAFETY_UNLOCK(gmtime);
           break;
  
  
  

Reply via email to