Simon Josefsson <[EMAIL PROTECTED]> writes: > Is there any platform where tzname isn't defined in time.h?
If memory serves, the C Standard doesn't allow <time.h> to define tzname. Both Solaris and glibc define tzname conditionally, and can be compiled in pedantic mode. I don't know whether it comes up in practical builds, but it should be easy to do it "right". I installed this: 2008-01-15 Paul Eggert <[EMAIL PROTECTED]> 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. diff --git a/lib/getdate.y b/lib/getdate.y index 1ed914f..1deec51 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -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; diff --git a/lib/strftime.c b/lib/strftime.c index c6a9c80..897aab7 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -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