diff options
author | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2001-04-12 22:44:42 +0000 |
---|---|---|
committer | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2001-04-12 22:44:42 +0000 |
commit | 3efbcf04adb9cc52636fac70b1b96f0e4a773f18 (patch) | |
tree | c670ed74e2d0f77d15ec84f7c44d4dbb85126d44 /time | |
parent | 030b26a8b7e40d0d8fde0e95e83be9dcdcf56a83 (diff) | |
download | libapr-3efbcf04adb9cc52636fac70b1b96f0e4a773f18.tar.gz |
Daniel Padwa <daniel.padwa@gs.com> pointed out the last patch broke
the build on Solaris, so this patch is an attempt to get it building
again.
The eventual solution will be more general access functions for
getting/setting the timezone from the different structures. I've made
a partial start at it.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61519 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'time')
-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; } |