aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2020-09-05 17:48:45 -0700
committerPaul Eggert2020-09-05 17:51:25 -0700
commit2bba9cd409ce4b53639328e17da81db8dbda72c7 (patch)
tree410719d8bc3e23ea9140f71d81b8b4b7024ea339
parent2c1d8397788c1385debef514c59a6461b2e5408e (diff)
downloademacs-2bba9cd409ce4b53639328e17da81db8dbda72c7.tar.gz
emacs-2bba9cd409ce4b53639328e17da81db8dbda72c7.zip
Update from Gnulib
This incorporates: 2020-09-05 verify: avoid __builtin_assume 2020-08-30 strerrorname_np: New module 2020-08-26 include_next, stdint, time_rz: Change configure message * lib/gnulib.mk.in: Regenerate. * lib/string.in.h, lib/verify.h, m4/include_next.m4, m4/stdint.m4: * m4/string_h.m4, m4/time_rz.m4: Copy from Gnulib.
-rw-r--r--lib/gnulib.mk.in6
-rw-r--r--lib/string.in.h24
-rw-r--r--lib/verify.h45
-rw-r--r--m4/include_next.m418
-rw-r--r--m4/stdint.m418
-rw-r--r--m4/string_h.m489
-rw-r--r--m4/time_rz.m414
7 files changed, 111 insertions, 103 deletions
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index f564d501222..9953198fb31 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -442,6 +442,7 @@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
442GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ 442GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
443GNULIB_STRDUP = @GNULIB_STRDUP@ 443GNULIB_STRDUP = @GNULIB_STRDUP@
444GNULIB_STRERROR = @GNULIB_STRERROR@ 444GNULIB_STRERROR = @GNULIB_STRERROR@
445GNULIB_STRERRORNAME_NP = @GNULIB_STRERRORNAME_NP@
445GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ 446GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
446GNULIB_STRFTIME = @GNULIB_STRFTIME@ 447GNULIB_STRFTIME = @GNULIB_STRFTIME@
447GNULIB_STRNCAT = @GNULIB_STRNCAT@ 448GNULIB_STRNCAT = @GNULIB_STRNCAT@
@@ -662,6 +663,7 @@ HAVE_STPCPY = @HAVE_STPCPY@
662HAVE_STPNCPY = @HAVE_STPNCPY@ 663HAVE_STPNCPY = @HAVE_STPNCPY@
663HAVE_STRCASESTR = @HAVE_STRCASESTR@ 664HAVE_STRCASESTR = @HAVE_STRCASESTR@
664HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ 665HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
666HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
665HAVE_STRPBRK = @HAVE_STRPBRK@ 667HAVE_STRPBRK = @HAVE_STRPBRK@
666HAVE_STRPTIME = @HAVE_STRPTIME@ 668HAVE_STRPTIME = @HAVE_STRPTIME@
667HAVE_STRSEP = @HAVE_STRSEP@ 669HAVE_STRSEP = @HAVE_STRSEP@
@@ -965,6 +967,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
965REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ 967REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
966REPLACE_STRDUP = @REPLACE_STRDUP@ 968REPLACE_STRDUP = @REPLACE_STRDUP@
967REPLACE_STRERROR = @REPLACE_STRERROR@ 969REPLACE_STRERROR = @REPLACE_STRERROR@
970REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
968REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ 971REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
969REPLACE_STRFTIME = @REPLACE_STRFTIME@ 972REPLACE_STRFTIME = @REPLACE_STRFTIME@
970REPLACE_STRNCAT = @REPLACE_STRNCAT@ 973REPLACE_STRNCAT = @REPLACE_STRNCAT@
@@ -2859,6 +2862,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
2859 -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ 2862 -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
2860 -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ 2863 -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
2861 -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ 2864 -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
2865 -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GNULIB_STRERRORNAME_NP)/g' \
2862 -e 's/@''GNULIB_SIGABBREV_NP''@/$(GNULIB_SIGABBREV_NP)/g' \ 2866 -e 's/@''GNULIB_SIGABBREV_NP''@/$(GNULIB_SIGABBREV_NP)/g' \
2863 -e 's/@''GNULIB_SIGDESCR_NP''@/$(GNULIB_SIGDESCR_NP)/g' \ 2867 -e 's/@''GNULIB_SIGDESCR_NP''@/$(GNULIB_SIGDESCR_NP)/g' \
2864 -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ 2868 -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
@@ -2883,6 +2887,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
2883 -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ 2887 -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
2884 -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ 2888 -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
2885 -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ 2889 -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
2890 -e 's|@''HAVE_STRERRORNAME_NP''@|$(HAVE_STRERRORNAME_NP)|g' \
2886 -e 's|@''HAVE_SIGABBREV_NP''@|$(HAVE_SIGABBREV_NP)|g' \ 2891 -e 's|@''HAVE_SIGABBREV_NP''@|$(HAVE_SIGABBREV_NP)|g' \
2887 -e 's|@''HAVE_SIGDESCR_NP''@|$(HAVE_SIGDESCR_NP)|g' \ 2892 -e 's|@''HAVE_SIGDESCR_NP''@|$(HAVE_SIGDESCR_NP)|g' \
2888 -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ 2893 -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
@@ -2900,6 +2905,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
2900 -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ 2905 -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
2901 -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ 2906 -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
2902 -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ 2907 -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
2908 -e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g' \
2903 -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ 2909 -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
2904 -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ 2910 -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
2905 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 2911 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
diff --git a/lib/string.in.h b/lib/string.in.h
index 776133c5eba..9724addef43 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -1045,6 +1045,30 @@ _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
1045# endif 1045# endif
1046#endif 1046#endif
1047 1047
1048/* Return the name of the system error code ERRNUM. */
1049#if @GNULIB_STRERRORNAME_NP@
1050# if @REPLACE_STRERRORNAME_NP@
1051# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1052# undef strerrorname_np
1053# define strerrorname_np rpl_strerrorname_np
1054# endif
1055_GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum));
1056_GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum));
1057# else
1058# if !@HAVE_STRERRORNAME_NP@
1059_GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum));
1060# endif
1061_GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum));
1062# endif
1063_GL_CXXALIASWARN (strerrorname_np);
1064#elif defined GNULIB_POSIXCHECK
1065# undef strerrorname_np
1066# if HAVE_RAW_DECL_STRERRORNAME_NP
1067_GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - "
1068 "use gnulib module strerrorname_np for portability");
1069# endif
1070#endif
1071
1048/* Return an abbreviation string for the signal number SIG. */ 1072/* Return an abbreviation string for the signal number SIG. */
1049#if @GNULIB_SIGABBREV_NP@ 1073#if @GNULIB_SIGABBREV_NP@
1050# if ! @HAVE_SIGABBREV_NP@ 1074# if ! @HAVE_SIGABBREV_NP@
diff --git a/lib/verify.h b/lib/verify.h
index ca2a1540736..fa1ed717d0e 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -246,13 +246,6 @@ template <int w>
246 246
247/* @assert.h omit start@ */ 247/* @assert.h omit start@ */
248 248
249#if defined __has_builtin
250/* <https://clang.llvm.org/docs/LanguageExtensions.html#builtin-functions> */
251# define _GL_HAS_BUILTIN_ASSUME __has_builtin (__builtin_assume)
252#else
253# define _GL_HAS_BUILTIN_ASSUME 0
254#endif
255
256#if 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__)) 249#if 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))
257# define _GL_HAS_BUILTIN_TRAP 1 250# define _GL_HAS_BUILTIN_TRAP 1
258#elif defined __has_builtin 251#elif defined __has_builtin
@@ -312,36 +305,14 @@ template <int w>
312 305
313 Although assuming R can help a compiler generate better code or 306 Although assuming R can help a compiler generate better code or
314 diagnostics, performance can suffer if R uses hard-to-optimize 307 diagnostics, performance can suffer if R uses hard-to-optimize
315 features such as function calls not inlined by the compiler. */ 308 features such as function calls not inlined by the compiler.
316 309
317/* Use __builtin_assume in preference to __builtin_unreachable, because 310 Avoid Clang's __builtin_assume, as it breaks GNU Emacs master
318 in clang versions 8.0.x and older, the definition based on 311 as of 2020-08-23T21:09:49Z!eggert@cs.ucla.edu; see
319 __builtin_assume has an effect on optimizations, whereas the definition 312 <https://bugs.gnu.org/43152#71>. It's not known whether this breakage
320 based on __builtin_unreachable does not. (GCC so far has only 313 is a Clang bug or an Emacs bug; play it safe for now. */
321 __builtin_unreachable.) */ 314
322#if _GL_HAS_BUILTIN_ASSUME 315#if _GL_HAS_BUILTIN_UNREACHABLE
323/* Use __builtin_constant_p to help clang's data-flow analysis for the case
324 assume (0).
325 Use a temporary variable, to avoid a clang warning
326 "the argument to '__builtin_assume' has side effects that will be discarded"
327 if R contains invocations of functions not marked as 'const'.
328 The type of the temporary variable can't be __typeof__ (R), because that
329 does not work on bit field expressions. Use '_Bool' or 'bool' as type
330 instead. */
331# if defined __cplusplus
332# define assume(R) \
333 (__builtin_constant_p (R) && !(R) \
334 ? (void) __builtin_unreachable () \
335 : (void) ({ bool _gl_verify_temp = (R); \
336 __builtin_assume (_gl_verify_temp); }))
337# else
338# define assume(R) \
339 (__builtin_constant_p (R) && !(R) \
340 ? (void) __builtin_unreachable () \
341 : (void) ({ _Bool _gl_verify_temp = (R); \
342 __builtin_assume (_gl_verify_temp); }))
343# endif
344#elif _GL_HAS_BUILTIN_UNREACHABLE
345# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) 316# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
346#elif 1200 <= _MSC_VER 317#elif 1200 <= _MSC_VER
347# define assume(R) __assume (R) 318# define assume(R) __assume (R)
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index 33601aa3b43..9221d9f7d5f 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,4 +1,4 @@
1# include_next.m4 serial 25 1# include_next.m4 serial 26
2dnl Copyright (C) 2006-2020 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -106,19 +106,21 @@ dnl We intentionally avoid using AC_LANG_SOURCE here.
106 AC_SUBST([INCLUDE_NEXT]) 106 AC_SUBST([INCLUDE_NEXT])
107 AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) 107 AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
108 AC_SUBST([PRAGMA_SYSTEM_HEADER]) 108 AC_SUBST([PRAGMA_SYSTEM_HEADER])
109 AC_CACHE_CHECK([whether system header files limit the line length], 109
110 [gl_cv_pragma_columns], 110 dnl HP NonStop systems, which define __TANDEM, limit the line length
111 [dnl HP NonStop systems, which define __TANDEM, have this misfeature. 111 dnl after including some system header files.
112 AC_EGREP_CPP([choke me], 112 AC_CACHE_CHECK([whether source code line length is unlimited],
113 [gl_cv_source_line_length_unlimited],
114 [AC_EGREP_CPP([choke me],
113 [ 115 [
114#ifdef __TANDEM 116#ifdef __TANDEM
115choke me 117choke me
116#endif 118#endif
117 ], 119 ],
118 [gl_cv_pragma_columns=yes], 120 [gl_cv_source_line_length_unlimited=no],
119 [gl_cv_pragma_columns=no]) 121 [gl_cv_source_line_length_unlimited=yes])
120 ]) 122 ])
121 if test $gl_cv_pragma_columns = yes; then 123 if test $gl_cv_source_line_length_unlimited = no; then
122 PRAGMA_COLUMNS="#pragma COLUMNS 10000" 124 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
123 else 125 else
124 PRAGMA_COLUMNS= 126 PRAGMA_COLUMNS=
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index e0fa8a51fb3..d5f5d6133a9 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,4 +1,4 @@
1# stdint.m4 serial 55 1# stdint.m4 serial 56
2dnl Copyright (C) 2001-2020 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -302,9 +302,10 @@ static const char *macro_values[] =
302 HAVE_C99_STDINT_H=1 302 HAVE_C99_STDINT_H=1
303 dnl Now see whether the system <stdint.h> works without 303 dnl Now see whether the system <stdint.h> works without
304 dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. 304 dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
305 AC_CACHE_CHECK([whether stdint.h predates C++11], 305 dnl If not, there would be problems when stdint.h is included from C++.
306 [gl_cv_header_stdint_predates_cxx11_h], 306 AC_CACHE_CHECK([whether stdint.h works without ISO C predefines],
307 [gl_cv_header_stdint_predates_cxx11_h=yes 307 [gl_cv_header_stdint_without_STDC_macros],
308 [gl_cv_header_stdint_without_STDC_macros=no
308 AC_COMPILE_IFELSE([ 309 AC_COMPILE_IFELSE([
309 AC_LANG_PROGRAM([[ 310 AC_LANG_PROGRAM([[
310#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ 311#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
@@ -315,13 +316,14 @@ gl_STDINT_INCLUDES
315intmax_t im = INTMAX_MAX; 316intmax_t im = INTMAX_MAX;
316int32_t i32 = INT32_C (0x7fffffff); 317int32_t i32 = INT32_C (0x7fffffff);
317 ]])], 318 ]])],
318 [gl_cv_header_stdint_predates_cxx11_h=no])]) 319 [gl_cv_header_stdint_without_STDC_macros=yes])
320 ])
319 321
320 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then 322 if test $gl_cv_header_stdint_without_STDC_macros = no; then
321 AC_DEFINE([__STDC_CONSTANT_MACROS], [1], 323 AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
322 [Define to 1 if the system <stdint.h> predates C++11.]) 324 [Define to 1 if the system <stdint.h> predates C++11.])
323 AC_DEFINE([__STDC_LIMIT_MACROS], [1], 325 AC_DEFINE([__STDC_LIMIT_MACROS], [1],
324 [Define to 1 if the system <stdint.h> predates C++11.]) 326 [Define to 1 if the system <stdint.h> predates C++11.])
325 fi 327 fi
326 AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], 328 AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
327 [gl_cv_header_stdint_width], 329 [gl_cv_header_stdint_width],
diff --git a/m4/string_h.m4 b/m4/string_h.m4
index d7c12aaae87..29796b8629f 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -5,7 +5,7 @@
5# gives unlimited permission to copy and/or distribute it, 5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved. 6# with or without modifications, as long as this notice is preserved.
7 7
8# serial 26 8# serial 27
9 9
10# Written by Paul Eggert. 10# Written by Paul Eggert.
11 11
@@ -28,7 +28,7 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
28 ]], 28 ]],
29 [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul 29 [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
30 strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r 30 strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
31 strerror_r sigabbrev_np sigdescr_np strsignal strverscmp]) 31 strerror_r strerrorname_np sigabbrev_np sigdescr_np strsignal strverscmp])
32 32
33 AC_REQUIRE([AC_C_RESTRICT]) 33 AC_REQUIRE([AC_C_RESTRICT])
34]) 34])
@@ -44,47 +44,48 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
44 44
45AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], 45AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
46[ 46[
47 GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO]) 47 GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO])
48 GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) 48 GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
49 GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) 49 GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
50 GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) 50 GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
51 GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) 51 GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
52 GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) 52 GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
53 GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) 53 GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
54 GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) 54 GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR])
55 GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) 55 GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
56 GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) 56 GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
57 GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) 57 GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
58 GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) 58 GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP])
59 GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT]) 59 GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT])
60 GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) 60 GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP])
61 GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) 61 GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
62 GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) 62 GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
63 GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) 63 GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
64 GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) 64 GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR])
65 GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) 65 GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
66 GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) 66 GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
67 GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) 67 GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
68 GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) 68 GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN])
69 GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) 69 GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR])
70 GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) 70 GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR])
71 GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) 71 GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR])
72 GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) 72 GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP])
73 GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) 73 GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
74 GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) 74 GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
75 GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) 75 GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR])
76 GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) 76 GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN])
77 GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) 77 GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK])
78 GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) 78 GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
79 GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) 79 GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
80 GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) 80 GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
81 GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) 81 GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
82 GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R]) 82 GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R])
83 GNULIB_SIGABBREV_NP=0;AC_SUBST([GNULIB_SIGABBREV_NP]) 83 GNULIB_STRERRORNAME_NP=0; AC_SUBST([GNULIB_STRERRORNAME_NP])
84 GNULIB_SIGDESCR_NP=0; AC_SUBST([GNULIB_SIGDESCR_NP]) 84 GNULIB_SIGABBREV_NP=0; AC_SUBST([GNULIB_SIGABBREV_NP])
85 GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) 85 GNULIB_SIGDESCR_NP=0; AC_SUBST([GNULIB_SIGDESCR_NP])
86 GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) 86 GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
87 HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) 87 GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
88 HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
88 dnl Assume proper GNU behavior unless another module says otherwise. 89 dnl Assume proper GNU behavior unless another module says otherwise.
89 HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO]) 90 HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO])
90 HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) 91 HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
@@ -104,6 +105,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
104 HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) 105 HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
105 HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) 106 HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
106 HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R]) 107 HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R])
108 HAVE_STRERRORNAME_NP=1; AC_SUBST([HAVE_STRERRORNAME_NP])
107 HAVE_SIGABBREV_NP=1; AC_SUBST([HAVE_SIGABBREV_NP]) 109 HAVE_SIGABBREV_NP=1; AC_SUBST([HAVE_SIGABBREV_NP])
108 HAVE_SIGDESCR_NP=1; AC_SUBST([HAVE_SIGDESCR_NP]) 110 HAVE_SIGDESCR_NP=1; AC_SUBST([HAVE_SIGDESCR_NP])
109 HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) 111 HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
@@ -121,6 +123,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
121 REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) 123 REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
122 REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) 124 REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
123 REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) 125 REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R])
126 REPLACE_STRERRORNAME_NP=0; AC_SUBST([REPLACE_STRERRORNAME_NP])
124 REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) 127 REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
125 UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) 128 UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
126]) 129])
diff --git a/m4/time_rz.m4 b/m4/time_rz.m4
index 2dd64b28488..30161c01e63 100644
--- a/m4/time_rz.m4
+++ b/m4/time_rz.m4
@@ -13,12 +13,12 @@ AC_DEFUN([gl_TIME_RZ],
13 AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) 13 AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
14 AC_REQUIRE([AC_STRUCT_TIMEZONE]) 14 AC_REQUIRE([AC_STRUCT_TIMEZONE])
15 15
16 # Mac OS X 10.6 loops forever with some time_t values. 16 # On Mac OS X 10.6, localtime loops forever with some time_t values.
17 # See Bug#27706, Bug#27736, and 17 # See Bug#27706, Bug#27736, and
18 # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html 18 # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
19 AC_CACHE_CHECK([whether localtime loops forever near extrema], 19 AC_CACHE_CHECK([whether localtime works even near extrema],
20 [gl_cv_func_localtime_infloop_bug], 20 [gl_cv_func_localtime_works],
21 [gl_cv_func_localtime_infloop_bug=no 21 [gl_cv_func_localtime_works=yes
22 AC_RUN_IFELSE( 22 AC_RUN_IFELSE(
23 [AC_LANG_PROGRAM( 23 [AC_LANG_PROGRAM(
24 [[#include <stdlib.h> 24 [[#include <stdlib.h>
@@ -37,10 +37,10 @@ AC_DEFUN([gl_TIME_RZ],
37 return tm && tm->tm_isdst; 37 return tm && tm->tm_isdst;
38 ]])], 38 ]])],
39 [(TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 || 39 [(TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
40 gl_cv_func_localtime_infloop_bug=yes], 40 gl_cv_func_localtime_works=no],
41 [], 41 [],
42 [gl_cv_func_localtime_infloop_bug="guessing no"])]) 42 [gl_cv_func_localtime_works="guessing yes"])])
43 if test "$gl_cv_func_localtime_infloop_bug" = yes; then 43 if test "$gl_cv_func_localtime_works" = no; then
44 AC_DEFINE([HAVE_LOCALTIME_INFLOOP_BUG], 1, 44 AC_DEFINE([HAVE_LOCALTIME_INFLOOP_BUG], 1,
45 [Define if localtime-like functions can loop forever on 45 [Define if localtime-like functions can loop forever on
46 extreme arguments.]) 46 extreme arguments.])