Fix problem with getdate on mingw32 reported by Simon Josefsson
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 16 Jan 2008 00:32:59 +0000 (16:32 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 16 Jan 2008 00:32:59 +0000 (16:32 -0800)
in <http://lists.gnu.org/archive/html/bug-gnulib/2008-01/msg00192.html>.
* lib/getdate.y (get_date): Check "HAVE_DECL_TZNAME", not "defined
tzname", when deciding whether to declare tzname.
* lib/strftime.c (tzname): Likewise.

ChangeLog
lib/getdate.y
lib/strftime.c

index a457d34721009ae30d08ecbd121615b8c786a8e4..77b5eda30ceb26c88aaa6fe8382417676b9db4c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-01-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix problem with getdate on mingw32 reported by Simon Josefsson
+       in <http://lists.gnu.org/archive/html/bug-gnulib/2008-01/msg00192.html>.
+       * lib/getdate.y (get_date): Check "HAVE_DECL_TZNAME", not "defined
+       tzname", when deciding whether to declare tzname.
+       * lib/strftime.c (tzname): Likewise.
+
 2008-01-15  Bruno Haible  <bruno@clisp.org>
 
        Work around a MacOS X 10.5 bug in frexpl().
index 1ed914f31c57723aa03c22b106b006ed9e25522b..1deec5160de23f166e0e569778e8824cc4e56d4a 100644 (file)
@@ -1321,7 +1321,7 @@ get_date (struct timespec *result, char const *p, struct timespec const *now)
 #else
 #if HAVE_TZNAME
   {
-# ifndef tzname
+# if !HAVE_DECL_TZNAME
     extern char *tzname[];
 # endif
     int i;
index c6a9c8040da50eed0ecf8f9ae5298e37b43ea4c3..897aab71e5dd4063b05d955ed5b270077f9add91 100644 (file)
@@ -37,7 +37,7 @@
 #include <ctype.h>
 #include <time.h>
 
-#if HAVE_TZNAME && ! defined tzname
+#if HAVE_TZNAME && !HAVE_DECL_TZNAME
 extern char *tzname[];
 #endif