dreid 01/04/12 15:44:42
Modified: time/unix time.c timestr.c
Log:
Daniel Padwa <[EMAIL PROTECTED]> 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.
Revision Changes Path
1.39 +6 -2 apr/time/unix/time.c
Index: time.c
===================================================================
RCS file: /home/cvs/apr/time/unix/time.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- time.c 2001/04/12 16:50:50 1.38
+++ time.c 2001/04/12 22:44:42 1.39
@@ -151,15 +151,19 @@
#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;
#endif
return apr_explode_time(result, input, offs);
}
-
apr_status_t apr_implode_time(apr_time_t *t, apr_exploded_time_t *xt)
{
1.23 +4 -0 apr/time/unix/timestr.c
Index: timestr.c
===================================================================
RCS file: /home/cvs/apr/time/unix/timestr.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- timestr.c 2001/04/12 16:50:50 1.22
+++ timestr.c 2001/04/12 22:44:42 1.23
@@ -181,7 +181,11 @@
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;
}