From 1c8ac73b0d3c2b0cba5cf7f24aeecc6676e3eb92 Mon Sep 17 00:00:00 2001 From: trawick Date: Fri, 29 Jun 2001 12:17:40 +0000 Subject: fix some compile breakage (on HP-UX, at least)... testtime is happy on HP-UX so hopefully the libc routines are called correctly git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61827 13f79535-47bb-0310-9956-ffa450edef68 --- time/unix/time.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'time') diff --git a/time/unix/time.c b/time/unix/time.c index 4763665d4..085c9aa8d 100644 --- a/time/unix/time.c +++ b/time/unix/time.c @@ -82,13 +82,13 @@ static apr_int32_t get_offset(struct tm *tm) 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 @@ apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime, (*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 @@ apr_status_t apr_os_exp_time_put(apr_exploded_time_t *aprtime, 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; -- cgit v1.2.1