summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2001-06-29 12:17:40 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2001-06-29 12:17:40 +0000
commit1c8ac73b0d3c2b0cba5cf7f24aeecc6676e3eb92 (patch)
treec69fa65a84003c81854868574149a7bfdcbb9758 /time
parentcab6e4dfd9351575438e6045b9c1570ee94a69b1 (diff)
downloadlibapr-1c8ac73b0d3c2b0cba5cf7f24aeecc6676e3eb92.tar.gz
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
Diffstat (limited to 'time')
-rw-r--r--time/unix/time.c16
1 files changed, 8 insertions, 8 deletions
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;