summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-07-04 04:40:46 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-07-04 04:40:46 +0000
commitf9914d0bfb3044288be311b7aec94af3e63734e4 (patch)
tree0e9df8f91861353f8718cccc8f22b76eb2f693d2
parent3dcbb359e857b2e7645d0ad33eb0ad9fbee02a16 (diff)
downloadgnulib-f9914d0bfb3044288be311b7aec94af3e63734e4.tar.gz
Remove the dependency of the strftime module on the tzset module.
* modules/strftime (Depends-on): Remove dependency on tzset. * lib/strftime.c (my_strftime) [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]: Copy the input structure, to work around some of the bug with Solaris 2.5.1 and Solaris 2.6. If you still care about these old Solaris releases, you should also use the tzset module, but we won't require it as a dependency any more since we don't want LGPLed code to depend on GPLed code. * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require gl_FUNC_TZSET_CLOBBER.
-rw-r--r--ChangeLog5
-rw-r--r--lib/ChangeLog10
-rw-r--r--lib/strftime.c16
-rw-r--r--m4/ChangeLog5
-rw-r--r--m4/strftime.m43
-rw-r--r--modules/strftime1
6 files changed, 30 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index c36aae9980..0a05e7b24c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove the dependency of the strftime module on the tzset module.
+ * modules/strftime (Depends-on): Remove dependency on tzset.
+
2005-06-28 Jim Meyering <jim@meyering.net>
* check-module (find_included_lib_files): Hard-code another
diff --git a/lib/ChangeLog b/lib/ChangeLog
index ea0e6405e2..cbcd2a3f89 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,13 @@
+2005-07-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove the dependency of the strftime module on the tzset module.
+ * strftime.c (my_strftime) [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
+ Copy the input structure, to work around some of the bug with
+ Solaris 2.5.1 and Solaris 2.6. If you still care about these old
+ Solaris releases, you should also use the tzset module, but we won't
+ require it as a dependency any more since we don't want LGPLed code
+ to depend on GPLed code.
+
2005-07-02 Jim Meyering <jim@meyering.net>
* backupfile.c (backup_args): Change a `0' to NULL.
diff --git a/lib/strftime.c b/lib/strftime.c
index 37c51232b0..fb7354efd2 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -373,13 +373,6 @@ static CHAR_T const month_name[][10] =
# define ns 0
#endif
-#if ! defined _LIBC && ! HAVE_RUN_TZSET_TEST
-/* Solaris 2.5.x and 2.6 tzset sometimes modify the storage returned
- by localtime. On such systems, we must use the tzset and localtime
- wrappers to work around the bug. */
-"you must run the autoconf test for a working tzset function"
-#endif
-
/* Write information from TP into S according to the format
string FORMAT, writing no more that MAXSIZE characters
@@ -439,6 +432,15 @@ my_strftime (CHAR_T *s, size_t maxsize, const CHAR_T *format,
const char *format_end = NULL;
#endif
+#if ! defined _LIBC && ! HAVE_RUN_TZSET_TEST
+ /* Solaris 2.5.x and 2.6 tzset sometimes modify the storage returned
+ by localtime. On such systems, we must either use the tzset and
+ localtime wrappers to work around the bug (which sets
+ HAVE_RUN_TZSET_TEST) or make a copy of the structure. */
+ struct tm copy = *tp;
+ tp = &copy;
+#endif
+
zone = NULL;
#if HAVE_TM_ZONE
/* The POSIX test suite assumes that setting
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 9dcd968e3e..cea67d1765 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove the dependency of the strftime module on the tzset module.
+ * strftime.m4 (gl_FUNC_STRFTIME): Don't require gl_FUNC_TZSET_CLOBBER.
+
2005-07-02 Jim Meyering <jim@meyering.net>
* chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
diff --git a/m4/strftime.m4 b/m4/strftime.m4
index b47ea8ccc3..64cdf2b6ae 100644
--- a/m4/strftime.m4
+++ b/m4/strftime.m4
@@ -1,4 +1,4 @@
-#serial 24
+#serial 25
# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
@@ -29,7 +29,6 @@ AC_DEFUN([gl_FUNC_STRFTIME],
AC_REQUIRE([AC_HEADER_TIME])
AC_REQUIRE([AC_TYPE_MBSTATE_T])
AC_REQUIRE([gl_TM_GMTOFF])
- AC_REQUIRE([gl_FUNC_TZSET_CLOBBER])
AC_CHECK_FUNCS_ONCE(mblen mbrlen mempcpy tzset)
AC_CHECK_HEADERS_ONCE(sys/time.h wchar.h)
diff --git a/modules/strftime b/modules/strftime
index 7abe4206c1..18bc4118bc 100644
--- a/modules/strftime
+++ b/modules/strftime
@@ -10,7 +10,6 @@ m4/strftime.m4
Depends-on:
time_r
-tzset
stdbool
configure.ac: