[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs
From: |
Paul Eggert |
Subject: |
Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs |
Date: |
11 Jun 2003 10:29:34 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Jason Rumney <address@hidden> writes:
> I wonder why you need to redeclare tzname[] there, do header files not
> already declare it on platforms where HAVE_TZNAME is defined?
Yes, depending on compilation options. For example, I get the
following symptomps on both Debian GNU/Linux 3.0r1 and on Solaris 8:
$ cat t.c
#include <time.h>
int main (void) { return !tzname; }
$ gcc -c t.c
$ gcc -c -ansi t.c
t.c: In function `main':
t.c:2: `tzname' undeclared (first use in this function)
t.c:2: (Each undeclared identifier is reported only once
t.c:2: for each function it appears in.)
This is because the C standard does not allow <time.h> to declare
tzname; a strictly conforming C program can declare its own variable
called 'tzname' with entirely different semantics.
Perhaps AC_STRUCT_TIMEZONE should also check whether tzname is
declared, and if so, define HAVE_DECL_TZNAME. Then we could adjust
the code as follows:
#if HAVE_TZNAME && !HAVE_DECL_TZNAME && !defined tzname
extern char *tzname[];
#endif
- [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Dave Love, 2003/06/06
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Jason Rumney, 2003/06/06
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Andrew Innes, 2003/06/09
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Dave Love, 2003/06/10
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Jason Rumney, 2003/06/10
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Bruno Haible, 2003/06/11
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Jason Rumney, 2003/06/11
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs,
Paul Eggert <=
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Eli Zaretskii, 2003/06/11
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Paul Eggert, 2003/06/11
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Bruno Haible, 2003/06/11
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Dave Love, 2003/06/12
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Paul Eggert, 2003/06/13
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Dave Love, 2003/06/16
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Paul Eggert, 2003/06/17
- Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Stephen J. Turnbull, 2003/06/17
Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs, Richard Stallman, 2003/06/07