]> Savannah Git Hosting - gnulib.git/commitdiff
time: Fix missing initialization of HAVE_TIMEZONE_T.
authorBruno Haible <bruno@clisp.org>
Wed, 10 May 2017 22:27:52 +0000 (00:27 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 10 May 2017 22:27:52 +0000 (00:27 +0200)
* 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.

ChangeLog
m4/sys_time_h.m4
m4/time_h.m4
m4/time_rz.m4
modules/time_rz

index 9c0d3b85b61bd7204d061ba4d6d0fafc644f8cdd..db28c2ee3fef2efe4bf50c1d9248deaa88b1c378 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-05-10 Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        Implement a way to opt out from MSVC support, part 2.
index e622dbe9a24d924f89802c64e2f53316608acb8c..1c8c3cfcc3272c61697e852e5687b662b6667ed2 100644 (file)
@@ -1,5 +1,5 @@
 # Configure a replacement for <sys/time.h>.
-# 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])
 ])
index f52b60192e86185f095e54cae48feb9bc3ca1bc1..28e22092e14fc4633188ce79f4d08f2063a40249 100644 (file)
@@ -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.
index 079e933b4e65522ed031a9ba02865e2209556b27..3991118b61cb5050cf2dba741e813f73021009a0 100644 (file)
@@ -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 <time.h>]])
index 1bc29f401f1e5c5a580215fc095c5a14c99df537..0285add1214b2e0bbfccef5713cac60075f111a1 100644 (file)
@@ -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])