You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rb...@apache.org on 2001/04/15 00:02:05 UTC
cvs commit: apr/time/unix time.c
rbb 01/04/14 15:02:05
Modified: . configure.in
time/unix time.c
Log:
Fix detection of tm_gmtoff in struct tm, and remove some warnings.
Revision Changes Path
1.291 +1 -1 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.290
retrieving revision 1.291
diff -u -d -b -w -u -r1.290 -r1.291
--- configure.in 2001/04/12 13:05:38 1.290
+++ configure.in 2001/04/14 22:02:04 1.291
@@ -967,7 +967,7 @@
echo $ac_n "${nl}Checking for Time Support...${nl}"
AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
[AC_TRY_COMPILE([#include <sys/types.h>
-#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
+#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
if test "$ac_cv_struct_tm_gmtoff" = "yes"; then
1.40 +2 -2 apr/time/unix/time.c
Index: time.c
===================================================================
RCS file: /home/cvs/apr/time/unix/time.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -b -w -u -r1.39 -r1.40
--- time.c 2001/04/12 22:44:42 1.39
+++ time.c 2001/04/14 22:02:04 1.40
@@ -146,11 +146,11 @@
apr_status_t apr_explode_localtime(apr_exploded_time_t *result, apr_time_t input)
{
time_t mango = input / APR_USEC_PER_SEC;
- apr_int32_t offs;
+ apr_int32_t offs = 0;
#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
struct tm mangotm;
- localtime_r(&mangotm, &mango);
+ localtime_r(&mango, &mangotm);
/* XXX - Add support for Solaris */
#ifdef HAVE_GMTOFF
offs = mangotm.tm_gmtoff;