summaryrefslogtreecommitdiff
path: root/m4/time_h.m4
diff options
context:
space:
mode:
authorDaniel Llorens <lloda@sarc.name>2021-08-16 13:23:27 +0200
committerDaniel Llorens <lloda@sarc.name>2021-08-16 13:23:27 +0200
commitb4a80f4239b19fea4d2cc3e9d197f24b809f0624 (patch)
treeb4dc728ec96391e302df4f7c733bf592a3976ff2 /m4/time_h.m4
parent5df5555d12f1408a66a5368a918abb981edf5445 (diff)
downloadguile-b4a80f4239b19fea4d2cc3e9d197f24b809f0624.tar.gz
Update gnulib to 8f4538a53d64054ae2fc8b86c0f87c418c6176e6
Includes gnulib:0c907f7da13232908f05c415b8cec56024071906 to fix #49930 https://lists.gnu.org/archive/html/bug-guile/2021-08/msg00003.html.
Diffstat (limited to 'm4/time_h.m4')
-rw-r--r--m4/time_h.m462
1 files changed, 36 insertions, 26 deletions
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index b6a1aa3bc..b57474b48 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -2,7 +2,7 @@
# Copyright (C) 2000-2001, 2003-2007, 2009-2021 Free Software Foundation, Inc.
-# serial 15
+# serial 18
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10,16 +10,11 @@
# Written by Paul Eggert and Jim Meyering.
-AC_DEFUN([gl_HEADER_TIME_H],
+AC_DEFUN_ONCE([gl_TIME_H],
[
- dnl Use AC_REQUIRE here, so that the default behavior below is expanded
- dnl once only, before all statements that occur in other macros.
- AC_REQUIRE([gl_HEADER_TIME_H_BODY])
-])
-
-AC_DEFUN([gl_HEADER_TIME_H_BODY],
-[
- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ dnl Ensure to expand the default settings once only, before all statements
+ dnl that occur in other macros.
+ AC_REQUIRE([gl_TIME_H_DEFAULTS])
gl_NEXT_HEADERS([time.h])
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
@@ -111,30 +106,45 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC])
])
+# gl_TIME_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
AC_DEFUN([gl_TIME_MODULE_INDICATOR],
[
- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ dnl Ensure to expand the default settings once only.
+ gl_TIME_H_REQUIRE_DEFAULTS
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
dnl Define it also as a C macro, for the benefit of the unit tests.
gl_MODULE_INDICATOR_FOR_TESTS([$1])
])
-AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd. It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS],
+[
+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULTS], [
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CTIME])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKTIME])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALTIME])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NANOSLEEP])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRFTIME])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_R])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_RZ])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZSET])
+ dnl Support Microsoft deprecated alias function names by default.
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TZSET], [1])
+ ])
+ m4_require(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULTS])
+ AC_REQUIRE([gl_TIME_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_TIME_H_DEFAULTS],
[
- GNULIB_CTIME=0; AC_SUBST([GNULIB_CTIME])
- GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME])
- GNULIB_LOCALTIME=0; AC_SUBST([GNULIB_LOCALTIME])
- GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP])
- GNULIB_STRFTIME=0; AC_SUBST([GNULIB_STRFTIME])
- GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME])
- GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM])
- GNULIB_TIMESPEC_GET=0; AC_SUBST([GNULIB_TIMESPEC_GET])
- GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R])
- GNULIB_TIME_RZ=0; AC_SUBST([GNULIB_TIME_RZ])
- GNULIB_TZSET=0; AC_SUBST([GNULIB_TZSET])
- dnl Support Microsoft deprecated alias function names by default.
- GNULIB_MDA_TZSET=1; AC_SUBST([GNULIB_MDA_TZSET])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R])
HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP])