diff options
-rw-r--r-- | time/unix/time.c | 8 | ||||
-rw-r--r-- | time/unix/timestr.c | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/time/unix/time.c b/time/unix/time.c index dbf950364..31f056106 100644 --- a/time/unix/time.c +++ b/time/unix/time.c @@ -151,8 +151,13 @@ apr_status_t apr_explode_localtime(apr_exploded_time_t *result, apr_time_t input #if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) struct tm mangotm; localtime_r(&mangotm, &mango); +/* XXX - Add support for Solaris */ +#ifdef HAVE_GMTOFF offs = mangotm.tm_gmtoff; -#else +#elif defined(HAVE___OFFSET) + offs = mangotm.__tm_gmtoff; +#endif +#else /* !APR_HAS_THREADS */ struct tm *mangotm; mangotm=localtime(&mango); offs = mangotm->tm_gmtoff; @@ -160,7 +165,6 @@ apr_status_t apr_explode_localtime(apr_exploded_time_t *result, apr_time_t input return apr_explode_time(result, input, offs); } - apr_status_t apr_implode_time(apr_time_t *t, apr_exploded_time_t *xt) { int year; diff --git a/time/unix/timestr.c b/time/unix/timestr.c index d9ab7bd03..c41d876b1 100644 --- a/time/unix/timestr.c +++ b/time/unix/timestr.c @@ -181,7 +181,11 @@ apr_status_t apr_strftime(char *s, apr_size_t *retsize, apr_size_t max, tm.tm_wday = xt->tm_wday; tm.tm_yday = xt->tm_yday; tm.tm_isdst = xt->tm_isdst; +#if defined(HAVE_GMTOFF) tm.tm_gmtoff = xt->tm_gmtoff; +#elif defined(HAVE___OFFSET) + tm.__tm_gmtoff = xt->tm_gmtoff; +#endif (*retsize) = strftime(s, max, format, &tm); return APR_SUCCESS; } |