apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/time/unix time.c
Date Fri, 29 Jun 2001 12:17:42 GMT
trawick     01/06/29 05:17:41

  Modified:    time/unix time.c
  Log:
  fix some compile breakage (on HP-UX, at least)... testtime is happy on
  HP-UX so hopefully the libc routines are called correctly
  
  Revision  Changes    Path
  1.47      +8 -8      apr/time/unix/time.c
  
  Index: time.c
  ===================================================================
  RCS file: /home/cvs/apr/time/unix/time.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- time.c	2001/06/29 08:23:14	1.46
  +++ time.c	2001/06/29 12:17:40	1.47
  @@ -82,13 +82,13 @@
           time_t t1 = time(0), t2 = 0;
           struct tm t;
   
  -# if APR_HAS_THREADS && defined (_POSIX_THREAD_SAFE_FUNCTIONS)
  -        gmtime_r(tt, &t);
  -# else
  -        t = *gmtime(tt);
  -# endif
  +#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
  +        gmtime_r(&t1, &t);
  +#else
  +        t = *gmtime(&t1);
  +#endif
           t2 = mktime(&t);
  -        return (apr_int32_t) difftime(t1,t2);
  +        return (apr_int32_t) difftime(t1, t2);
       }
   #endif
   }
  @@ -214,7 +214,7 @@
       (*ostime)->tm_isdst = aprtime->tm_isdst;
   #if HAVE_GMTOFF
       (*ostime)->tm_gmtoff = aprtime->tm_gmtoff;
  -#else if defined(HAVE__OFFSET)
  +#elif defined(HAVE__OFFSET)
       (*ostime)->__tm_gmtoff = aprtime->tm_gmtoff;
   #endif
       return APR_SUCCESS;
  @@ -241,7 +241,7 @@
       aprtime->tm_isdst = (*ostime)->tm_isdst;
   #if HAVE_GMTOFF
       aprtime->tm_gmtoff = (*ostime)->tm_gmtoff;
  -#else if defined(HAVE__OFFSET)
  +#elif defined(HAVE__OFFSET)
       aprtime->tm_gmtoff = (*ostime)->__tm_gmtoff;
   #endif
       return APR_SUCCESS;
  
  
  

Mime
View raw message