From: Bruno Haible Date: Wed, 10 May 2017 22:27:52 +0000 (+0200) Subject: time: Fix missing initialization of HAVE_TIMEZONE_T. X-Git-Tag: v1.0~6174 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=2511522d3b59597e8e43e88fdc894d6544c409fb;p=gnulib.git time: Fix missing initialization of HAVE_TIMEZONE_T. * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_TIMEZONE_T here... * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): ... not here. * m4/time_rz.m4 (gl_TIME_RZ): Require gl_HEADER_TIME_H_DEFAULTS, not gl_HEADER_SYS_TIME_H_DEFAULTS. * modules/time_rz (Depends-on): Add 'time'. Remove useless quoting. (configure.ac): Remove useless quoting. --- diff --git a/ChangeLog b/ChangeLog index 9c0d3b85b6..db28c2ee3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2017-05-10 Bruno Haible + + time: Fix missing initialization of HAVE_TIMEZONE_T. + * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_TIMEZONE_T + here... + * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): ... not here. + * m4/time_rz.m4 (gl_TIME_RZ): Require gl_HEADER_TIME_H_DEFAULTS, not + gl_HEADER_SYS_TIME_H_DEFAULTS. + * modules/time_rz (Depends-on): Add 'time'. Remove useless quoting. + (configure.ac): Remove useless quoting. + 2017-05-10 Bruno Haible Implement a way to opt out from MSVC support, part 2. diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4 index e622dbe9a2..1c8c3cfcc3 100644 --- a/m4/sys_time_h.m4 +++ b/m4/sys_time_h.m4 @@ -1,5 +1,5 @@ # Configure a replacement for . -# serial 8 +# serial 9 # Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -105,7 +105,6 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY]) HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H]) - HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY]) REPLACE_STRUCT_TIMEVAL=0; AC_SUBST([REPLACE_STRUCT_TIMEVAL]) ]) diff --git a/m4/time_h.m4 b/m4/time_h.m4 index f52b60192e..28e22092e1 100644 --- a/m4/time_h.m4 +++ b/m4/time_h.m4 @@ -2,7 +2,7 @@ # Copyright (C) 2000-2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. -# serial 10 +# serial 11 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -120,6 +120,8 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) HAVE_TZSET=1; AC_SUBST([HAVE_TZSET]) + dnl Even GNU libc does not have timezone_t yet. + HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) dnl If another module says to replace or to not replace, do that. dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; dnl this lets maintainers check for portability. diff --git a/m4/time_rz.m4 b/m4/time_rz.m4 index 079e933b4e..3991118b61 100644 --- a/m4/time_rz.m4 +++ b/m4/time_rz.m4 @@ -10,7 +10,7 @@ dnl Written by Paul Eggert. AC_DEFUN([gl_TIME_RZ], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([AC_STRUCT_TIMEZONE]) AC_CHECK_TYPES([timezone_t], [], [], [[#include ]]) diff --git a/modules/time_rz b/modules/time_rz index 1bc29f401f..0285add121 100644 --- a/modules/time_rz +++ b/modules/time_rz @@ -19,17 +19,18 @@ m4/time_rz.m4 Depends-on: extensions -flexmember [test "$HAVE_TIMEZONE_T" = 0] -setenv [test "$HAVE_TIMEZONE_T" = 0] -stdbool [test "$HAVE_TIMEZONE_T" = 0] -time_r [test "$HAVE_TIMEZONE_T" = 0] -timegm [test "$HAVE_TIMEZONE_T" = 0] -tzset [test "$HAVE_TIMEZONE_T" = 0] -unsetenv [test "$HAVE_TIMEZONE_T" = 0] +time +flexmember [test $HAVE_TIMEZONE_T = 0] +setenv [test $HAVE_TIMEZONE_T = 0] +stdbool [test $HAVE_TIMEZONE_T = 0] +time_r [test $HAVE_TIMEZONE_T = 0] +timegm [test $HAVE_TIMEZONE_T = 0] +tzset [test $HAVE_TIMEZONE_T = 0] +unsetenv [test $HAVE_TIMEZONE_T = 0] configure.ac: gl_TIME_RZ -if test "$HAVE_TIMEZONE_T" = 0; then +if test $HAVE_TIMEZONE_T = 0; then AC_LIBOBJ([time_rz]) fi gl_TIME_MODULE_INDICATOR([time_rz])