From 427e34b361188a36bba44e5088bb60db01db8a47 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Aug 2006 16:24:42 +0000 Subject: [PATCH] * NEWS: Autoconf now uses constructs like "#ifdef HAVE_STDLIB_H" rather than "#if HAVE_STDLIB_H", so that it now works with "gcc -Wundef -Werror". Problem reported by David Fang in . * doc/autoconf.texi (Header Templates, Default Includes): (Particular Functions, Generic Functions, Header Portability): (Particular Headers, Generic Headers, Generic Declarations, Guidelines): (Obsolete Macros, AC_FOO_IFELSE vs AC_TRY_FOO): (Present But Cannot Be Compiled, Preprocessor Symbol Index): Prefer #ifdef to #if. * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Prefer #ifdef to #if. * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA, _AC_FUNC_MALLOC_IF): (AC_FUNC_MKTIME, AC_FUNC_MMAP, _AC_FUNC_REALLOC_IF): (AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETVBUF_REVERSED, _AC_FUNC_VFORK): Likewise. * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): (AC_HEADER_RESOLV, AC_HEADER_STAT): Likewise. * lib/autoconf/specific.m4 (AC_DECL_SYS_SYGLIST): (AC_SYS_RESTARTABLE_SYSCALLS): Likewise. * lib/autoconf/types.m4 (AC_STRUCT_TIMEZONE): Likewise. * lib/autoconf/headers.m4 (AC_HEADER_STAT): Don't assume that S_ISDIR etc. are valid for use in #if; POSIX doesn't guarantee this. --- ChangeLog | 26 ++++++++++++ NEWS | 3 ++ doc/autoconf.texi | 100 ++++++++++++++++++++++++---------------------- lib/autoconf/c.m4 | 3 +- lib/autoconf/functions.m4 | 34 ++++++++-------- lib/autoconf/headers.m4 | 42 ++++++++----------- lib/autoconf/specific.m4 | 4 +- lib/autoconf/types.m4 | 2 +- 8 files changed, 121 insertions(+), 93 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8801639..770fb026 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2006-08-15 Paul Eggert + + * NEWS: Autoconf now uses constructs like "#ifdef HAVE_STDLIB_H" + rather than "#if HAVE_STDLIB_H", so that it now works with "gcc + -Wundef -Werror". Problem reported by David Fang in + . + * doc/autoconf.texi (Header Templates, Default Includes): + (Particular Functions, Generic Functions, Header Portability): + (Particular Headers, Generic Headers, Generic Declarations, Guidelines): + (Obsolete Macros, AC_FOO_IFELSE vs AC_TRY_FOO): + (Present But Cannot Be Compiled, Preprocessor Symbol Index): + Prefer #ifdef to #if. + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Prefer #ifdef to #if. + * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA, _AC_FUNC_MALLOC_IF): + (AC_FUNC_MKTIME, AC_FUNC_MMAP, _AC_FUNC_REALLOC_IF): + (AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETVBUF_REVERSED, _AC_FUNC_VFORK): + Likewise. + * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): + (AC_HEADER_RESOLV, AC_HEADER_STAT): Likewise. + * lib/autoconf/specific.m4 (AC_DECL_SYS_SYGLIST): + (AC_SYS_RESTARTABLE_SYSCALLS): Likewise. + * lib/autoconf/types.m4 (AC_STRUCT_TIMEZONE): Likewise. + * lib/autoconf/headers.m4 (AC_HEADER_STAT): Don't assume that + S_ISDIR etc. are valid for use in #if; POSIX doesn't guarantee + this. + 2006-08-14 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Document sed diff --git a/NEWS b/NEWS index e6fccd74..711e9a90 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,9 @@ ** GNU M4 1.4.5 or later is now recommended. At least one "make check" test fails with earlier versions of M4. +** Autoconf now uses constructs like "#ifdef HAVE_STDLIB_H" rather than + "#if HAVE_STDLIB_H", so that it now works with "gcc -Wundef -Werror". + ** The functionality of the undocumented _AC_COMPUTE_INT is now provided by a public and documented macro, AC_COMPUTE_INT. The parameters to the two macros are different, so autoupdate will not change the old private name diff --git a/doc/autoconf.texi b/doc/autoconf.texi index fa64191f..7e8ac396 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -3007,7 +3007,7 @@ then decode the configuration header using the preprocessor directives: @group #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #else /* We are in trouble. */ @@ -3508,11 +3508,11 @@ protected includes, such as: @example @group -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -3536,36 +3536,36 @@ Expand to @var{include-directives} if defined, otherwise to: @example @group #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include #endif -#if HAVE_STDINT_H +#ifdef HAVE_STDINT_H # include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif @end group @@ -4346,7 +4346,7 @@ like the following, to declare it properly. @example @group -#if HAVE_ALLOCA_H +#ifdef HAVE_ALLOCA_H # include #elif defined __GNUC__ # define alloca __builtin_alloca @@ -4455,7 +4455,7 @@ previous versions of @command{autoconf} you're encouraged to define it yourself in new code: @example @group -#if !HAVE_WORKING_VFORK +#ifndef HAVE_WORKING_VFORK # define vfork fork #endif @end group @@ -4567,7 +4567,7 @@ systems, you must pass 0 to @code{getpgrp}, as it takes an argument and behaves like Posix's @code{getpgid}. @example -#if GETPGRP_VOID +#ifdef GETPGRP_VOID pid = getpgrp (); #else pid = getpgrp (0); @@ -4617,7 +4617,7 @@ Typically, the replacement file @file{malloc.c} should look like (note the @samp{#undef malloc}): @verbatim -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H # include #endif #undef malloc @@ -5024,7 +5024,7 @@ a convenient shorthand. @ovindex LIBOBJS Like @code{AC_CHECK_FUNCS}, but uses @samp{AC_LIBOBJ(@var{function})} as @var{action-if-not-found}. You can declare your replacement function by -enclosing the prototype in @samp{#if !HAVE_@var{function}}. If the +enclosing the prototype in @samp{#ifndef HAVE_@var{function}}. If the system has the function, it probably declares it in a header file you should be including, so you shouldn't redeclare it lest your declaration conflict. @@ -5089,15 +5089,15 @@ beforehand. One should run: AC_CHECK_HEADERS([sys/socket.h]) AC_CHECK_HEADERS([net/if.h], [], [], [#include -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H # include #endif ]) @@ -5112,15 +5112,15 @@ On Darwin, this file requires that @file{stdio.h} and AC_CHECK_HEADERS([sys/socket.h]) AC_CHECK_HEADERS([netinet/if_ether.h], [], [], [#include -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H # include #endif ]) @@ -5210,13 +5210,13 @@ something like the following: #else # define dirent direct # define NAMLEN(dirent) ((dirent)->d_namlen) -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include # endif -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include # endif -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include # endif #endif @@ -5258,7 +5258,7 @@ To properly use @file{resolv.h}, your code should contain something like the following: @verbatim -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_NETINET_IN_H @@ -5299,10 +5299,10 @@ If @file{stdbool.h} exists and conforms to C99, define @file{system.h} could contain the following code: @verbatim -#if HAVE_STDBOOL_H +#ifdef HAVE_STDBOOL_H # include #else -# if ! HAVE__BOOL +# ifndef HAVE__BOOL # ifdef __cplusplus typedef bool _Bool; # else @@ -5383,15 +5383,15 @@ then, in your code, you can use declarations like this: @group /* This example is obsolescent. Nowadays you can just #include . */ -#if STDC_HEADERS +#ifdef STDC_HEADERS # include #else -# if !HAVE_STRCHR +# ifndef HAVE_STRCHR # define strchr index # define strrchr rindex # endif char *strchr (), *strrchr (); -# if !HAVE_MEMCPY +# ifndef HAVE_MEMCPY # define memcpy(d, s, n) bcopy ((s), (d), (n)) # define memmove(d, s, n) bcopy ((s), (d), (n)) # endif @@ -5425,7 +5425,7 @@ example: @example @group #include -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H # include #endif #ifndef WEXITSTATUS @@ -5453,7 +5453,7 @@ The way to check whether the system supports Posix is: @example @group -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include # include #endif @@ -5481,11 +5481,11 @@ example, @code{struct timeval} as well as @example @group -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -5514,11 +5514,11 @@ Use: @example @group -#if HAVE_TERMIOS_H +#ifdef HAVE_TERMIOS_H # include #endif -#if GWINSZ_IN_SYS_IOCTL +#ifdef GWINSZ_IN_SYS_IOCTL # include #endif @end group @@ -5578,7 +5578,7 @@ scheme: @verbatim AC_CHECK_HEADERS([foo.h]) AC_CHECK_HEADERS([bar.h], [], [], -[#if HAVE_FOO_H +[#ifdef HAVE_FOO_H # include # endif ]) @@ -5659,7 +5659,7 @@ Unlike the other @samp{AC_CHECK_*S} macros, when a @var{symbol} is not declared, @code{HAVE_DECL_@var{symbol}} is defined to @samp{0} instead of leaving @code{HAVE_DECL_@var{symbol}} undeclared. When you are @emph{sure} that the check was performed, use -@code{HAVE_DECL_@var{symbol}} just like any other result of Autoconf: +@code{HAVE_DECL_@var{symbol}} in @code{#if}: @example #if !HAVE_DECL_SYMBOL @@ -7567,12 +7567,18 @@ example, if you call @code{AC_HEADER_STDBOOL}, then later on in @example @group -#if HAVE_STDBOOL_H +#ifdef HAVE_STDBOOL_H # include #endif @end group @end example +Both @code{#if HAVE_STDBOOL_H} and @code{#ifdef HAVE_STDBOOL_H} will +work with any standard C compiler. Some developers prefer @code{#if} +because it is easier to read, while others prefer @code{#ifdef} because +it avoids diagnostics with picky compilers like @acronym{GCC} with the +@option{-Wundef} option. + If a test program needs to use or create a data file, give it a name that starts with @file{conftest}, such as @file{conftest.data}. The @command{configure} script cleans up by running @samp{rm -f -r conftest*} @@ -16315,7 +16321,7 @@ equivalent modern code (see above), or better yet, to use @code{AC_CHECK_TYPES} together with @example -#if !HAVE_LOFF_T +#ifndef HAVE_LOFF_T typedef loff_t off_t; #endif @end example @@ -16377,7 +16383,7 @@ Same as: AC_CHECK_DECLS([sys_siglist], [], [], [#include /* NetBSD declares sys_siglist in unistd.h. */ -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif ]) @@ -17671,7 +17677,7 @@ The above example, properly written would (i) use @example @group AC_COMPILE_IFELSE([AC_LANG_PROGRAM( -[[#if !defined _AIX +[[#ifndef _AIX error: This isn't AIX! #endif ]])], @@ -18643,7 +18649,7 @@ The proper way the handle this case is using the fourth argument $ @kbd{cat configure.ac} AC_INIT([Example], [1.0], [bug-example@@example.org]) AC_CHECK_HEADERS([number.h pi.h], [], [], -[[#if HAVE_NUMBER_H +[[#ifdef HAVE_NUMBER_H # include #endif ]]) @@ -18921,7 +18927,7 @@ on how this is done. This is an alphabetical list of the C preprocessor symbols that the Autoconf macros define. To work with Autoconf, C source code needs to -use these names in @code{#if} directives. +use these names in @code{#if} or @code{#ifdef} directives. @printindex cv diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index dead340b..84047d15 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -1316,7 +1316,8 @@ AC_DEFUN([AC_C_BIGENDIAN], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], -[#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +[#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif ])], diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 3ad6b624..b4d37c73 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -370,7 +370,7 @@ AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works, # include # define alloca _alloca # else -# if HAVE_ALLOCA_H +# ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX @@ -875,7 +875,7 @@ AC_CHECK_HEADERS(stdlib.h) AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull, [AC_RUN_IFELSE( [AC_LANG_PROGRAM( -[[#if STDC_HEADERS || HAVE_STDLIB_H +[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); @@ -977,26 +977,26 @@ AC_CHECK_FUNCS(alarm) AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime, [AC_RUN_IFELSE([AC_LANG_SOURCE( [[/* Test program from Paul Eggert and Tony Leneis. */ -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H # include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif -#if !HAVE_ALARM +#ifndef HAVE_ALARM # define alarm(X) /* empty */ #endif @@ -1186,21 +1186,21 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped, #include #include -#if !STDC_HEADERS && !HAVE_STDLIB_H +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ -#if !HAVE_GETPAGESIZE +#ifndef HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ -# if !HAVE_SYS_PARAM_H +# ifndef HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ -# if HAVE_SYS_PARAM_H +# ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE @@ -1335,7 +1335,7 @@ AC_CHECK_HEADERS(stdlib.h) AC_CACHE_CHECK([for GNU libc compatible realloc], ac_cv_func_realloc_0_nonnull, [AC_RUN_IFELSE( [AC_LANG_PROGRAM( -[[#if STDC_HEADERS || HAVE_STDLIB_H +[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); @@ -1382,10 +1382,10 @@ AC_CACHE_CHECK([types of arguments for select], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H # include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H # include #endif ], @@ -1655,14 +1655,14 @@ AC_CACHE_CHECK(whether setvbuf arguments are reversed, AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include -# if PROTOTYPES +# ifdef PROTOTYPES int (setvbuf) (FILE *, int, char *, size_t); # endif]], [[char buf; return setvbuf (stdout, _IOLBF, &buf, 1);]])], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include -# if PROTOTYPES +# ifdef PROTOTYPES int (setvbuf) (FILE *, int, char *, size_t); # endif]], [[char buf; return setvbuf (stdout, &buf, _IOLBF, 1);]])], @@ -1822,7 +1822,7 @@ AC_DEFUN([_AC_FUNC_VFORK], [AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Thanks to Paul Eggert for this test. */ ]AC_INCLUDES_DEFAULT[ #include -#if HAVE_VFORK_H +#ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index af8fb498..0bbb3a8b 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -243,36 +243,36 @@ AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS], dnl If ever you change this variable, please keep autoconf.texi in sync. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include #endif -#if HAVE_STDINT_H +#ifdef HAVE_STDINT_H # include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif" ])dnl @@ -483,7 +483,7 @@ AN_HEADER(resolv.h, [AC_HEADER_RESOLV]) AC_DEFUN([AC_HEADER_RESOLV], [AC_CHECK_HEADERS(sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h, [], [], -[[#if HAVE_SYS_TYPES_H +[[#ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_NETINET_IN_H @@ -511,33 +511,25 @@ AN_IDENTIFIER([S_ISSOCK], [AC_HEADER_STAT]) AC_DEFUN([AC_HEADER_STAT], [AC_CACHE_CHECK(whether stat file-mode macros are broken, ac_cv_header_stat_broken, -[AC_EGREP_CPP([You lose], [#include +[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include #include #if defined S_ISBLK && defined S_IFDIR -# if S_ISBLK (S_IFDIR) -You lose. -# endif +extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR -# if S_ISBLK (S_IFCHR) -You lose. -# endif +extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG -# if S_ISLNK (S_IFREG) -You lose. -# endif +extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG -# if S_ISSOCK (S_IFREG) -You lose. -# endif +extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif -], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)]) +]])], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)]) if test $ac_cv_header_stat_broken = yes; then AC_DEFINE(STAT_MACROS_BROKEN, 1, [Define to 1 if the `S_IS*' macros in do not diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 8a6c6fa2..5b0dee2f 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -63,7 +63,7 @@ AU_DEFUN([AC_DECL_SYS_SIGLIST], [AC_CHECK_DECLS([sys_siglist],,, [#include /* NetBSD declares sys_siglist in unistd.h. */ -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif ]) @@ -256,7 +256,7 @@ AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls, AC_INCLUDES_DEFAULT #include -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H # include #endif diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4 index 1c45101e..1ec2a8ce 100644 --- a/lib/autoconf/types.m4 +++ b/lib/autoconf/types.m4 @@ -949,7 +949,7 @@ else AC_CACHE_CHECK(for tzname, ac_cv_var_tzname, [AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#include -#if !HAVE_DECL_TZNAME +#ifndef HAVE_DECL_TZNAME extern char *tzname[]; #endif ]], -- 2.11.4.GIT