blob: 470212cabd0f26e75d3847666d77e70be11de6cb [file] [log] [blame]
Patrick Williams213cb262021-08-07 19:21:33 -05001From 4908050c39dbcdcbd59955ea23d692f25f342307 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 7 Jul 2021 13:42:35 -0700
4Subject: [PATCH] gnulib: Update
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 gnulib/lib/Makefile.am | 782 +++++++++++--------
10 gnulib/lib/_Noreturn.h | 8 +-
11 gnulib/lib/alloca.in.h | 20 +-
12 gnulib/lib/arg-nonnull.h | 8 +-
13 gnulib/lib/argz.c | 16 +-
14 gnulib/lib/argz.in.h | 14 +-
15 gnulib/lib/asnprintf.c | 16 +-
16 gnulib/lib/asprintf.c | 16 +-
17 gnulib/lib/attribute.h | 16 +-
18 gnulib/lib/basename-lgpl.c | 14 +-
19 gnulib/lib/basename-lgpl.h | 26 +-
20 gnulib/lib/btowc.c | 14 +-
21 gnulib/lib/c++defs.h | 8 +-
22 gnulib/lib/calloc.c | 55 ++
23 gnulib/lib/cdefs.h | 26 +-
24 gnulib/lib/cloexec.c | 18 +-
25 gnulib/lib/cloexec.h | 18 +-
26 gnulib/lib/close.c | 14 +-
27 gnulib/lib/dup2.c | 14 +-
28 gnulib/lib/dynarray.h | 24 +-
29 gnulib/lib/errno.in.h | 16 +-
30 gnulib/lib/error.c | 14 +-
31 gnulib/lib/error.h | 14 +-
32 gnulib/lib/exitfail.c | 14 +-
33 gnulib/lib/exitfail.h | 14 +-
34 gnulib/lib/fcntl.c | 14 +-
35 gnulib/lib/fcntl.in.h | 14 +-
36 gnulib/lib/fd-hook.c | 16 +-
37 gnulib/lib/fd-hook.h | 16 +-
38 gnulib/lib/filename.h | 8 +-
39 gnulib/lib/float+.h | 16 +-
40 gnulib/lib/float.c | 14 +-
41 gnulib/lib/float.in.h | 14 +-
42 gnulib/lib/free.c | 53 ++
43 gnulib/lib/fstat.c | 14 +-
44 gnulib/lib/getdtablesize.c | 14 +-
45 gnulib/lib/getopt-cdefs.in.h | 21 +-
46 gnulib/lib/getopt-core.h | 8 +-
47 gnulib/lib/getopt-ext.h | 8 +-
48 gnulib/lib/getopt-pfx-core.h | 21 +-
49 gnulib/lib/getopt-pfx-ext.h | 21 +-
50 gnulib/lib/getopt.c | 8 +-
51 gnulib/lib/getopt.in.h | 24 +-
52 gnulib/lib/getopt1.c | 8 +-
53 gnulib/lib/getopt_int.h | 8 +-
54 gnulib/lib/getprogname.c | 18 +-
55 gnulib/lib/getprogname.h | 8 +-
56 gnulib/lib/gettext.h | 16 +-
57 gnulib/lib/glthread/lock.c | 16 +-
58 gnulib/lib/glthread/lock.h | 16 +-
59 gnulib/lib/glthread/threadlib.c | 16 +-
60 gnulib/lib/hard-locale.c | 14 +-
61 gnulib/lib/hard-locale.h | 14 +-
62 gnulib/lib/ialloc.c | 21 +
63 gnulib/lib/ialloc.h | 94 +++
64 gnulib/lib/idx.h | 114 +++
65 gnulib/lib/intprops.h | 26 +-
66 gnulib/lib/inttypes.in.h | 14 +-
67 gnulib/lib/iswblank.c | 16 +-
68 gnulib/lib/iswdigit.c | 16 +-
69 gnulib/lib/iswxdigit.c | 16 +-
70 gnulib/lib/itold.c | 14 +-
71 gnulib/lib/langinfo.in.h | 16 +-
72 gnulib/lib/lc-charset-dispatch.c | 14 +-
73 gnulib/lib/lc-charset-dispatch.h | 14 +-
74 gnulib/lib/libc-config.h | 25 +-
75 gnulib/lib/limits.in.h | 16 +-
76 gnulib/lib/localcharset.c | 16 +-
77 gnulib/lib/localcharset.h | 16 +-
78 gnulib/lib/locale.in.h | 14 +-
79 gnulib/lib/localeconv.c | 14 +-
80 gnulib/lib/malloc.c | 51 +-
81 gnulib/lib/malloc/dynarray-skeleton.c | 8 +-
82 gnulib/lib/malloc/dynarray.h | 8 +-
83 gnulib/lib/malloc/dynarray_at_failure.c | 8 +-
84 gnulib/lib/malloc/dynarray_emplace_enlarge.c | 8 +-
85 gnulib/lib/malloc/dynarray_finalize.c | 8 +-
86 gnulib/lib/malloc/dynarray_resize.c | 8 +-
87 gnulib/lib/malloc/dynarray_resize_clear.c | 8 +-
88 gnulib/lib/malloca.c | 24 +-
89 gnulib/lib/malloca.h | 21 +-
90 gnulib/lib/mbchar.c | 14 +-
91 gnulib/lib/mbchar.h | 14 +-
92 gnulib/lib/mbiter.c | 18 +
93 gnulib/lib/mbiter.h | 14 +-
94 gnulib/lib/mbrtowc-impl-utf8.h | 16 +-
95 gnulib/lib/mbrtowc-impl.h | 14 +-
96 gnulib/lib/mbrtowc.c | 14 +-
97 gnulib/lib/mbscasecmp.c | 14 +-
98 gnulib/lib/mbschr.c | 14 +-
99 gnulib/lib/mbsinit.c | 14 +-
100 gnulib/lib/mbslen.c | 14 +-
101 gnulib/lib/mbsncasecmp.c | 14 +-
102 gnulib/lib/mbsstr.c | 14 +-
103 gnulib/lib/mbtowc-impl.h | 14 +-
104 gnulib/lib/mbtowc-lock.c | 14 +-
105 gnulib/lib/mbtowc-lock.h | 14 +-
106 gnulib/lib/mbtowc.c | 14 +-
107 gnulib/lib/mbuiter.c | 17 +
108 gnulib/lib/mbuiter.h | 14 +-
109 gnulib/lib/memchr.c | 24 +-
110 gnulib/lib/memchr.valgrind | 14 +-
111 gnulib/lib/mempcpy.c | 16 +-
112 gnulib/lib/memrchr.c | 14 +-
113 gnulib/lib/minmax.h | 60 ++
114 gnulib/lib/msvc-inval.c | 16 +-
115 gnulib/lib/msvc-inval.h | 16 +-
116 gnulib/lib/msvc-nothrow.c | 16 +-
117 gnulib/lib/msvc-nothrow.h | 16 +-
118 gnulib/lib/nl_langinfo-lock.c | 14 +-
119 gnulib/lib/nl_langinfo.c | 14 +-
120 gnulib/lib/open.c | 14 +-
121 gnulib/lib/pathmax.h | 16 +-
122 gnulib/lib/printf-args.c | 16 +-
123 gnulib/lib/printf-args.h | 16 +-
124 gnulib/lib/printf-parse.c | 27 +-
125 gnulib/lib/printf-parse.h | 16 +-
126 gnulib/lib/realloc.c | 63 ++
127 gnulib/lib/reallocarray.c | 39 +
128 gnulib/lib/regcomp.c | 8 +-
129 gnulib/lib/regex.c | 8 +-
130 gnulib/lib/regex.h | 8 +-
131 gnulib/lib/regex_internal.c | 8 +-
132 gnulib/lib/regex_internal.h | 8 +-
133 gnulib/lib/regexec.c | 20 +-
134 gnulib/lib/setlocale-lock.c | 14 +-
135 gnulib/lib/setlocale_null.c | 14 +-
136 gnulib/lib/setlocale_null.h | 14 +-
137 gnulib/lib/size_max.h | 16 +-
138 gnulib/lib/stat-time.c | 18 +
139 gnulib/lib/stat-time.h | 14 +-
140 gnulib/lib/stat-w32.c | 14 +-
141 gnulib/lib/stat-w32.h | 14 +-
142 gnulib/lib/stat.c | 14 +-
143 gnulib/lib/stdarg.in.h | 16 +-
144 gnulib/lib/stdbool.in.h | 16 +-
145 gnulib/lib/stddef.in.h | 16 +-
146 gnulib/lib/stdint.in.h | 20 +-
147 gnulib/lib/stdio.in.h | 24 +-
148 gnulib/lib/stdlib.in.h | 146 +++-
149 gnulib/lib/stpcpy.c | 14 +-
150 gnulib/lib/str-kmp.h | 26 +-
151 gnulib/lib/str-two-way.h | 16 +-
152 gnulib/lib/strcasecmp.c | 16 +-
153 gnulib/lib/strcasestr.c | 16 +-
154 gnulib/lib/strdup.c | 16 +-
155 gnulib/lib/streq.h | 16 +-
156 gnulib/lib/strerror-override.c | 100 +--
157 gnulib/lib/strerror-override.h | 15 +-
158 gnulib/lib/strerror.c | 14 +-
159 gnulib/lib/string.in.h | 18 +-
160 gnulib/lib/strings.in.h | 16 +-
161 gnulib/lib/strncasecmp.c | 16 +-
162 gnulib/lib/strndup.c | 16 +-
163 gnulib/lib/strnlen.c | 16 +-
164 gnulib/lib/strnlen1.c | 14 +-
165 gnulib/lib/strnlen1.h | 14 +-
166 gnulib/lib/strstr.c | 16 +-
167 gnulib/lib/sys_stat.in.h | 16 +-
168 gnulib/lib/sys_types.in.h | 16 +-
169 gnulib/lib/time.in.h | 58 +-
170 gnulib/lib/unistd.c | 18 +
171 gnulib/lib/unistd.in.h | 29 +-
172 gnulib/lib/unitypes.in.h | 16 +-
173 gnulib/lib/uniwidth.in.h | 16 +-
174 gnulib/lib/uniwidth/cjk.h | 16 +-
175 gnulib/lib/uniwidth/width.c | 16 +-
176 gnulib/lib/vasnprintf.c | 71 +-
177 gnulib/lib/vasnprintf.h | 16 +-
178 gnulib/lib/vasprintf.c | 16 +-
179 gnulib/lib/verify.h | 14 +-
180 gnulib/lib/warn-on-use.h | 8 +-
181 gnulib/lib/wchar.in.h | 18 +-
182 gnulib/lib/wcrtomb.c | 14 +-
183 gnulib/lib/wctype-h.c | 19 +
184 gnulib/lib/wctype.in.h | 26 +-
185 gnulib/lib/wcwidth.c | 14 +-
186 gnulib/lib/windows-initguard.h | 16 +-
187 gnulib/lib/windows-mutex.c | 16 +-
188 gnulib/lib/windows-mutex.h | 16 +-
189 gnulib/lib/windows-once.c | 16 +-
190 gnulib/lib/windows-once.h | 16 +-
191 gnulib/lib/windows-recmutex.c | 16 +-
192 gnulib/lib/windows-recmutex.h | 16 +-
193 gnulib/lib/windows-rwlock.c | 16 +-
194 gnulib/lib/windows-rwlock.h | 16 +-
195 gnulib/lib/xalloc-oversized.h | 53 +-
196 gnulib/lib/xalloc.h | 143 +---
197 gnulib/lib/xmalloc.c | 293 +++++--
198 gnulib/lib/xsize.c | 18 +
199 gnulib/lib/xsize.h | 16 +-
200 gnulib/m4/calloc.m4 | 82 ++
201 gnulib/m4/fcntl_h.m4 | 39 +-
202 gnulib/m4/free.m4 | 52 ++
203 gnulib/m4/fstat.m4 | 4 +-
204 gnulib/m4/gnulib-common.m4 | 84 +-
205 gnulib/m4/gnulib-comp.m4 | 192 ++++-
206 gnulib/m4/inttypes.m4 | 31 +-
207 gnulib/m4/iswdigit.m4 | 6 +-
208 gnulib/m4/iswxdigit.m4 | 4 +-
209 gnulib/m4/langinfo_h.m4 | 25 +-
210 gnulib/m4/largefile.m4 | 28 +-
211 gnulib/m4/locale_h.m4 | 37 +-
212 gnulib/m4/malloc.m4 | 152 +++-
213 gnulib/m4/math_h.m4 | 227 +++---
214 gnulib/m4/mbslen.m4 | 4 +-
215 gnulib/m4/memchr.m4 | 4 +-
216 gnulib/m4/mempcpy.m4 | 4 +-
217 gnulib/m4/memrchr.m4 | 4 +-
218 gnulib/m4/minmax.m4 | 44 ++
219 gnulib/m4/printf.m4 | 5 +-
220 gnulib/m4/realloc.m4 | 63 ++
221 gnulib/m4/reallocarray.m4 | 23 +
222 gnulib/m4/stat.m4 | 4 +-
223 gnulib/m4/stddef_h.m4 | 23 +-
224 gnulib/m4/stdint.m4 | 6 +-
225 gnulib/m4/stdio_h.m4 | 168 ++--
226 gnulib/m4/stdlib_h.m4 | 122 +--
227 gnulib/m4/stpcpy.m4 | 4 +-
228 gnulib/m4/strcase.m4 | 6 +-
229 gnulib/m4/strcasestr.m4 | 4 +-
230 gnulib/m4/strdup.m4 | 6 +-
231 gnulib/m4/strerror.m4 | 4 +-
232 gnulib/m4/string_h.m4 | 124 +--
233 gnulib/m4/strings_h.m4 | 38 +-
234 gnulib/m4/strndup.m4 | 4 +-
235 gnulib/m4/strnlen.m4 | 4 +-
236 gnulib/m4/strstr.m4 | 4 +-
237 gnulib/m4/sys_socket_h.m4 | 53 +-
238 gnulib/m4/sys_stat_h.m4 | 65 +-
239 gnulib/m4/sys_types_h.m4 | 16 +-
240 gnulib/m4/time_h.m4 | 62 +-
241 gnulib/m4/unistd_h.m4 | 194 ++---
242 gnulib/m4/visibility.m4 | 6 +-
243 gnulib/m4/wchar_h.m4 | 109 +--
244 gnulib/m4/wctype_h.m4 | 39 +-
245 gnulib/m4/wint_t.m4 | 10 +-
246 gnulib/m4/year2038.m4 | 112 +++
247 238 files changed, 4521 insertions(+), 2636 deletions(-)
248 create mode 100644 gnulib/lib/calloc.c
249 create mode 100644 gnulib/lib/free.c
250 create mode 100644 gnulib/lib/ialloc.c
251 create mode 100644 gnulib/lib/ialloc.h
252 create mode 100644 gnulib/lib/idx.h
253 create mode 100644 gnulib/lib/minmax.h
254 create mode 100644 gnulib/lib/realloc.c
255 create mode 100644 gnulib/lib/reallocarray.c
256 create mode 100644 gnulib/m4/calloc.m4
257 create mode 100644 gnulib/m4/free.m4
258 create mode 100644 gnulib/m4/minmax.m4
259 create mode 100644 gnulib/m4/realloc.m4
260 create mode 100644 gnulib/m4/reallocarray.m4
261 create mode 100644 gnulib/m4/year2038.m4
262
263--- a/gnulib/lib/Makefile.am
264+++ b/gnulib/lib/Makefile.am
265@@ -165,6 +165,24 @@ EXTRA_libgnu_a_SOURCES += btowc.c
266
267 ## end gnulib module btowc
268
269+## begin gnulib module calloc-gnu
270+
271+
272+EXTRA_DIST += calloc.c
273+
274+EXTRA_libgnu_a_SOURCES += calloc.c
275+
276+## end gnulib module calloc-gnu
277+
278+## begin gnulib module calloc-posix
279+
280+
281+EXTRA_DIST += calloc.c
282+
283+EXTRA_libgnu_a_SOURCES += calloc.c
284+
285+## end gnulib module calloc-posix
286+
287 ## begin gnulib module cloexec
288
289 if gl_GNULIB_ENABLED_cloexec
290@@ -200,6 +218,32 @@ EXTRA_libgnu_a_SOURCES += dup2.c
291 ## begin gnulib module dynarray
292
293 if gl_GNULIB_ENABLED_dynarray
294+BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h
295+
296+malloc/dynarray.gl.h: malloc/dynarray.h
297+ $(AM_V_at)$(MKDIR_P) malloc
298+ $(AM_V_GEN)rm -f $@-t $@ && \
299+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
300+ sed -e '/libc_hidden_proto/d' < $(srcdir)/malloc/dynarray.h; \
301+ } > $@-t && \
302+ mv $@-t $@
303+MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t
304+
305+malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
306+ $(AM_V_at)$(MKDIR_P) malloc
307+ $(AM_V_GEN)rm -f $@-t $@ && \
308+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
309+ sed -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
310+ -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \
311+ -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \
312+ -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \
313+ -e 's|__glibc_likely|_GL_LIKELY|g' \
314+ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
315+ < $(srcdir)/malloc/dynarray-skeleton.c; \
316+ } > $@-t && \
317+ mv $@-t $@
318+MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t
319+
320 libgnu_a_SOURCES += malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c malloc/dynarray_resize.c malloc/dynarray_resize_clear.c
321
322 endif
323@@ -285,13 +329,13 @@ fcntl.h: fcntl.in.h $(top_builddir)/conf
324 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
325 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
326 -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
327- -e 's/@''GNULIB_CREAT''@/$(GNULIB_CREAT)/g' \
328- -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
329- -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
330- -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
331- -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
332- -e 's/@''GNULIB_MDA_CREAT''@/$(GNULIB_MDA_CREAT)/g' \
333- -e 's/@''GNULIB_MDA_OPEN''@/$(GNULIB_MDA_OPEN)/g' \
334+ -e 's/@''GNULIB_CREAT''@/$(GL_GNULIB_CREAT)/g' \
335+ -e 's/@''GNULIB_FCNTL''@/$(GL_GNULIB_FCNTL)/g' \
336+ -e 's/@''GNULIB_NONBLOCKING''@/$(GL_GNULIB_NONBLOCKING)/g' \
337+ -e 's/@''GNULIB_OPEN''@/$(GL_GNULIB_OPEN)/g' \
338+ -e 's/@''GNULIB_OPENAT''@/$(GL_GNULIB_OPENAT)/g' \
339+ -e 's/@''GNULIB_MDA_CREAT''@/$(GL_GNULIB_MDA_CREAT)/g' \
340+ -e 's/@''GNULIB_MDA_OPEN''@/$(GL_GNULIB_MDA_OPEN)/g' \
341 -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
342 -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
343 -e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \
344@@ -358,6 +402,17 @@ EXTRA_libgnu_a_SOURCES += float.c itold.
345
346 ## end gnulib module float
347
348+## begin gnulib module free-posix
349+
350+if gl_GNULIB_ENABLED_ef07dc4b3077c11ea9cef586db4e5955
351+
352+endif
353+EXTRA_DIST += free.c
354+
355+EXTRA_libgnu_a_SOURCES += free.c
356+
357+## end gnulib module free-posix
358+
359 ## begin gnulib module fstat
360
361 if gl_GNULIB_ENABLED_fstat
362@@ -445,11 +500,23 @@ EXTRA_DIST += $(top_srcdir)/build-aux/co
363
364 ## end gnulib module havelib
365
366+## begin gnulib module ialloc
367+
368+libgnu_a_SOURCES += ialloc.c
369+
370+EXTRA_DIST += ialloc.h
371+
372+## end gnulib module ialloc
373+
374+## begin gnulib module idx
375+
376+libgnu_a_SOURCES += idx.h
377+
378+## end gnulib module idx
379+
380 ## begin gnulib module intprops
381
382-if gl_GNULIB_ENABLED_intprops
383
384-endif
385 EXTRA_DIST += intprops.h
386
387 ## end gnulib module intprops
388@@ -470,10 +537,10 @@ inttypes.h: inttypes.in.h $(top_builddir
389 -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
390 -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
391 -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
392- -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
393- -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
394- -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
395- -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
396+ -e 's/@''GNULIB_IMAXABS''@/$(GL_GNULIB_IMAXABS)/g' \
397+ -e 's/@''GNULIB_IMAXDIV''@/$(GL_GNULIB_IMAXDIV)/g' \
398+ -e 's/@''GNULIB_STRTOIMAX''@/$(GL_GNULIB_STRTOIMAX)/g' \
399+ -e 's/@''GNULIB_STRTOUMAX''@/$(GL_GNULIB_STRTOUMAX)/g' \
400 -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
401 -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
402 -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
403@@ -540,7 +607,7 @@ langinfo.h: langinfo.in.h $(top_builddir
404 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
405 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
406 -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
407- -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \
408+ -e 's/@''GNULIB_NL_LANGINFO''@/$(GL_GNULIB_NL_LANGINFO)/g' \
409 -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
410 -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
411 -e 's|@''HAVE_LANGINFO_ALTMON''@|$(HAVE_LANGINFO_ALTMON)|g' \
412@@ -622,11 +689,11 @@ locale.h: locale.in.h $(top_builddir)/co
413 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
414 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
415 -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
416- -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
417- -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
418- -e 's/@''GNULIB_SETLOCALE_NULL''@/$(GNULIB_SETLOCALE_NULL)/g' \
419- -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
420- -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \
421+ -e 's/@''GNULIB_LOCALECONV''@/$(GL_GNULIB_LOCALECONV)/g' \
422+ -e 's/@''GNULIB_SETLOCALE''@/$(GL_GNULIB_SETLOCALE)/g' \
423+ -e 's/@''GNULIB_SETLOCALE_NULL''@/$(GL_GNULIB_SETLOCALE_NULL)/g' \
424+ -e 's/@''GNULIB_DUPLOCALE''@/$(GL_GNULIB_DUPLOCALE)/g' \
425+ -e 's/@''GNULIB_LOCALENAME''@/$(GL_GNULIB_LOCALENAME)/g' \
426 -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \
427 -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
428 -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|g' \
429@@ -670,11 +737,18 @@ libgnu_a_SOURCES += glthread/lock.h glth
430 endif
431 ## end gnulib module lock
432
433+## begin gnulib module malloc-gnu
434+
435+
436+EXTRA_DIST += malloc.c
437+
438+EXTRA_libgnu_a_SOURCES += malloc.c
439+
440+## end gnulib module malloc-gnu
441+
442 ## begin gnulib module malloc-posix
443
444-if gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866
445
446-endif
447 EXTRA_DIST += malloc.c
448
449 EXTRA_libgnu_a_SOURCES += malloc.c
450@@ -805,6 +879,12 @@ EXTRA_libgnu_a_SOURCES += memrchr.c
451
452 ## end gnulib module memrchr
453
454+## begin gnulib module minmax
455+
456+libgnu_a_SOURCES += minmax.h
457+
458+## end gnulib module minmax
459+
460 ## begin gnulib module msvc-inval
461
462 if gl_GNULIB_ENABLED_f691f076f650964c9f5598c3ee487616
463@@ -856,6 +936,33 @@ EXTRA_DIST += pathmax.h
464
465 ## end gnulib module pathmax
466
467+## begin gnulib module realloc-gnu
468+
469+
470+EXTRA_DIST += realloc.c
471+
472+EXTRA_libgnu_a_SOURCES += realloc.c
473+
474+## end gnulib module realloc-gnu
475+
476+## begin gnulib module realloc-posix
477+
478+
479+EXTRA_DIST += realloc.c
480+
481+EXTRA_libgnu_a_SOURCES += realloc.c
482+
483+## end gnulib module realloc-posix
484+
485+## begin gnulib module reallocarray
486+
487+
488+EXTRA_DIST += reallocarray.c
489+
490+EXTRA_libgnu_a_SOURCES += reallocarray.c
491+
492+## end gnulib module reallocarray
493+
494 ## begin gnulib module regex
495
496
497@@ -1072,7 +1179,7 @@ stdint.h: stdint.in.h $(top_builddir)/co
498 -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
499 -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
500 -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
501- -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
502+ -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \
503 < $(srcdir)/stdint.in.h; \
504 } > $@-t && \
505 mv $@-t $@
506@@ -1100,65 +1207,65 @@ stdio.h: stdio.in.h $(top_builddir)/conf
507 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
508 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
509 -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
510- -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
511- -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
512- -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \
513- -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
514- -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
515- -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
516- -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
517- -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
518- -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
519- -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
520- -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
521- -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
522- -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
523- -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
524- -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
525- -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
526- -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
527- -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
528- -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
529- -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
530- -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
531- -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
532- -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
533- -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
534- -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
535- -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
536- -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \
537- -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
538- -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
539- -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
540- -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
541- -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
542- -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
543- -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
544- -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
545- -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
546- -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
547- -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
548- -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
549- -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
550- -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
551- -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
552- -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
553- -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
554- -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
555- -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
556- -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
557- -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
558- -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
559- -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
560- -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
561- -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
562- -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
563- -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GNULIB_MDA_FCLOSEALL)/g' \
564- -e 's/@''GNULIB_MDA_FDOPEN''@/$(GNULIB_MDA_FDOPEN)/g' \
565- -e 's/@''GNULIB_MDA_FILENO''@/$(GNULIB_MDA_FILENO)/g' \
566- -e 's/@''GNULIB_MDA_GETW''@/$(GNULIB_MDA_GETW)/g' \
567- -e 's/@''GNULIB_MDA_PUTW''@/$(GNULIB_MDA_PUTW)/g' \
568- -e 's/@''GNULIB_MDA_TEMPNAM''@/$(GNULIB_MDA_TEMPNAM)/g' \
569+ -e 's/@''GNULIB_DPRINTF''@/$(GL_GNULIB_DPRINTF)/g' \
570+ -e 's/@''GNULIB_FCLOSE''@/$(GL_GNULIB_FCLOSE)/g' \
571+ -e 's/@''GNULIB_FDOPEN''@/$(GL_GNULIB_FDOPEN)/g' \
572+ -e 's/@''GNULIB_FFLUSH''@/$(GL_GNULIB_FFLUSH)/g' \
573+ -e 's/@''GNULIB_FGETC''@/$(GL_GNULIB_FGETC)/g' \
574+ -e 's/@''GNULIB_FGETS''@/$(GL_GNULIB_FGETS)/g' \
575+ -e 's/@''GNULIB_FOPEN''@/$(GL_GNULIB_FOPEN)/g' \
576+ -e 's/@''GNULIB_FPRINTF''@/$(GL_GNULIB_FPRINTF)/g' \
577+ -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GL_GNULIB_FPRINTF_POSIX)/g' \
578+ -e 's/@''GNULIB_FPURGE''@/$(GL_GNULIB_FPURGE)/g' \
579+ -e 's/@''GNULIB_FPUTC''@/$(GL_GNULIB_FPUTC)/g' \
580+ -e 's/@''GNULIB_FPUTS''@/$(GL_GNULIB_FPUTS)/g' \
581+ -e 's/@''GNULIB_FREAD''@/$(GL_GNULIB_FREAD)/g' \
582+ -e 's/@''GNULIB_FREOPEN''@/$(GL_GNULIB_FREOPEN)/g' \
583+ -e 's/@''GNULIB_FSCANF''@/$(GL_GNULIB_FSCANF)/g' \
584+ -e 's/@''GNULIB_FSEEK''@/$(GL_GNULIB_FSEEK)/g' \
585+ -e 's/@''GNULIB_FSEEKO''@/$(GL_GNULIB_FSEEKO)/g' \
586+ -e 's/@''GNULIB_FTELL''@/$(GL_GNULIB_FTELL)/g' \
587+ -e 's/@''GNULIB_FTELLO''@/$(GL_GNULIB_FTELLO)/g' \
588+ -e 's/@''GNULIB_FWRITE''@/$(GL_GNULIB_FWRITE)/g' \
589+ -e 's/@''GNULIB_GETC''@/$(GL_GNULIB_GETC)/g' \
590+ -e 's/@''GNULIB_GETCHAR''@/$(GL_GNULIB_GETCHAR)/g' \
591+ -e 's/@''GNULIB_GETDELIM''@/$(GL_GNULIB_GETDELIM)/g' \
592+ -e 's/@''GNULIB_GETLINE''@/$(GL_GNULIB_GETLINE)/g' \
593+ -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GL_GNULIB_OBSTACK_PRINTF)/g' \
594+ -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GL_GNULIB_OBSTACK_PRINTF_POSIX)/g' \
595+ -e 's/@''GNULIB_PCLOSE''@/$(GL_GNULIB_PCLOSE)/g' \
596+ -e 's/@''GNULIB_PERROR''@/$(GL_GNULIB_PERROR)/g' \
597+ -e 's/@''GNULIB_POPEN''@/$(GL_GNULIB_POPEN)/g' \
598+ -e 's/@''GNULIB_PRINTF''@/$(GL_GNULIB_PRINTF)/g' \
599+ -e 's/@''GNULIB_PRINTF_POSIX''@/$(GL_GNULIB_PRINTF_POSIX)/g' \
600+ -e 's/@''GNULIB_PUTC''@/$(GL_GNULIB_PUTC)/g' \
601+ -e 's/@''GNULIB_PUTCHAR''@/$(GL_GNULIB_PUTCHAR)/g' \
602+ -e 's/@''GNULIB_PUTS''@/$(GL_GNULIB_PUTS)/g' \
603+ -e 's/@''GNULIB_REMOVE''@/$(GL_GNULIB_REMOVE)/g' \
604+ -e 's/@''GNULIB_RENAME''@/$(GL_GNULIB_RENAME)/g' \
605+ -e 's/@''GNULIB_RENAMEAT''@/$(GL_GNULIB_RENAMEAT)/g' \
606+ -e 's/@''GNULIB_SCANF''@/$(GL_GNULIB_SCANF)/g' \
607+ -e 's/@''GNULIB_SNPRINTF''@/$(GL_GNULIB_SNPRINTF)/g' \
608+ -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GL_GNULIB_SPRINTF_POSIX)/g' \
609+ -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GL_GNULIB_STDIO_H_NONBLOCKING)/g' \
610+ -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GL_GNULIB_STDIO_H_SIGPIPE)/g' \
611+ -e 's/@''GNULIB_TMPFILE''@/$(GL_GNULIB_TMPFILE)/g' \
612+ -e 's/@''GNULIB_VASPRINTF''@/$(GL_GNULIB_VASPRINTF)/g' \
613+ -e 's/@''GNULIB_VDPRINTF''@/$(GL_GNULIB_VDPRINTF)/g' \
614+ -e 's/@''GNULIB_VFPRINTF''@/$(GL_GNULIB_VFPRINTF)/g' \
615+ -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GL_GNULIB_VFPRINTF_POSIX)/g' \
616+ -e 's/@''GNULIB_VFSCANF''@/$(GL_GNULIB_VFSCANF)/g' \
617+ -e 's/@''GNULIB_VSCANF''@/$(GL_GNULIB_VSCANF)/g' \
618+ -e 's/@''GNULIB_VPRINTF''@/$(GL_GNULIB_VPRINTF)/g' \
619+ -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GL_GNULIB_VPRINTF_POSIX)/g' \
620+ -e 's/@''GNULIB_VSNPRINTF''@/$(GL_GNULIB_VSNPRINTF)/g' \
621+ -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GL_GNULIB_VSPRINTF_POSIX)/g' \
622+ -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GL_GNULIB_MDA_FCLOSEALL)/g' \
623+ -e 's/@''GNULIB_MDA_FDOPEN''@/$(GL_GNULIB_MDA_FDOPEN)/g' \
624+ -e 's/@''GNULIB_MDA_FILENO''@/$(GL_GNULIB_MDA_FILENO)/g' \
625+ -e 's/@''GNULIB_MDA_GETW''@/$(GL_GNULIB_MDA_GETW)/g' \
626+ -e 's/@''GNULIB_MDA_PUTW''@/$(GL_GNULIB_MDA_PUTW)/g' \
627+ -e 's/@''GNULIB_MDA_TEMPNAM''@/$(GL_GNULIB_MDA_TEMPNAM)/g' \
628 < $(srcdir)/stdio.in.h | \
629 sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
630 -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
631@@ -1236,49 +1343,51 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
632 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
633 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
634 -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
635- -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
636- -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GNULIB_ALIGNED_ALLOC)/g' \
637- -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
638- -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
639- -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
640- -e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \
641- -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
642- -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
643- -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
644- -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
645- -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
646- -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
647- -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
648- -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
649- -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
650- -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
651- -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GNULIB_POSIX_MEMALIGN)/g' \
652- -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
653- -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
654- -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
655- -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
656- -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
657- -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
658- -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
659- -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
660- -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \
661- -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
662- -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
663- -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
664- -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
665- -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
666- -e 's/@''GNULIB_STRTOLD''@/$(GNULIB_STRTOLD)/g' \
667- -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
668- -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
669- -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
670- -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
671- -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
672- -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
673- -e 's/@''GNULIB_MDA_ECVT''@/$(GNULIB_MDA_ECVT)/g' \
674- -e 's/@''GNULIB_MDA_FCVT''@/$(GNULIB_MDA_FCVT)/g' \
675- -e 's/@''GNULIB_MDA_GCVT''@/$(GNULIB_MDA_GCVT)/g' \
676- -e 's/@''GNULIB_MDA_MKTEMP''@/$(GNULIB_MDA_MKTEMP)/g' \
677- -e 's/@''GNULIB_MDA_PUTENV''@/$(GNULIB_MDA_PUTENV)/g' \
678+ -e 's/@''GNULIB__EXIT''@/$(GL_GNULIB__EXIT)/g' \
679+ -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GL_GNULIB_ALIGNED_ALLOC)/g' \
680+ -e 's/@''GNULIB_ATOLL''@/$(GL_GNULIB_ATOLL)/g' \
681+ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GL_GNULIB_CALLOC_POSIX)/g' \
682+ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZE_FILE_NAME)/g' \
683+ -e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
684+ -e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \
685+ -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \
686+ -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \
687+ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \
688+ -e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \
689+ -e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \
690+ -e 's/@''GNULIB_MKOSTEMP''@/$(GL_GNULIB_MKOSTEMP)/g' \
691+ -e 's/@''GNULIB_MKOSTEMPS''@/$(GL_GNULIB_MKOSTEMPS)/g' \
692+ -e 's/@''GNULIB_MKSTEMP''@/$(GL_GNULIB_MKSTEMP)/g' \
693+ -e 's/@''GNULIB_MKSTEMPS''@/$(GL_GNULIB_MKSTEMPS)/g' \
694+ -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GL_GNULIB_POSIX_MEMALIGN)/g' \
695+ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GL_GNULIB_POSIX_OPENPT)/g' \
696+ -e 's/@''GNULIB_PTSNAME''@/$(GL_GNULIB_PTSNAME)/g' \
697+ -e 's/@''GNULIB_PTSNAME_R''@/$(GL_GNULIB_PTSNAME_R)/g' \
698+ -e 's/@''GNULIB_PUTENV''@/$(GL_GNULIB_PUTENV)/g' \
699+ -e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \
700+ -e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \
701+ -e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \
702+ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GL_GNULIB_REALLOC_POSIX)/g' \
703+ -e 's/@''GNULIB_REALLOCARRAY''@/$(GL_GNULIB_REALLOCARRAY)/g' \
704+ -e 's/@''GNULIB_REALPATH''@/$(GL_GNULIB_REALPATH)/g' \
705+ -e 's/@''GNULIB_RPMATCH''@/$(GL_GNULIB_RPMATCH)/g' \
706+ -e 's/@''GNULIB_SECURE_GETENV''@/$(GL_GNULIB_SECURE_GETENV)/g' \
707+ -e 's/@''GNULIB_SETENV''@/$(GL_GNULIB_SETENV)/g' \
708+ -e 's/@''GNULIB_STRTOD''@/$(GL_GNULIB_STRTOD)/g' \
709+ -e 's/@''GNULIB_STRTOL''@/$(GL_GNULIB_STRTOL)/g' \
710+ -e 's/@''GNULIB_STRTOLD''@/$(GL_GNULIB_STRTOLD)/g' \
711+ -e 's/@''GNULIB_STRTOLL''@/$(GL_GNULIB_STRTOLL)/g' \
712+ -e 's/@''GNULIB_STRTOUL''@/$(GL_GNULIB_STRTOUL)/g' \
713+ -e 's/@''GNULIB_STRTOULL''@/$(GL_GNULIB_STRTOULL)/g' \
714+ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GL_GNULIB_SYSTEM_POSIX)/g' \
715+ -e 's/@''GNULIB_UNLOCKPT''@/$(GL_GNULIB_UNLOCKPT)/g' \
716+ -e 's/@''GNULIB_UNSETENV''@/$(GL_GNULIB_UNSETENV)/g' \
717+ -e 's/@''GNULIB_WCTOMB''@/$(GL_GNULIB_WCTOMB)/g' \
718+ -e 's/@''GNULIB_MDA_ECVT''@/$(GL_GNULIB_MDA_ECVT)/g' \
719+ -e 's/@''GNULIB_MDA_FCVT''@/$(GL_GNULIB_MDA_FCVT)/g' \
720+ -e 's/@''GNULIB_MDA_GCVT''@/$(GL_GNULIB_MDA_GCVT)/g' \
721+ -e 's/@''GNULIB_MDA_MKTEMP''@/$(GL_GNULIB_MDA_MKTEMP)/g' \
722+ -e 's/@''GNULIB_MDA_PUTENV''@/$(GL_GNULIB_MDA_PUTENV)/g' \
723 < $(srcdir)/stdlib.in.h | \
724 sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
725 -e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \
726@@ -1314,8 +1423,10 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
727 -e 's|@''HAVE_SETSTATE''@|$(HAVE_SETSTATE)|g' \
728 -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
729 -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
730+ -e 's|@''HAVE_STRTOL''@|$(HAVE_STRTOL)|g' \
731 -e 's|@''HAVE_STRTOLD''@|$(HAVE_STRTOLD)|g' \
732 -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
733+ -e 's|@''HAVE_STRTOUL''@|$(HAVE_STRTOUL)|g' \
734 -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
735 -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
736 -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
737@@ -1337,11 +1448,16 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
738 -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \
739 -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
740 -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
741+ -e 's|@''REPLACE_REALLOCARRAY''@|$(REPLACE_REALLOCARRAY)|g' \
742 -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
743 -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
744 -e 's|@''REPLACE_SETSTATE''@|$(REPLACE_SETSTATE)|g' \
745 -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
746+ -e 's|@''REPLACE_STRTOL''@|$(REPLACE_STRTOL)|g' \
747 -e 's|@''REPLACE_STRTOLD''@|$(REPLACE_STRTOLD)|g' \
748+ -e 's|@''REPLACE_STRTOLL''@|$(REPLACE_STRTOLL)|g' \
749+ -e 's|@''REPLACE_STRTOUL''@|$(REPLACE_STRTOUL)|g' \
750+ -e 's|@''REPLACE_STRTOULL''@|$(REPLACE_STRTOULL)|g' \
751 -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
752 -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
753 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
754@@ -1444,49 +1560,49 @@ string.h: string.in.h $(top_builddir)/co
755 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
756 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
757 -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
758- -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \
759- -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
760- -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
761- -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
762- -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
763- -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
764- -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
765- -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
766- -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
767- -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
768- -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
769- -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
770- -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
771- -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
772- -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
773- -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
774- -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
775- -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
776- -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
777- -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
778- -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
779- -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
780- -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
781- -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
782- -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
783- -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
784- -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
785- -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
786- -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
787- -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
788- -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
789- -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
790- -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
791- -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
792- -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
793- -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
794- -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GNULIB_STRERRORNAME_NP)/g' \
795- -e 's/@''GNULIB_SIGABBREV_NP''@/$(GNULIB_SIGABBREV_NP)/g' \
796- -e 's/@''GNULIB_SIGDESCR_NP''@/$(GNULIB_SIGDESCR_NP)/g' \
797- -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
798- -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
799- -e 's/@''GNULIB_MDA_MEMCCPY''@/$(GNULIB_MDA_MEMCCPY)/g' \
800- -e 's/@''GNULIB_MDA_STRDUP''@/$(GNULIB_MDA_STRDUP)/g' \
801+ -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GL_GNULIB_EXPLICIT_BZERO)/g' \
802+ -e 's/@''GNULIB_FFSL''@/$(GL_GNULIB_FFSL)/g' \
803+ -e 's/@''GNULIB_FFSLL''@/$(GL_GNULIB_FFSLL)/g' \
804+ -e 's/@''GNULIB_MBSLEN''@/$(GL_GNULIB_MBSLEN)/g' \
805+ -e 's/@''GNULIB_MBSNLEN''@/$(GL_GNULIB_MBSNLEN)/g' \
806+ -e 's/@''GNULIB_MBSCHR''@/$(GL_GNULIB_MBSCHR)/g' \
807+ -e 's/@''GNULIB_MBSRCHR''@/$(GL_GNULIB_MBSRCHR)/g' \
808+ -e 's/@''GNULIB_MBSSTR''@/$(GL_GNULIB_MBSSTR)/g' \
809+ -e 's/@''GNULIB_MBSCASECMP''@/$(GL_GNULIB_MBSCASECMP)/g' \
810+ -e 's/@''GNULIB_MBSNCASECMP''@/$(GL_GNULIB_MBSNCASECMP)/g' \
811+ -e 's/@''GNULIB_MBSPCASECMP''@/$(GL_GNULIB_MBSPCASECMP)/g' \
812+ -e 's/@''GNULIB_MBSCASESTR''@/$(GL_GNULIB_MBSCASESTR)/g' \
813+ -e 's/@''GNULIB_MBSCSPN''@/$(GL_GNULIB_MBSCSPN)/g' \
814+ -e 's/@''GNULIB_MBSPBRK''@/$(GL_GNULIB_MBSPBRK)/g' \
815+ -e 's/@''GNULIB_MBSSPN''@/$(GL_GNULIB_MBSSPN)/g' \
816+ -e 's/@''GNULIB_MBSSEP''@/$(GL_GNULIB_MBSSEP)/g' \
817+ -e 's/@''GNULIB_MBSTOK_R''@/$(GL_GNULIB_MBSTOK_R)/g' \
818+ -e 's/@''GNULIB_MEMCHR''@/$(GL_GNULIB_MEMCHR)/g' \
819+ -e 's/@''GNULIB_MEMMEM''@/$(GL_GNULIB_MEMMEM)/g' \
820+ -e 's/@''GNULIB_MEMPCPY''@/$(GL_GNULIB_MEMPCPY)/g' \
821+ -e 's/@''GNULIB_MEMRCHR''@/$(GL_GNULIB_MEMRCHR)/g' \
822+ -e 's/@''GNULIB_RAWMEMCHR''@/$(GL_GNULIB_RAWMEMCHR)/g' \
823+ -e 's/@''GNULIB_STPCPY''@/$(GL_GNULIB_STPCPY)/g' \
824+ -e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \
825+ -e 's/@''GNULIB_STRCHRNUL''@/$(GL_GNULIB_STRCHRNUL)/g' \
826+ -e 's/@''GNULIB_STRDUP''@/$(GL_GNULIB_STRDUP)/g' \
827+ -e 's/@''GNULIB_STRNCAT''@/$(GL_GNULIB_STRNCAT)/g' \
828+ -e 's/@''GNULIB_STRNDUP''@/$(GL_GNULIB_STRNDUP)/g' \
829+ -e 's/@''GNULIB_STRNLEN''@/$(GL_GNULIB_STRNLEN)/g' \
830+ -e 's/@''GNULIB_STRPBRK''@/$(GL_GNULIB_STRPBRK)/g' \
831+ -e 's/@''GNULIB_STRSEP''@/$(GL_GNULIB_STRSEP)/g' \
832+ -e 's/@''GNULIB_STRSTR''@/$(GL_GNULIB_STRSTR)/g' \
833+ -e 's/@''GNULIB_STRCASESTR''@/$(GL_GNULIB_STRCASESTR)/g' \
834+ -e 's/@''GNULIB_STRTOK_R''@/$(GL_GNULIB_STRTOK_R)/g' \
835+ -e 's/@''GNULIB_STRERROR''@/$(GL_GNULIB_STRERROR)/g' \
836+ -e 's/@''GNULIB_STRERROR_R''@/$(GL_GNULIB_STRERROR_R)/g' \
837+ -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GL_GNULIB_STRERRORNAME_NP)/g' \
838+ -e 's/@''GNULIB_SIGABBREV_NP''@/$(GL_GNULIB_SIGABBREV_NP)/g' \
839+ -e 's/@''GNULIB_SIGDESCR_NP''@/$(GL_GNULIB_SIGDESCR_NP)/g' \
840+ -e 's/@''GNULIB_STRSIGNAL''@/$(GL_GNULIB_STRSIGNAL)/g' \
841+ -e 's/@''GNULIB_STRVERSCMP''@/$(GL_GNULIB_STRVERSCMP)/g' \
842+ -e 's/@''GNULIB_MDA_MEMCCPY''@/$(GL_GNULIB_MDA_MEMCCPY)/g' \
843+ -e 's/@''GNULIB_MDA_STRDUP''@/$(GL_GNULIB_MDA_STRDUP)/g' \
844 < $(srcdir)/string.in.h | \
845 sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
846 -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
847@@ -1556,7 +1672,7 @@ strings.h: strings.in.h $(top_builddir)/
848 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
849 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
850 -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \
851- -e 's/@''GNULIB_FFS''@/$(GNULIB_FFS)/g' \
852+ -e 's/@''GNULIB_FFS''@/$(GL_GNULIB_FFS)/g' \
853 -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \
854 -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
855 -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
856@@ -1638,25 +1754,25 @@ sys/stat.h: sys_stat.in.h $(top_builddir
857 -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
858 -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
859 -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \
860- -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
861- -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
862- -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
863- -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
864- -e 's/@''GNULIB_GETUMASK''@/$(GNULIB_GETUMASK)/g' \
865- -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
866- -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
867- -e 's/@''GNULIB_MKDIR''@/$(GNULIB_MKDIR)/g' \
868- -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
869- -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
870- -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
871- -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
872- -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
873- -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
874- -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
875- -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
876- -e 's/@''GNULIB_MDA_CHMOD''@/$(GNULIB_MDA_CHMOD)/g' \
877- -e 's/@''GNULIB_MDA_MKDIR''@/$(GNULIB_MDA_MKDIR)/g' \
878- -e 's/@''GNULIB_MDA_UMASK''@/$(GNULIB_MDA_UMASK)/g' \
879+ -e 's/@''GNULIB_FCHMODAT''@/$(GL_GNULIB_FCHMODAT)/g' \
880+ -e 's/@''GNULIB_FSTAT''@/$(GL_GNULIB_FSTAT)/g' \
881+ -e 's/@''GNULIB_FSTATAT''@/$(GL_GNULIB_FSTATAT)/g' \
882+ -e 's/@''GNULIB_FUTIMENS''@/$(GL_GNULIB_FUTIMENS)/g' \
883+ -e 's/@''GNULIB_GETUMASK''@/$(GL_GNULIB_GETUMASK)/g' \
884+ -e 's/@''GNULIB_LCHMOD''@/$(GL_GNULIB_LCHMOD)/g' \
885+ -e 's/@''GNULIB_LSTAT''@/$(GL_GNULIB_LSTAT)/g' \
886+ -e 's/@''GNULIB_MKDIR''@/$(GL_GNULIB_MKDIR)/g' \
887+ -e 's/@''GNULIB_MKDIRAT''@/$(GL_GNULIB_MKDIRAT)/g' \
888+ -e 's/@''GNULIB_MKFIFO''@/$(GL_GNULIB_MKFIFO)/g' \
889+ -e 's/@''GNULIB_MKFIFOAT''@/$(GL_GNULIB_MKFIFOAT)/g' \
890+ -e 's/@''GNULIB_MKNOD''@/$(GL_GNULIB_MKNOD)/g' \
891+ -e 's/@''GNULIB_MKNODAT''@/$(GL_GNULIB_MKNODAT)/g' \
892+ -e 's/@''GNULIB_STAT''@/$(GL_GNULIB_STAT)/g' \
893+ -e 's/@''GNULIB_UTIMENSAT''@/$(GL_GNULIB_UTIMENSAT)/g' \
894+ -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GL_GNULIB_OVERRIDES_STRUCT_STAT)/g' \
895+ -e 's/@''GNULIB_MDA_CHMOD''@/$(GL_GNULIB_MDA_CHMOD)/g' \
896+ -e 's/@''GNULIB_MDA_MKDIR''@/$(GL_GNULIB_MDA_MKDIR)/g' \
897+ -e 's/@''GNULIB_MDA_UMASK''@/$(GL_GNULIB_MDA_UMASK)/g' \
898 -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
899 -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
900 -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
901@@ -1744,18 +1860,18 @@ time.h: time.in.h $(top_builddir)/config
902 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
903 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
904 -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
905- -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \
906- -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \
907- -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
908- -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
909- -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
910- -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
911- -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
912- -e 's/@''GNULIB_TIMESPEC_GET''@/$(GNULIB_TIMESPEC_GET)/g' \
913- -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
914- -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
915- -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
916- -e 's/@''GNULIB_MDA_TZSET''@/$(GNULIB_MDA_TZSET)/g' \
917+ -e 's/@''GNULIB_CTIME''@/$(GL_GNULIB_CTIME)/g' \
918+ -e 's/@''GNULIB_LOCALTIME''@/$(GL_GNULIB_LOCALTIME)/g' \
919+ -e 's/@''GNULIB_MKTIME''@/$(GL_GNULIB_MKTIME)/g' \
920+ -e 's/@''GNULIB_NANOSLEEP''@/$(GL_GNULIB_NANOSLEEP)/g' \
921+ -e 's/@''GNULIB_STRFTIME''@/$(GL_GNULIB_STRFTIME)/g' \
922+ -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \
923+ -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \
924+ -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \
925+ -e 's/@''GNULIB_TIME_R''@/$(GL_GNULIB_TIME_R)/g' \
926+ -e 's/@''GNULIB_TIME_RZ''@/$(GL_GNULIB_TIME_RZ)/g' \
927+ -e 's/@''GNULIB_TZSET''@/$(GL_GNULIB_TZSET)/g' \
928+ -e 's/@''GNULIB_MDA_TZSET''@/$(GL_GNULIB_MDA_TZSET)/g' \
929 -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
930 -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
931 -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
932@@ -1806,89 +1922,89 @@ unistd.h: unistd.in.h $(top_builddir)/co
933 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
934 -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
935 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
936- -e 's/@''GNULIB_ACCESS''@/$(GNULIB_ACCESS)/g' \
937- -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
938- -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
939- -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
940- -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GNULIB_COPY_FILE_RANGE)/g' \
941- -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
942- -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
943- -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
944- -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
945- -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
946- -e 's/@''GNULIB_EXECL''@/$(GNULIB_EXECL)/g' \
947- -e 's/@''GNULIB_EXECLE''@/$(GNULIB_EXECLE)/g' \
948- -e 's/@''GNULIB_EXECLP''@/$(GNULIB_EXECLP)/g' \
949- -e 's/@''GNULIB_EXECV''@/$(GNULIB_EXECV)/g' \
950- -e 's/@''GNULIB_EXECVE''@/$(GNULIB_EXECVE)/g' \
951- -e 's/@''GNULIB_EXECVP''@/$(GNULIB_EXECVP)/g' \
952- -e 's/@''GNULIB_EXECVPE''@/$(GNULIB_EXECVPE)/g' \
953- -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
954- -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
955- -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
956- -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
957- -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
958- -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
959- -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
960- -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
961- -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
962- -e 's/@''GNULIB_GETENTROPY''@/$(GNULIB_GETENTROPY)/g' \
963- -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
964- -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
965- -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
966- -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
967- -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \
968- -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
969- -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
970- -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
971- -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
972- -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
973- -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
974- -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
975- -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
976- -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
977- -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
978- -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
979- -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
980- -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
981- -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
982- -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
983- -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
984- -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
985- -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
986- -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
987- -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
988- -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
989- -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \
990- -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
991- -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
992- -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
993- -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
994- -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
995- -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
996- -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
997- -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
998- -e 's/@''GNULIB_MDA_ACCESS''@/$(GNULIB_MDA_ACCESS)/g' \
999- -e 's/@''GNULIB_MDA_CHDIR''@/$(GNULIB_MDA_CHDIR)/g' \
1000- -e 's/@''GNULIB_MDA_CLOSE''@/$(GNULIB_MDA_CLOSE)/g' \
1001- -e 's/@''GNULIB_MDA_DUP''@/$(GNULIB_MDA_DUP)/g' \
1002- -e 's/@''GNULIB_MDA_DUP2''@/$(GNULIB_MDA_DUP2)/g' \
1003- -e 's/@''GNULIB_MDA_EXECL''@/$(GNULIB_MDA_EXECL)/g' \
1004- -e 's/@''GNULIB_MDA_EXECLE''@/$(GNULIB_MDA_EXECLE)/g' \
1005- -e 's/@''GNULIB_MDA_EXECLP''@/$(GNULIB_MDA_EXECLP)/g' \
1006- -e 's/@''GNULIB_MDA_EXECV''@/$(GNULIB_MDA_EXECV)/g' \
1007- -e 's/@''GNULIB_MDA_EXECVE''@/$(GNULIB_MDA_EXECVE)/g' \
1008- -e 's/@''GNULIB_MDA_EXECVP''@/$(GNULIB_MDA_EXECVP)/g' \
1009- -e 's/@''GNULIB_MDA_EXECVPE''@/$(GNULIB_MDA_EXECVPE)/g' \
1010- -e 's/@''GNULIB_MDA_GETCWD''@/$(GNULIB_MDA_GETCWD)/g' \
1011- -e 's/@''GNULIB_MDA_GETPID''@/$(GNULIB_MDA_GETPID)/g' \
1012- -e 's/@''GNULIB_MDA_ISATTY''@/$(GNULIB_MDA_ISATTY)/g' \
1013- -e 's/@''GNULIB_MDA_LSEEK''@/$(GNULIB_MDA_LSEEK)/g' \
1014- -e 's/@''GNULIB_MDA_READ''@/$(GNULIB_MDA_READ)/g' \
1015- -e 's/@''GNULIB_MDA_RMDIR''@/$(GNULIB_MDA_RMDIR)/g' \
1016- -e 's/@''GNULIB_MDA_SWAB''@/$(GNULIB_MDA_SWAB)/g' \
1017- -e 's/@''GNULIB_MDA_UNLINK''@/$(GNULIB_MDA_UNLINK)/g' \
1018- -e 's/@''GNULIB_MDA_WRITE''@/$(GNULIB_MDA_WRITE)/g' \
1019+ -e 's/@''GNULIB_ACCESS''@/$(GL_GNULIB_ACCESS)/g' \
1020+ -e 's/@''GNULIB_CHDIR''@/$(GL_GNULIB_CHDIR)/g' \
1021+ -e 's/@''GNULIB_CHOWN''@/$(GL_GNULIB_CHOWN)/g' \
1022+ -e 's/@''GNULIB_CLOSE''@/$(GL_GNULIB_CLOSE)/g' \
1023+ -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GL_GNULIB_COPY_FILE_RANGE)/g' \
1024+ -e 's/@''GNULIB_DUP''@/$(GL_GNULIB_DUP)/g' \
1025+ -e 's/@''GNULIB_DUP2''@/$(GL_GNULIB_DUP2)/g' \
1026+ -e 's/@''GNULIB_DUP3''@/$(GL_GNULIB_DUP3)/g' \
1027+ -e 's/@''GNULIB_ENVIRON''@/$(GL_GNULIB_ENVIRON)/g' \
1028+ -e 's/@''GNULIB_EUIDACCESS''@/$(GL_GNULIB_EUIDACCESS)/g' \
1029+ -e 's/@''GNULIB_EXECL''@/$(GL_GNULIB_EXECL)/g' \
1030+ -e 's/@''GNULIB_EXECLE''@/$(GL_GNULIB_EXECLE)/g' \
1031+ -e 's/@''GNULIB_EXECLP''@/$(GL_GNULIB_EXECLP)/g' \
1032+ -e 's/@''GNULIB_EXECV''@/$(GL_GNULIB_EXECV)/g' \
1033+ -e 's/@''GNULIB_EXECVE''@/$(GL_GNULIB_EXECVE)/g' \
1034+ -e 's/@''GNULIB_EXECVP''@/$(GL_GNULIB_EXECVP)/g' \
1035+ -e 's/@''GNULIB_EXECVPE''@/$(GL_GNULIB_EXECVPE)/g' \
1036+ -e 's/@''GNULIB_FACCESSAT''@/$(GL_GNULIB_FACCESSAT)/g' \
1037+ -e 's/@''GNULIB_FCHDIR''@/$(GL_GNULIB_FCHDIR)/g' \
1038+ -e 's/@''GNULIB_FCHOWNAT''@/$(GL_GNULIB_FCHOWNAT)/g' \
1039+ -e 's/@''GNULIB_FDATASYNC''@/$(GL_GNULIB_FDATASYNC)/g' \
1040+ -e 's/@''GNULIB_FSYNC''@/$(GL_GNULIB_FSYNC)/g' \
1041+ -e 's/@''GNULIB_FTRUNCATE''@/$(GL_GNULIB_FTRUNCATE)/g' \
1042+ -e 's/@''GNULIB_GETCWD''@/$(GL_GNULIB_GETCWD)/g' \
1043+ -e 's/@''GNULIB_GETDOMAINNAME''@/$(GL_GNULIB_GETDOMAINNAME)/g' \
1044+ -e 's/@''GNULIB_GETDTABLESIZE''@/$(GL_GNULIB_GETDTABLESIZE)/g' \
1045+ -e 's/@''GNULIB_GETENTROPY''@/$(GL_GNULIB_GETENTROPY)/g' \
1046+ -e 's/@''GNULIB_GETGROUPS''@/$(GL_GNULIB_GETGROUPS)/g' \
1047+ -e 's/@''GNULIB_GETHOSTNAME''@/$(GL_GNULIB_GETHOSTNAME)/g' \
1048+ -e 's/@''GNULIB_GETLOGIN''@/$(GL_GNULIB_GETLOGIN)/g' \
1049+ -e 's/@''GNULIB_GETLOGIN_R''@/$(GL_GNULIB_GETLOGIN_R)/g' \
1050+ -e 's/@''GNULIB_GETOPT_POSIX''@/$(GL_GNULIB_GETOPT_POSIX)/g' \
1051+ -e 's/@''GNULIB_GETPAGESIZE''@/$(GL_GNULIB_GETPAGESIZE)/g' \
1052+ -e 's/@''GNULIB_GETPASS''@/$(GL_GNULIB_GETPASS)/g' \
1053+ -e 's/@''GNULIB_GETUSERSHELL''@/$(GL_GNULIB_GETUSERSHELL)/g' \
1054+ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GL_GNULIB_GROUP_MEMBER)/g' \
1055+ -e 's/@''GNULIB_ISATTY''@/$(GL_GNULIB_ISATTY)/g' \
1056+ -e 's/@''GNULIB_LCHOWN''@/$(GL_GNULIB_LCHOWN)/g' \
1057+ -e 's/@''GNULIB_LINK''@/$(GL_GNULIB_LINK)/g' \
1058+ -e 's/@''GNULIB_LINKAT''@/$(GL_GNULIB_LINKAT)/g' \
1059+ -e 's/@''GNULIB_LSEEK''@/$(GL_GNULIB_LSEEK)/g' \
1060+ -e 's/@''GNULIB_PIPE''@/$(GL_GNULIB_PIPE)/g' \
1061+ -e 's/@''GNULIB_PIPE2''@/$(GL_GNULIB_PIPE2)/g' \
1062+ -e 's/@''GNULIB_PREAD''@/$(GL_GNULIB_PREAD)/g' \
1063+ -e 's/@''GNULIB_PWRITE''@/$(GL_GNULIB_PWRITE)/g' \
1064+ -e 's/@''GNULIB_READ''@/$(GL_GNULIB_READ)/g' \
1065+ -e 's/@''GNULIB_READLINK''@/$(GL_GNULIB_READLINK)/g' \
1066+ -e 's/@''GNULIB_READLINKAT''@/$(GL_GNULIB_READLINKAT)/g' \
1067+ -e 's/@''GNULIB_RMDIR''@/$(GL_GNULIB_RMDIR)/g' \
1068+ -e 's/@''GNULIB_SETHOSTNAME''@/$(GL_GNULIB_SETHOSTNAME)/g' \
1069+ -e 's/@''GNULIB_SLEEP''@/$(GL_GNULIB_SLEEP)/g' \
1070+ -e 's/@''GNULIB_SYMLINK''@/$(GL_GNULIB_SYMLINK)/g' \
1071+ -e 's/@''GNULIB_SYMLINKAT''@/$(GL_GNULIB_SYMLINKAT)/g' \
1072+ -e 's/@''GNULIB_TRUNCATE''@/$(GL_GNULIB_TRUNCATE)/g' \
1073+ -e 's/@''GNULIB_TTYNAME_R''@/$(GL_GNULIB_TTYNAME_R)/g' \
1074+ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GL_GNULIB_UNISTD_H_GETOPT)/g' \
1075+ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GL_GNULIB_UNISTD_H_NONBLOCKING)/g' \
1076+ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GL_GNULIB_UNISTD_H_SIGPIPE)/g' \
1077+ -e 's/@''GNULIB_UNLINK''@/$(GL_GNULIB_UNLINK)/g' \
1078+ -e 's/@''GNULIB_UNLINKAT''@/$(GL_GNULIB_UNLINKAT)/g' \
1079+ -e 's/@''GNULIB_USLEEP''@/$(GL_GNULIB_USLEEP)/g' \
1080+ -e 's/@''GNULIB_WRITE''@/$(GL_GNULIB_WRITE)/g' \
1081+ -e 's/@''GNULIB_MDA_ACCESS''@/$(GL_GNULIB_MDA_ACCESS)/g' \
1082+ -e 's/@''GNULIB_MDA_CHDIR''@/$(GL_GNULIB_MDA_CHDIR)/g' \
1083+ -e 's/@''GNULIB_MDA_CLOSE''@/$(GL_GNULIB_MDA_CLOSE)/g' \
1084+ -e 's/@''GNULIB_MDA_DUP''@/$(GL_GNULIB_MDA_DUP)/g' \
1085+ -e 's/@''GNULIB_MDA_DUP2''@/$(GL_GNULIB_MDA_DUP2)/g' \
1086+ -e 's/@''GNULIB_MDA_EXECL''@/$(GL_GNULIB_MDA_EXECL)/g' \
1087+ -e 's/@''GNULIB_MDA_EXECLE''@/$(GL_GNULIB_MDA_EXECLE)/g' \
1088+ -e 's/@''GNULIB_MDA_EXECLP''@/$(GL_GNULIB_MDA_EXECLP)/g' \
1089+ -e 's/@''GNULIB_MDA_EXECV''@/$(GL_GNULIB_MDA_EXECV)/g' \
1090+ -e 's/@''GNULIB_MDA_EXECVE''@/$(GL_GNULIB_MDA_EXECVE)/g' \
1091+ -e 's/@''GNULIB_MDA_EXECVP''@/$(GL_GNULIB_MDA_EXECVP)/g' \
1092+ -e 's/@''GNULIB_MDA_EXECVPE''@/$(GL_GNULIB_MDA_EXECVPE)/g' \
1093+ -e 's/@''GNULIB_MDA_GETCWD''@/$(GL_GNULIB_MDA_GETCWD)/g' \
1094+ -e 's/@''GNULIB_MDA_GETPID''@/$(GL_GNULIB_MDA_GETPID)/g' \
1095+ -e 's/@''GNULIB_MDA_ISATTY''@/$(GL_GNULIB_MDA_ISATTY)/g' \
1096+ -e 's/@''GNULIB_MDA_LSEEK''@/$(GL_GNULIB_MDA_LSEEK)/g' \
1097+ -e 's/@''GNULIB_MDA_READ''@/$(GL_GNULIB_MDA_READ)/g' \
1098+ -e 's/@''GNULIB_MDA_RMDIR''@/$(GL_GNULIB_MDA_RMDIR)/g' \
1099+ -e 's/@''GNULIB_MDA_SWAB''@/$(GL_GNULIB_MDA_SWAB)/g' \
1100+ -e 's/@''GNULIB_MDA_UNLINK''@/$(GL_GNULIB_MDA_UNLINK)/g' \
1101+ -e 's/@''GNULIB_MDA_WRITE''@/$(GL_GNULIB_MDA_WRITE)/g' \
1102 < $(srcdir)/unistd.in.h | \
1103 sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
1104 -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
1105@@ -2080,49 +2196,49 @@ wchar.h: wchar.in.h $(top_builddir)/conf
1106 -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
1107 -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
1108 -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
1109- -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
1110- -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
1111- -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
1112- -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
1113- -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \
1114- -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \
1115- -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \
1116- -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \
1117- -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \
1118- -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \
1119- -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \
1120- -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \
1121- -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \
1122- -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \
1123- -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \
1124- -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \
1125- -e 's/@''GNULIB_WMEMPCPY''@/$(GNULIB_WMEMPCPY)/g' \
1126- -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \
1127- -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \
1128- -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \
1129- -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \
1130- -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \
1131- -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \
1132- -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \
1133- -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \
1134- -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \
1135- -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \
1136- -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \
1137- -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \
1138- -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \
1139- -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \
1140- -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \
1141- -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \
1142- -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \
1143- -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \
1144- -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \
1145- -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \
1146- -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \
1147- -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
1148- -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
1149- -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
1150- -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \
1151- -e 's/@''GNULIB_MDA_WCSDUP''@/$(GNULIB_MDA_WCSDUP)/g' \
1152+ -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \
1153+ -e 's/@''GNULIB_BTOWC''@/$(GL_GNULIB_BTOWC)/g' \
1154+ -e 's/@''GNULIB_WCTOB''@/$(GL_GNULIB_WCTOB)/g' \
1155+ -e 's/@''GNULIB_MBSINIT''@/$(GL_GNULIB_MBSINIT)/g' \
1156+ -e 's/@''GNULIB_MBRTOWC''@/$(GL_GNULIB_MBRTOWC)/g' \
1157+ -e 's/@''GNULIB_MBRLEN''@/$(GL_GNULIB_MBRLEN)/g' \
1158+ -e 's/@''GNULIB_MBSRTOWCS''@/$(GL_GNULIB_MBSRTOWCS)/g' \
1159+ -e 's/@''GNULIB_MBSNRTOWCS''@/$(GL_GNULIB_MBSNRTOWCS)/g' \
1160+ -e 's/@''GNULIB_WCRTOMB''@/$(GL_GNULIB_WCRTOMB)/g' \
1161+ -e 's/@''GNULIB_WCSRTOMBS''@/$(GL_GNULIB_WCSRTOMBS)/g' \
1162+ -e 's/@''GNULIB_WCSNRTOMBS''@/$(GL_GNULIB_WCSNRTOMBS)/g' \
1163+ -e 's/@''GNULIB_WCWIDTH''@/$(GL_GNULIB_WCWIDTH)/g' \
1164+ -e 's/@''GNULIB_WMEMCHR''@/$(GL_GNULIB_WMEMCHR)/g' \
1165+ -e 's/@''GNULIB_WMEMCMP''@/$(GL_GNULIB_WMEMCMP)/g' \
1166+ -e 's/@''GNULIB_WMEMCPY''@/$(GL_GNULIB_WMEMCPY)/g' \
1167+ -e 's/@''GNULIB_WMEMMOVE''@/$(GL_GNULIB_WMEMMOVE)/g' \
1168+ -e 's/@''GNULIB_WMEMPCPY''@/$(GL_GNULIB_WMEMPCPY)/g' \
1169+ -e 's/@''GNULIB_WMEMSET''@/$(GL_GNULIB_WMEMSET)/g' \
1170+ -e 's/@''GNULIB_WCSLEN''@/$(GL_GNULIB_WCSLEN)/g' \
1171+ -e 's/@''GNULIB_WCSNLEN''@/$(GL_GNULIB_WCSNLEN)/g' \
1172+ -e 's/@''GNULIB_WCSCPY''@/$(GL_GNULIB_WCSCPY)/g' \
1173+ -e 's/@''GNULIB_WCPCPY''@/$(GL_GNULIB_WCPCPY)/g' \
1174+ -e 's/@''GNULIB_WCSNCPY''@/$(GL_GNULIB_WCSNCPY)/g' \
1175+ -e 's/@''GNULIB_WCPNCPY''@/$(GL_GNULIB_WCPNCPY)/g' \
1176+ -e 's/@''GNULIB_WCSCAT''@/$(GL_GNULIB_WCSCAT)/g' \
1177+ -e 's/@''GNULIB_WCSNCAT''@/$(GL_GNULIB_WCSNCAT)/g' \
1178+ -e 's/@''GNULIB_WCSCMP''@/$(GL_GNULIB_WCSCMP)/g' \
1179+ -e 's/@''GNULIB_WCSNCMP''@/$(GL_GNULIB_WCSNCMP)/g' \
1180+ -e 's/@''GNULIB_WCSCASECMP''@/$(GL_GNULIB_WCSCASECMP)/g' \
1181+ -e 's/@''GNULIB_WCSNCASECMP''@/$(GL_GNULIB_WCSNCASECMP)/g' \
1182+ -e 's/@''GNULIB_WCSCOLL''@/$(GL_GNULIB_WCSCOLL)/g' \
1183+ -e 's/@''GNULIB_WCSXFRM''@/$(GL_GNULIB_WCSXFRM)/g' \
1184+ -e 's/@''GNULIB_WCSDUP''@/$(GL_GNULIB_WCSDUP)/g' \
1185+ -e 's/@''GNULIB_WCSCHR''@/$(GL_GNULIB_WCSCHR)/g' \
1186+ -e 's/@''GNULIB_WCSRCHR''@/$(GL_GNULIB_WCSRCHR)/g' \
1187+ -e 's/@''GNULIB_WCSCSPN''@/$(GL_GNULIB_WCSCSPN)/g' \
1188+ -e 's/@''GNULIB_WCSSPN''@/$(GL_GNULIB_WCSSPN)/g' \
1189+ -e 's/@''GNULIB_WCSPBRK''@/$(GL_GNULIB_WCSPBRK)/g' \
1190+ -e 's/@''GNULIB_WCSSTR''@/$(GL_GNULIB_WCSSTR)/g' \
1191+ -e 's/@''GNULIB_WCSTOK''@/$(GL_GNULIB_WCSTOK)/g' \
1192+ -e 's/@''GNULIB_WCSWIDTH''@/$(GL_GNULIB_WCSWIDTH)/g' \
1193+ -e 's/@''GNULIB_WCSFTIME''@/$(GL_GNULIB_WCSFTIME)/g' \
1194+ -e 's/@''GNULIB_MDA_WCSDUP''@/$(GL_GNULIB_MDA_WCSDUP)/g' \
1195 < $(srcdir)/wchar.in.h | \
1196 sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
1197 -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
1198@@ -2222,14 +2338,14 @@ wctype.h: wctype.in.h $(top_builddir)/co
1199 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1200 -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
1201 -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
1202- -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
1203- -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
1204- -e 's/@''GNULIB_ISWDIGIT''@/$(GNULIB_ISWDIGIT)/g' \
1205- -e 's/@''GNULIB_ISWXDIGIT''@/$(GNULIB_ISWXDIGIT)/g' \
1206- -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
1207- -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
1208- -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \
1209- -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \
1210+ -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \
1211+ -e 's/@''GNULIB_ISWBLANK''@/$(GL_GNULIB_ISWBLANK)/g' \
1212+ -e 's/@''GNULIB_ISWDIGIT''@/$(GL_GNULIB_ISWDIGIT)/g' \
1213+ -e 's/@''GNULIB_ISWXDIGIT''@/$(GL_GNULIB_ISWXDIGIT)/g' \
1214+ -e 's/@''GNULIB_WCTYPE''@/$(GL_GNULIB_WCTYPE)/g' \
1215+ -e 's/@''GNULIB_ISWCTYPE''@/$(GL_GNULIB_ISWCTYPE)/g' \
1216+ -e 's/@''GNULIB_WCTRANS''@/$(GL_GNULIB_WCTRANS)/g' \
1217+ -e 's/@''GNULIB_TOWCTRANS''@/$(GL_GNULIB_TOWCTRANS)/g' \
1218 -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \
1219 -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
1220 -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \
1221--- a/gnulib/lib/_Noreturn.h
1222+++ b/gnulib/lib/_Noreturn.h
1223@@ -2,16 +2,16 @@
1224 Copyright (C) 2011-2021 Free Software Foundation, Inc.
1225
1226 This program is free software: you can redistribute it and/or modify it
1227- under the terms of the GNU General Public License as published
1228- by the Free Software Foundation; either version 3 of the License, or
1229+ under the terms of the GNU Lesser General Public License as published
1230+ by the Free Software Foundation; either version 2 of the License, or
1231 (at your option) any later version.
1232
1233 This program is distributed in the hope that it will be useful,
1234 but WITHOUT ANY WARRANTY; without even the implied warranty of
1235 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1236- General Public License for more details.
1237+ Lesser General Public License for more details.
1238
1239- You should have received a copy of the GNU General Public License
1240+ You should have received a copy of the GNU Lesser General Public License
1241 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1242
1243 #ifndef _Noreturn
1244--- a/gnulib/lib/alloca.in.h
1245+++ b/gnulib/lib/alloca.in.h
1246@@ -3,20 +3,18 @@
1247 Copyright (C) 1995, 1999, 2001-2004, 2006-2021 Free Software Foundation,
1248 Inc.
1249
1250- This program is free software; you can redistribute it and/or modify it
1251- under the terms of the GNU General Public License as published
1252- by the Free Software Foundation; either version 3, or (at your option)
1253- any later version.
1254+ This file is free software: you can redistribute it and/or modify
1255+ it under the terms of the GNU Lesser General Public License as
1256+ published by the Free Software Foundation; either version 2.1 of the
1257+ License, or (at your option) any later version.
1258
1259- This program is distributed in the hope that it will be useful,
1260+ This file is distributed in the hope that it will be useful,
1261 but WITHOUT ANY WARRANTY; without even the implied warranty of
1262- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1263- General Public License for more details.
1264+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1265+ GNU Lesser General Public License for more details.
1266
1267- You should have received a copy of the GNU General Public
1268- License along with this program; if not, see
1269- <https://www.gnu.org/licenses/>.
1270- */
1271+ You should have received a copy of the GNU Lesser General Public License
1272+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
1273
1274 /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
1275 means there is a real alloca function. */
1276--- a/gnulib/lib/arg-nonnull.h
1277+++ b/gnulib/lib/arg-nonnull.h
1278@@ -2,16 +2,16 @@
1279 Copyright (C) 2009-2021 Free Software Foundation, Inc.
1280
1281 This program is free software: you can redistribute it and/or modify it
1282- under the terms of the GNU General Public License as published
1283- by the Free Software Foundation; either version 3 of the License, or
1284+ under the terms of the GNU Lesser General Public License as published
1285+ by the Free Software Foundation; either version 2 of the License, or
1286 (at your option) any later version.
1287
1288 This program is distributed in the hope that it will be useful,
1289 but WITHOUT ANY WARRANTY; without even the implied warranty of
1290 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1291- General Public License for more details.
1292+ Lesser General Public License for more details.
1293
1294- You should have received a copy of the GNU General Public License
1295+ You should have received a copy of the GNU Lesser General Public License
1296 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1297
1298 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
1299--- a/gnulib/lib/argz.c
1300+++ b/gnulib/lib/argz.c
1301@@ -3,18 +3,18 @@
1302 Foundation, Inc.
1303 This file is part of the GNU C Library.
1304
1305- This program is free software; you can redistribute it and/or modify
1306- it under the terms of the GNU General Public License as published by
1307- the Free Software Foundation; either version 3, or (at your option)
1308- any later version.
1309+ This file is free software: you can redistribute it and/or modify
1310+ it under the terms of the GNU Lesser General Public License as
1311+ published by the Free Software Foundation; either version 2.1 of the
1312+ License, or (at your option) any later version.
1313
1314- This program is distributed in the hope that it will be useful,
1315+ This file is distributed in the hope that it will be useful,
1316 but WITHOUT ANY WARRANTY; without even the implied warranty of
1317 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1318- GNU General Public License for more details.
1319+ GNU Lesser General Public License for more details.
1320
1321- You should have received a copy of the GNU General Public License along
1322- with this program; if not, see <https://www.gnu.org/licenses/>. */
1323+ You should have received a copy of the GNU Lesser General Public License
1324+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
1325
1326 #include <config.h>
1327
1328--- a/gnulib/lib/argz.in.h
1329+++ b/gnulib/lib/argz.in.h
1330@@ -3,17 +3,17 @@
1331 Inc.
1332 This file is part of the GNU C Library.
1333
1334- This program is free software: you can redistribute it and/or modify
1335- it under the terms of the GNU General Public License as published by
1336- the Free Software Foundation; either version 3 of the License, or
1337- (at your option) any later version.
1338+ This file is free software: you can redistribute it and/or modify
1339+ it under the terms of the GNU Lesser General Public License as
1340+ published by the Free Software Foundation; either version 2.1 of the
1341+ License, or (at your option) any later version.
1342
1343- This program is distributed in the hope that it will be useful,
1344+ This file is distributed in the hope that it will be useful,
1345 but WITHOUT ANY WARRANTY; without even the implied warranty of
1346 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1347- GNU General Public License for more details.
1348+ GNU Lesser General Public License for more details.
1349
1350- You should have received a copy of the GNU General Public License
1351+ You should have received a copy of the GNU Lesser General Public License
1352 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1353
1354 #ifndef _ARGZ_H
1355--- a/gnulib/lib/asnprintf.c
1356+++ b/gnulib/lib/asnprintf.c
1357@@ -1,18 +1,18 @@
1358 /* Formatted output to strings.
1359 Copyright (C) 1999, 2002, 2006, 2009-2021 Free Software Foundation, Inc.
1360
1361- This program is free software; you can redistribute it and/or modify
1362- it under the terms of the GNU General Public License as published by
1363- the Free Software Foundation; either version 3, or (at your option)
1364- any later version.
1365+ This file is free software: you can redistribute it and/or modify
1366+ it under the terms of the GNU Lesser General Public License as
1367+ published by the Free Software Foundation; either version 2.1 of the
1368+ License, or (at your option) any later version.
1369
1370- This program is distributed in the hope that it will be useful,
1371+ This file is distributed in the hope that it will be useful,
1372 but WITHOUT ANY WARRANTY; without even the implied warranty of
1373 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1374- GNU General Public License for more details.
1375+ GNU Lesser General Public License for more details.
1376
1377- You should have received a copy of the GNU General Public License along
1378- with this program; if not, see <https://www.gnu.org/licenses/>. */
1379+ You should have received a copy of the GNU Lesser General Public License
1380+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
1381
1382 #include <config.h>
1383
1384--- a/gnulib/lib/asprintf.c
1385+++ b/gnulib/lib/asprintf.c
1386@@ -2,18 +2,18 @@
1387 Copyright (C) 1999, 2002, 2006-2007, 2009-2021 Free Software Foundation,
1388 Inc.
1389
1390- This program is free software; you can redistribute it and/or modify
1391- it under the terms of the GNU General Public License as published by
1392- the Free Software Foundation; either version 3, or (at your option)
1393- any later version.
1394+ This file is free software: you can redistribute it and/or modify
1395+ it under the terms of the GNU Lesser General Public License as
1396+ published by the Free Software Foundation; either version 2.1 of the
1397+ License, or (at your option) any later version.
1398
1399- This program is distributed in the hope that it will be useful,
1400+ This file is distributed in the hope that it will be useful,
1401 but WITHOUT ANY WARRANTY; without even the implied warranty of
1402 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1403- GNU General Public License for more details.
1404+ GNU Lesser General Public License for more details.
1405
1406- You should have received a copy of the GNU General Public License along
1407- with this program; if not, see <https://www.gnu.org/licenses/>. */
1408+ You should have received a copy of the GNU Lesser General Public License
1409+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
1410
1411 #include <config.h>
1412
1413--- a/gnulib/lib/attribute.h
1414+++ b/gnulib/lib/attribute.h
1415@@ -2,17 +2,17 @@
1416
1417 Copyright 2020-2021 Free Software Foundation, Inc.
1418
1419- This program is free software: you can redistribute it and/or modify it
1420- under the terms of the GNU General Public License as published
1421- by the Free Software Foundation; either version 3 of the License, or
1422- (at your option) any later version.
1423+ This file is free software: you can redistribute it and/or modify
1424+ it under the terms of the GNU Lesser General Public License as
1425+ published by the Free Software Foundation; either version 2.1 of the
1426+ License, or (at your option) any later version.
1427
1428- This program is distributed in the hope that it will be useful,
1429+ This file is distributed in the hope that it will be useful,
1430 but WITHOUT ANY WARRANTY; without even the implied warranty of
1431- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1432- General Public License for more details.
1433+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1434+ GNU Lesser General Public License for more details.
1435
1436- You should have received a copy of the GNU General Public License
1437+ You should have received a copy of the GNU Lesser General Public License
1438 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1439
1440 /* Written by Paul Eggert. */
1441--- a/gnulib/lib/basename-lgpl.c
1442+++ b/gnulib/lib/basename-lgpl.c
1443@@ -3,17 +3,17 @@
1444 Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2021 Free Software
1445 Foundation, Inc.
1446
1447- This program is free software: you can redistribute it and/or modify
1448- it under the terms of the GNU General Public License as published by
1449- the Free Software Foundation; either version 3 of the License, or
1450- (at your option) any later version.
1451+ This file is free software: you can redistribute it and/or modify
1452+ it under the terms of the GNU Lesser General Public License as
1453+ published by the Free Software Foundation; either version 2.1 of the
1454+ License, or (at your option) any later version.
1455
1456- This program is distributed in the hope that it will be useful,
1457+ This file is distributed in the hope that it will be useful,
1458 but WITHOUT ANY WARRANTY; without even the implied warranty of
1459 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1460- GNU General Public License for more details.
1461+ GNU Lesser General Public License for more details.
1462
1463- You should have received a copy of the GNU General Public License
1464+ You should have received a copy of the GNU Lesser General Public License
1465 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1466
1467 #include <config.h>
1468--- a/gnulib/lib/basename-lgpl.h
1469+++ b/gnulib/lib/basename-lgpl.h
1470@@ -1,20 +1,20 @@
1471-/* Extract the last component (base name) of a file name.
1472+/* Extract the last component (base name) of a file name.
1473
1474- Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation,
1475- Inc.
1476+ Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation,
1477+ Inc.
1478
1479- This program is free software: you can redistribute it and/or modify
1480- it under the terms of the GNU General Public License as published by
1481- the Free Software Foundation; either version 3 of the License, or
1482- (at your option) any later version.
1483+ This file is free software: you can redistribute it and/or modify
1484+ it under the terms of the GNU Lesser General Public License as
1485+ published by the Free Software Foundation; either version 2.1 of the
1486+ License, or (at your option) any later version.
1487
1488- This program is distributed in the hope that it will be useful,
1489- but WITHOUT ANY WARRANTY; without even the implied warranty of
1490- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1491- GNU General Public License for more details.
1492+ This file is distributed in the hope that it will be useful,
1493+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1494+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1495+ GNU Lesser General Public License for more details.
1496
1497- You should have received a copy of the GNU General Public License
1498- along with this program. If not, see <https://www.gnu.org/licenses/>. */
1499+ You should have received a copy of the GNU Lesser General Public License
1500+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
1501
1502 #ifndef _BASENAME_LGPL_H
1503 #define _BASENAME_LGPL_H
1504--- a/gnulib/lib/btowc.c
1505+++ b/gnulib/lib/btowc.c
1506@@ -2,17 +2,17 @@
1507 Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc.
1508 Written by Bruno Haible <bruno@clisp.org>, 2008.
1509
1510- This program is free software: you can redistribute it and/or modify
1511- it under the terms of the GNU General Public License as published by
1512- the Free Software Foundation; either version 3 of the License, or
1513- (at your option) any later version.
1514+ This file is free software: you can redistribute it and/or modify
1515+ it under the terms of the GNU Lesser General Public License as
1516+ published by the Free Software Foundation; either version 2.1 of the
1517+ License, or (at your option) any later version.
1518
1519- This program is distributed in the hope that it will be useful,
1520+ This file is distributed in the hope that it will be useful,
1521 but WITHOUT ANY WARRANTY; without even the implied warranty of
1522 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1523- GNU General Public License for more details.
1524+ GNU Lesser General Public License for more details.
1525
1526- You should have received a copy of the GNU General Public License
1527+ You should have received a copy of the GNU Lesser General Public License
1528 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1529
1530 #include <config.h>
1531--- a/gnulib/lib/c++defs.h
1532+++ b/gnulib/lib/c++defs.h
1533@@ -2,16 +2,16 @@
1534 Copyright (C) 2010-2021 Free Software Foundation, Inc.
1535
1536 This program is free software: you can redistribute it and/or modify it
1537- under the terms of the GNU General Public License as published
1538- by the Free Software Foundation; either version 3 of the License, or
1539+ under the terms of the GNU Lesser General Public License as published
1540+ by the Free Software Foundation; either version 2 of the License, or
1541 (at your option) any later version.
1542
1543 This program is distributed in the hope that it will be useful,
1544 but WITHOUT ANY WARRANTY; without even the implied warranty of
1545 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1546- General Public License for more details.
1547+ Lesser General Public License for more details.
1548
1549- You should have received a copy of the GNU General Public License
1550+ You should have received a copy of the GNU Lesser General Public License
1551 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1552
1553 #ifndef _GL_CXXDEFS_H
1554--- /dev/null
1555+++ b/gnulib/lib/calloc.c
1556@@ -0,0 +1,55 @@
1557+/* calloc() function that is glibc compatible.
1558+ This wrapper function is required at least on Tru64 UNIX 5.1 and mingw.
1559+ Copyright (C) 2004-2007, 2009-2021 Free Software Foundation, Inc.
1560+
1561+ This file is free software: you can redistribute it and/or modify
1562+ it under the terms of the GNU Lesser General Public License as
1563+ published by the Free Software Foundation; either version 2.1 of the
1564+ License, or (at your option) any later version.
1565+
1566+ This file is distributed in the hope that it will be useful,
1567+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1568+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1569+ GNU Lesser General Public License for more details.
1570+
1571+ You should have received a copy of the GNU Lesser General Public License
1572+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
1573+
1574+/* written by Jim Meyering and Bruno Haible */
1575+
1576+#include <config.h>
1577+
1578+/* Specification. */
1579+#include <stdlib.h>
1580+
1581+#include <errno.h>
1582+
1583+#include "xalloc-oversized.h"
1584+
1585+/* Call the system's calloc below. */
1586+#undef calloc
1587+
1588+/* Allocate and zero-fill an NxS-byte block of memory from the heap,
1589+ even if N or S is zero. */
1590+
1591+void *
1592+rpl_calloc (size_t n, size_t s)
1593+{
1594+ if (n == 0 || s == 0)
1595+ n = s = 1;
1596+
1597+ if (xalloc_oversized (n, s))
1598+ {
1599+ errno = ENOMEM;
1600+ return NULL;
1601+ }
1602+
1603+ void *result = calloc (n, s);
1604+
1605+#if !HAVE_MALLOC_POSIX
1606+ if (result == NULL)
1607+ errno = ENOMEM;
1608+#endif
1609+
1610+ return result;
1611+}
1612--- a/gnulib/lib/cdefs.h
1613+++ b/gnulib/lib/cdefs.h
1614@@ -2,16 +2,16 @@
1615 This file is part of the GNU C Library.
1616
1617 The GNU C Library is free software; you can redistribute it and/or
1618- modify it under the terms of the GNU General Public
1619+ modify it under the terms of the GNU Lesser General Public
1620 License as published by the Free Software Foundation; either
1621- version 3 of the License, or (at your option) any later version.
1622+ version 2.1 of the License, or (at your option) any later version.
1623
1624 The GNU C Library is distributed in the hope that it will be useful,
1625 but WITHOUT ANY WARRANTY; without even the implied warranty of
1626 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1627- General Public License for more details.
1628+ Lesser General Public License for more details.
1629
1630- You should have received a copy of the GNU General Public
1631+ You should have received a copy of the GNU Lesser General Public
1632 License along with the GNU C Library; if not, see
1633 <https://www.gnu.org/licenses/>. */
1634
1635@@ -259,10 +259,12 @@
1636 # define __attribute_const__ /* Ignore */
1637 #endif
1638
1639-#if defined __STDC_VERSION__ && 201710L < __STDC_VERSION__
1640-# define __attribute_maybe_unused__ [[__maybe_unused__]]
1641-#elif __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__)
1642+#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__)
1643 # define __attribute_maybe_unused__ __attribute__ ((__unused__))
1644+/* Once the next version of the C standard comes out, we can
1645+ do something like the following here:
1646+ #elif defined __STDC_VERSION__ && 202???L <= __STDC_VERSION__
1647+ # define __attribute_maybe_unused__ [[__maybe_unused__]] */
1648 #else
1649 # define __attribute_maybe_unused__ /* Ignore */
1650 #endif
1651@@ -320,7 +322,9 @@
1652 #endif
1653
1654 /* The nonnull function attribute marks pointer parameters that
1655- must not be NULL. */
1656+ must not be NULL. This has the name __nonnull in glibc,
1657+ and __attribute_nonnull__ in files shared with Gnulib to avoid
1658+ collision with a different __nonnull in DragonFlyBSD 5.9. */
1659 #ifndef __attribute_nonnull__
1660 # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__)
1661 # define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params))
1662@@ -485,9 +489,9 @@
1663 [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
1664 #endif
1665
1666-/* The #ifndef lets Gnulib avoid including these on non-glibc
1667- platforms, where the includes typically do not exist. */
1668-#ifndef __WORDSIZE
1669+/* Gnulib avoids including these, as they don't work on non-glibc or
1670+ older glibc platforms. */
1671+#ifndef __GNULIB_CDEFS
1672 # include <bits/wordsize.h>
1673 # include <bits/long-double.h>
1674 #endif
1675--- a/gnulib/lib/cloexec.c
1676+++ b/gnulib/lib/cloexec.c
1677@@ -2,20 +2,20 @@
1678
1679 Copyright (C) 1991, 2004-2006, 2009-2021 Free Software Foundation, Inc.
1680
1681- This program is free software: you can redistribute it and/or modify
1682- it under the terms of the GNU General Public License as published by
1683- the Free Software Foundation; either version 3 of the License, or
1684- (at your option) any later version.
1685+ This file is free software: you can redistribute it and/or modify
1686+ it under the terms of the GNU Lesser General Public License as
1687+ published by the Free Software Foundation; either version 2.1 of the
1688+ License, or (at your option) any later version.
1689
1690- This program is distributed in the hope that it will be useful,
1691+ This file is distributed in the hope that it will be useful,
1692 but WITHOUT ANY WARRANTY; without even the implied warranty of
1693 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1694- GNU General Public License for more details.
1695+ GNU Lesser General Public License for more details.
1696
1697- You should have received a copy of the GNU General Public License
1698- along with this program. If not, see <https://www.gnu.org/licenses/>.
1699+ You should have received a copy of the GNU Lesser General Public License
1700+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
1701
1702- The code is taken from glibc/manual/llio.texi */
1703+/* The code is taken from glibc/manual/llio.texi */
1704
1705 #include <config.h>
1706
1707--- a/gnulib/lib/cloexec.h
1708+++ b/gnulib/lib/cloexec.h
1709@@ -2,20 +2,18 @@
1710
1711 Copyright (C) 2004, 2009-2021 Free Software Foundation, Inc.
1712
1713- This program is free software: you can redistribute it and/or modify
1714- it under the terms of the GNU General Public License as published by
1715- the Free Software Foundation; either version 3 of the License, or
1716- (at your option) any later version.
1717+ This file is free software: you can redistribute it and/or modify
1718+ it under the terms of the GNU Lesser General Public License as
1719+ published by the Free Software Foundation; either version 2.1 of the
1720+ License, or (at your option) any later version.
1721
1722- This program is distributed in the hope that it will be useful,
1723+ This file is distributed in the hope that it will be useful,
1724 but WITHOUT ANY WARRANTY; without even the implied warranty of
1725 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1726- GNU General Public License for more details.
1727+ GNU Lesser General Public License for more details.
1728
1729- You should have received a copy of the GNU General Public License
1730- along with this program. If not, see <https://www.gnu.org/licenses/>.
1731-
1732-*/
1733+ You should have received a copy of the GNU Lesser General Public License
1734+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
1735
1736 #include <stdbool.h>
1737
1738--- a/gnulib/lib/close.c
1739+++ b/gnulib/lib/close.c
1740@@ -1,17 +1,17 @@
1741 /* close replacement.
1742 Copyright (C) 2008-2021 Free Software Foundation, Inc.
1743
1744- This program is free software: you can redistribute it and/or modify
1745- it under the terms of the GNU General Public License as published by
1746- the Free Software Foundation; either version 3 of the License, or
1747- (at your option) any later version.
1748+ This file is free software: you can redistribute it and/or modify
1749+ it under the terms of the GNU Lesser General Public License as
1750+ published by the Free Software Foundation; either version 2.1 of the
1751+ License, or (at your option) any later version.
1752
1753- This program is distributed in the hope that it will be useful,
1754+ This file is distributed in the hope that it will be useful,
1755 but WITHOUT ANY WARRANTY; without even the implied warranty of
1756 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1757- GNU General Public License for more details.
1758+ GNU Lesser General Public License for more details.
1759
1760- You should have received a copy of the GNU General Public License
1761+ You should have received a copy of the GNU Lesser General Public License
1762 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1763
1764 #include <config.h>
1765--- a/gnulib/lib/dup2.c
1766+++ b/gnulib/lib/dup2.c
1767@@ -2,17 +2,17 @@
1768
1769 Copyright (C) 1999, 2004-2007, 2009-2021 Free Software Foundation, Inc.
1770
1771- This program is free software: you can redistribute it and/or modify
1772- it under the terms of the GNU General Public License as published by
1773- the Free Software Foundation; either version 3 of the License, or
1774- (at your option) any later version.
1775+ This file is free software: you can redistribute it and/or modify
1776+ it under the terms of the GNU Lesser General Public License as
1777+ published by the Free Software Foundation; either version 2.1 of the
1778+ License, or (at your option) any later version.
1779
1780- This program is distributed in the hope that it will be useful,
1781+ This file is distributed in the hope that it will be useful,
1782 but WITHOUT ANY WARRANTY; without even the implied warranty of
1783 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1784- GNU General Public License for more details.
1785+ GNU Lesser General Public License for more details.
1786
1787- You should have received a copy of the GNU General Public License
1788+ You should have received a copy of the GNU Lesser General Public License
1789 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1790
1791 /* written by Paul Eggert */
1792--- a/gnulib/lib/dynarray.h
1793+++ b/gnulib/lib/dynarray.h
1794@@ -1,17 +1,17 @@
1795 /* Type-safe arrays which grow dynamically.
1796 Copyright 2021 Free Software Foundation, Inc.
1797
1798- This program is free software: you can redistribute it and/or modify
1799- it under the terms of the GNU General Public License as published by
1800- the Free Software Foundation; either version 3 of the License, or
1801- (at your option) any later version.
1802+ This file is free software: you can redistribute it and/or modify
1803+ it under the terms of the GNU Lesser General Public License as
1804+ published by the Free Software Foundation; either version 2.1 of the
1805+ License, or (at your option) any later version.
1806
1807- This program is distributed in the hope that it will be useful,
1808+ This file is distributed in the hope that it will be useful,
1809 but WITHOUT ANY WARRANTY; without even the implied warranty of
1810 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1811- GNU General Public License for more details.
1812+ GNU Lesser General Public License for more details.
1813
1814- You should have received a copy of the GNU General Public License
1815+ You should have received a copy of the GNU Lesser General Public License
1816 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1817
1818 /* Written by Paul Eggert and Bruno Haible, 2021. */
1819@@ -257,18 +257,22 @@ static DYNARRAY_ELEMENT *
1820
1821 #if defined DYNARRAY_STRUCT || defined DYNARRAY_ELEMENT || defined DYNARRAY_PREFIX
1822
1823-# include <libc-config.h>
1824+# ifndef _GL_LIKELY
1825+/* Rely on __builtin_expect, as provided by the module 'builtin-expect'. */
1826+# define _GL_LIKELY(cond) __builtin_expect ((cond), 1)
1827+# define _GL_UNLIKELY(cond) __builtin_expect ((cond), 0)
1828+# endif
1829
1830 /* Define auxiliary structs and declare auxiliary functions, common to all
1831 instantiations of dynarray. */
1832-# include <malloc/dynarray.h>
1833+# include <malloc/dynarray.gl.h>
1834
1835 /* Define the instantiation, specified through
1836 DYNARRAY_STRUCT
1837 DYNARRAY_ELEMENT
1838 DYNARRAY_PREFIX
1839 etc. */
1840-# include <malloc/dynarray-skeleton.c>
1841+# include <malloc/dynarray-skeleton.gl.h>
1842
1843 #else
1844
1845--- a/gnulib/lib/errno.in.h
1846+++ b/gnulib/lib/errno.in.h
1847@@ -2,18 +2,18 @@
1848
1849 Copyright (C) 2008-2021 Free Software Foundation, Inc.
1850
1851- This program is free software; you can redistribute it and/or modify
1852- it under the terms of the GNU General Public License as published by
1853- the Free Software Foundation; either version 3, or (at your option)
1854- any later version.
1855+ This file is free software: you can redistribute it and/or modify
1856+ it under the terms of the GNU Lesser General Public License as
1857+ published by the Free Software Foundation; either version 2.1 of the
1858+ License, or (at your option) any later version.
1859
1860- This program is distributed in the hope that it will be useful,
1861+ This file is distributed in the hope that it will be useful,
1862 but WITHOUT ANY WARRANTY; without even the implied warranty of
1863 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1864- GNU General Public License for more details.
1865+ GNU Lesser General Public License for more details.
1866
1867- You should have received a copy of the GNU General Public License
1868- along with this program; if not, see <https://www.gnu.org/licenses/>. */
1869+ You should have received a copy of the GNU Lesser General Public License
1870+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
1871
1872 #ifndef _@GUARD_PREFIX@_ERRNO_H
1873
1874--- a/gnulib/lib/error.c
1875+++ b/gnulib/lib/error.c
1876@@ -2,17 +2,17 @@
1877 Copyright (C) 1990-1998, 2000-2007, 2009-2021 Free Software Foundation, Inc.
1878 This file is part of the GNU C Library.
1879
1880- This program is free software: you can redistribute it and/or modify
1881- it under the terms of the GNU General Public License as published by
1882- the Free Software Foundation; either version 3 of the License, or
1883- (at your option) any later version.
1884+ This file is free software: you can redistribute it and/or modify
1885+ it under the terms of the GNU Lesser General Public License as
1886+ published by the Free Software Foundation; either version 2.1 of the
1887+ License, or (at your option) any later version.
1888
1889- This program is distributed in the hope that it will be useful,
1890+ This file is distributed in the hope that it will be useful,
1891 but WITHOUT ANY WARRANTY; without even the implied warranty of
1892 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1893- GNU General Public License for more details.
1894+ GNU Lesser General Public License for more details.
1895
1896- You should have received a copy of the GNU General Public License
1897+ You should have received a copy of the GNU Lesser General Public License
1898 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1899
1900 /* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
1901--- a/gnulib/lib/error.h
1902+++ b/gnulib/lib/error.h
1903@@ -3,17 +3,17 @@
1904 Inc.
1905 This file is part of the GNU C Library.
1906
1907- This program is free software: you can redistribute it and/or modify
1908- it under the terms of the GNU General Public License as published by
1909- the Free Software Foundation; either version 3 of the License, or
1910- (at your option) any later version.
1911+ This file is free software: you can redistribute it and/or modify
1912+ it under the terms of the GNU Lesser General Public License as
1913+ published by the Free Software Foundation; either version 2.1 of the
1914+ License, or (at your option) any later version.
1915
1916- This program is distributed in the hope that it will be useful,
1917+ This file is distributed in the hope that it will be useful,
1918 but WITHOUT ANY WARRANTY; without even the implied warranty of
1919 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1920- GNU General Public License for more details.
1921+ GNU Lesser General Public License for more details.
1922
1923- You should have received a copy of the GNU General Public License
1924+ You should have received a copy of the GNU Lesser General Public License
1925 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1926
1927 #ifndef _ERROR_H
1928--- a/gnulib/lib/exitfail.c
1929+++ b/gnulib/lib/exitfail.c
1930@@ -2,17 +2,17 @@
1931
1932 Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation, Inc.
1933
1934- This program is free software: you can redistribute it and/or modify
1935- it under the terms of the GNU General Public License as published by
1936- the Free Software Foundation; either version 3 of the License, or
1937- (at your option) any later version.
1938+ This file is free software: you can redistribute it and/or modify
1939+ it under the terms of the GNU Lesser General Public License as
1940+ published by the Free Software Foundation; either version 2.1 of the
1941+ License, or (at your option) any later version.
1942
1943- This program is distributed in the hope that it will be useful,
1944+ This file is distributed in the hope that it will be useful,
1945 but WITHOUT ANY WARRANTY; without even the implied warranty of
1946 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1947- GNU General Public License for more details.
1948+ GNU Lesser General Public License for more details.
1949
1950- You should have received a copy of the GNU General Public License
1951+ You should have received a copy of the GNU Lesser General Public License
1952 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1953
1954 #include <config.h>
1955--- a/gnulib/lib/exitfail.h
1956+++ b/gnulib/lib/exitfail.h
1957@@ -2,17 +2,17 @@
1958
1959 Copyright (C) 2002, 2009-2021 Free Software Foundation, Inc.
1960
1961- This program is free software: you can redistribute it and/or modify
1962- it under the terms of the GNU General Public License as published by
1963- the Free Software Foundation; either version 3 of the License, or
1964- (at your option) any later version.
1965+ This file is free software: you can redistribute it and/or modify
1966+ it under the terms of the GNU Lesser General Public License as
1967+ published by the Free Software Foundation; either version 2.1 of the
1968+ License, or (at your option) any later version.
1969
1970- This program is distributed in the hope that it will be useful,
1971+ This file is distributed in the hope that it will be useful,
1972 but WITHOUT ANY WARRANTY; without even the implied warranty of
1973 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1974- GNU General Public License for more details.
1975+ GNU Lesser General Public License for more details.
1976
1977- You should have received a copy of the GNU General Public License
1978+ You should have received a copy of the GNU Lesser General Public License
1979 along with this program. If not, see <https://www.gnu.org/licenses/>. */
1980
1981 extern int volatile exit_failure;
1982--- a/gnulib/lib/fcntl.c
1983+++ b/gnulib/lib/fcntl.c
1984@@ -2,17 +2,17 @@
1985
1986 Copyright (C) 2009-2021 Free Software Foundation, Inc.
1987
1988- This program is free software: you can redistribute it and/or modify
1989- it under the terms of the GNU General Public License as published by
1990- the Free Software Foundation; either version 3 of the License, or
1991- (at your option) any later version.
1992+ This file is free software: you can redistribute it and/or modify
1993+ it under the terms of the GNU Lesser General Public License as
1994+ published by the Free Software Foundation; either version 2.1 of the
1995+ License, or (at your option) any later version.
1996
1997- This program is distributed in the hope that it will be useful,
1998+ This file is distributed in the hope that it will be useful,
1999 but WITHOUT ANY WARRANTY; without even the implied warranty of
2000 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2001- GNU General Public License for more details.
2002+ GNU Lesser General Public License for more details.
2003
2004- You should have received a copy of the GNU General Public License
2005+ You should have received a copy of the GNU Lesser General Public License
2006 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2007
2008 /* Written by Eric Blake <ebb9@byu.net>. */
2009--- a/gnulib/lib/fcntl.in.h
2010+++ b/gnulib/lib/fcntl.in.h
2011@@ -2,17 +2,17 @@
2012
2013 Copyright (C) 2006-2021 Free Software Foundation, Inc.
2014
2015- This program is free software: you can redistribute it and/or modify
2016- it under the terms of the GNU General Public License as published by
2017- the Free Software Foundation; either version 3 of the License, or
2018- (at your option) any later version.
2019+ This file is free software: you can redistribute it and/or modify
2020+ it under the terms of the GNU Lesser General Public License as
2021+ published by the Free Software Foundation; either version 2.1 of the
2022+ License, or (at your option) any later version.
2023
2024- This program is distributed in the hope that it will be useful,
2025+ This file is distributed in the hope that it will be useful,
2026 but WITHOUT ANY WARRANTY; without even the implied warranty of
2027 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2028- GNU General Public License for more details.
2029+ GNU Lesser General Public License for more details.
2030
2031- You should have received a copy of the GNU General Public License
2032+ You should have received a copy of the GNU Lesser General Public License
2033 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2034
2035 /* written by Paul Eggert */
2036--- a/gnulib/lib/fd-hook.c
2037+++ b/gnulib/lib/fd-hook.c
2038@@ -2,17 +2,17 @@
2039 Copyright (C) 2009-2021 Free Software Foundation, Inc.
2040 Written by Bruno Haible <bruno@clisp.org>, 2009.
2041
2042- This program is free software: you can redistribute it and/or modify it
2043- under the terms of the GNU General Public License as published
2044- by the Free Software Foundation; either version 3 of the License, or
2045- (at your option) any later version.
2046+ This file is free software: you can redistribute it and/or modify
2047+ it under the terms of the GNU Lesser General Public License as
2048+ published by the Free Software Foundation; either version 2.1 of the
2049+ License, or (at your option) any later version.
2050
2051- This program is distributed in the hope that it will be useful,
2052+ This file is distributed in the hope that it will be useful,
2053 but WITHOUT ANY WARRANTY; without even the implied warranty of
2054- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2055- General Public License for more details.
2056+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2057+ GNU Lesser General Public License for more details.
2058
2059- You should have received a copy of the GNU General Public License
2060+ You should have received a copy of the GNU Lesser General Public License
2061 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2062
2063 #include <config.h>
2064--- a/gnulib/lib/fd-hook.h
2065+++ b/gnulib/lib/fd-hook.h
2066@@ -1,17 +1,17 @@
2067 /* Hook for making file descriptor functions close(), ioctl() extensible.
2068 Copyright (C) 2009-2021 Free Software Foundation, Inc.
2069
2070- This program is free software: you can redistribute it and/or modify it
2071- under the terms of the GNU General Public License as published
2072- by the Free Software Foundation; either version 3 of the License, or
2073- (at your option) any later version.
2074+ This file is free software: you can redistribute it and/or modify
2075+ it under the terms of the GNU Lesser General Public License as
2076+ published by the Free Software Foundation; either version 2.1 of the
2077+ License, or (at your option) any later version.
2078
2079- This program is distributed in the hope that it will be useful,
2080+ This file is distributed in the hope that it will be useful,
2081 but WITHOUT ANY WARRANTY; without even the implied warranty of
2082- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2083- General Public License for more details.
2084+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2085+ GNU Lesser General Public License for more details.
2086
2087- You should have received a copy of the GNU General Public License
2088+ You should have received a copy of the GNU Lesser General Public License
2089 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2090
2091
2092--- a/gnulib/lib/filename.h
2093+++ b/gnulib/lib/filename.h
2094@@ -3,16 +3,16 @@
2095 This file is part of the GNU C Library.
2096
2097 The GNU C Library is free software; you can redistribute it and/or
2098- modify it under the terms of the GNU General Public
2099+ modify it under the terms of the GNU Lesser General Public
2100 License as published by the Free Software Foundation; either
2101- version 3 of the License, or (at your option) any later version.
2102+ version 2.1 of the License, or (at your option) any later version.
2103
2104 The GNU C Library is distributed in the hope that it will be useful,
2105 but WITHOUT ANY WARRANTY; without even the implied warranty of
2106 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2107- General Public License for more details.
2108+ Lesser General Public License for more details.
2109
2110- You should have received a copy of the GNU General Public
2111+ You should have received a copy of the GNU Lesser General Public
2112 License along with the GNU C Library; if not, see
2113 <https://www.gnu.org/licenses/>. */
2114
2115--- a/gnulib/lib/float+.h
2116+++ b/gnulib/lib/float+.h
2117@@ -2,18 +2,18 @@
2118 Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
2119 Written by Bruno Haible <bruno@clisp.org>, 2007.
2120
2121- This program is free software; you can redistribute it and/or modify
2122- it under the terms of the GNU General Public License as published by
2123- the Free Software Foundation; either version 3, or (at your option)
2124- any later version.
2125+ This file is free software: you can redistribute it and/or modify
2126+ it under the terms of the GNU Lesser General Public License as
2127+ published by the Free Software Foundation; either version 2.1 of the
2128+ License, or (at your option) any later version.
2129
2130- This program is distributed in the hope that it will be useful,
2131+ This file is distributed in the hope that it will be useful,
2132 but WITHOUT ANY WARRANTY; without even the implied warranty of
2133 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2134- GNU General Public License for more details.
2135+ GNU Lesser General Public License for more details.
2136
2137- You should have received a copy of the GNU General Public License
2138- along with this program; if not, see <https://www.gnu.org/licenses/>. */
2139+ You should have received a copy of the GNU Lesser General Public License
2140+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2141
2142 #ifndef _FLOATPLUS_H
2143 #define _FLOATPLUS_H
2144--- a/gnulib/lib/float.c
2145+++ b/gnulib/lib/float.c
2146@@ -2,17 +2,17 @@
2147 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2148 Written by Bruno Haible <bruno@clisp.org>, 2011.
2149
2150- This program is free software: you can redistribute it and/or modify
2151- it under the terms of the GNU General Public License as published by
2152- the Free Software Foundation; either version 3 of the License, or
2153- (at your option) any later version.
2154+ This file is free software: you can redistribute it and/or modify
2155+ it under the terms of the GNU Lesser General Public License as
2156+ published by the Free Software Foundation; either version 2.1 of the
2157+ License, or (at your option) any later version.
2158
2159- This program is distributed in the hope that it will be useful,
2160+ This file is distributed in the hope that it will be useful,
2161 but WITHOUT ANY WARRANTY; without even the implied warranty of
2162 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2163- GNU General Public License for more details.
2164+ GNU Lesser General Public License for more details.
2165
2166- You should have received a copy of the GNU General Public License
2167+ You should have received a copy of the GNU Lesser General Public License
2168 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2169
2170 #include <config.h>
2171--- a/gnulib/lib/float.in.h
2172+++ b/gnulib/lib/float.in.h
2173@@ -2,17 +2,17 @@
2174
2175 Copyright (C) 2007-2021 Free Software Foundation, Inc.
2176
2177- This program is free software: you can redistribute it and/or modify
2178- it under the terms of the GNU General Public License as published by
2179- the Free Software Foundation; either version 3 of the License, or
2180- (at your option) any later version.
2181+ This file is free software: you can redistribute it and/or modify
2182+ it under the terms of the GNU Lesser General Public License as
2183+ published by the Free Software Foundation; either version 2.1 of the
2184+ License, or (at your option) any later version.
2185
2186- This program is distributed in the hope that it will be useful,
2187+ This file is distributed in the hope that it will be useful,
2188 but WITHOUT ANY WARRANTY; without even the implied warranty of
2189 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2190- GNU General Public License for more details.
2191+ GNU Lesser General Public License for more details.
2192
2193- You should have received a copy of the GNU General Public License
2194+ You should have received a copy of the GNU Lesser General Public License
2195 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2196
2197 #ifndef _@GUARD_PREFIX@_FLOAT_H
2198--- /dev/null
2199+++ b/gnulib/lib/free.c
2200@@ -0,0 +1,53 @@
2201+/* Make free() preserve errno.
2202+
2203+ Copyright (C) 2003, 2006, 2009-2021 Free Software Foundation, Inc.
2204+
2205+ This file is free software: you can redistribute it and/or modify
2206+ it under the terms of the GNU Lesser General Public License as
2207+ published by the Free Software Foundation; either version 2.1 of the
2208+ License, or (at your option) any later version.
2209+
2210+ This file is distributed in the hope that it will be useful,
2211+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2212+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2213+ GNU Lesser General Public License for more details.
2214+
2215+ You should have received a copy of the GNU Lesser General Public License
2216+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2217+
2218+/* written by Paul Eggert */
2219+
2220+#include <config.h>
2221+
2222+/* Specification. */
2223+#include <stdlib.h>
2224+
2225+/* A function definition is only needed if HAVE_FREE_POSIX is not defined. */
2226+#if !HAVE_FREE_POSIX
2227+
2228+# include <errno.h>
2229+
2230+void
2231+rpl_free (void *p)
2232+# undef free
2233+{
2234+# if defined __GNUC__ && !defined __clang__
2235+ /* An invalid GCC optimization
2236+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98396>
2237+ would optimize away the assignments in the code below, when link-time
2238+ optimization (LTO) is enabled. Make the code more complicated, so that
2239+ GCC does not grok how to optimize it. */
2240+ int err[2];
2241+ err[0] = errno;
2242+ err[1] = errno;
2243+ errno = 0;
2244+ free (p);
2245+ errno = err[errno == 0];
2246+# else
2247+ int err = errno;
2248+ free (p);
2249+ errno = err;
2250+# endif
2251+}
2252+
2253+#endif
2254--- a/gnulib/lib/fstat.c
2255+++ b/gnulib/lib/fstat.c
2256@@ -1,17 +1,17 @@
2257 /* fstat() replacement.
2258 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2259
2260- This program is free software: you can redistribute it and/or modify
2261- it under the terms of the GNU General Public License as published by
2262- the Free Software Foundation; either version 3 of the License, or
2263- (at your option) any later version.
2264+ This file is free software: you can redistribute it and/or modify
2265+ it under the terms of the GNU Lesser General Public License as
2266+ published by the Free Software Foundation; either version 2.1 of the
2267+ License, or (at your option) any later version.
2268
2269- This program is distributed in the hope that it will be useful,
2270+ This file is distributed in the hope that it will be useful,
2271 but WITHOUT ANY WARRANTY; without even the implied warranty of
2272 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2273- GNU General Public License for more details.
2274+ GNU Lesser General Public License for more details.
2275
2276- You should have received a copy of the GNU General Public License
2277+ You should have received a copy of the GNU Lesser General Public License
2278 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2279
2280 /* If the user's config.h happens to include <sys/stat.h>, let it include only
2281--- a/gnulib/lib/getdtablesize.c
2282+++ b/gnulib/lib/getdtablesize.c
2283@@ -2,17 +2,17 @@
2284 Copyright (C) 2008-2021 Free Software Foundation, Inc.
2285 Written by Bruno Haible <bruno@clisp.org>, 2008.
2286
2287- This program is free software: you can redistribute it and/or modify
2288- it under the terms of the GNU General Public License as published by
2289- the Free Software Foundation; either version 3 of the License, or
2290- (at your option) any later version.
2291+ This file is free software: you can redistribute it and/or modify
2292+ it under the terms of the GNU Lesser General Public License as
2293+ published by the Free Software Foundation; either version 2.1 of the
2294+ License, or (at your option) any later version.
2295
2296- This program is distributed in the hope that it will be useful,
2297+ This file is distributed in the hope that it will be useful,
2298 but WITHOUT ANY WARRANTY; without even the implied warranty of
2299 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2300- GNU General Public License for more details.
2301+ GNU Lesser General Public License for more details.
2302
2303- You should have received a copy of the GNU General Public License
2304+ You should have received a copy of the GNU Lesser General Public License
2305 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2306
2307 #include <config.h>
2308--- a/gnulib/lib/getopt-cdefs.in.h
2309+++ b/gnulib/lib/getopt-cdefs.in.h
2310@@ -4,19 +4,18 @@
2311 Unlike most of the getopt implementation, it is NOT shared
2312 with the GNU C Library.
2313
2314- This file is free software; you can redistribute it and/or modify it
2315- under the terms of the GNU General Public License as
2316- published by the Free Software Foundation; either version 3 of
2317- the License, or (at your option) any later version.
2318+ This file is free software: you can redistribute it and/or modify
2319+ it under the terms of the GNU Lesser General Public License as
2320+ published by the Free Software Foundation; either version 2.1 of the
2321+ License, or (at your option) any later version.
2322
2323- This file is distributed in the hope that it will be useful, but
2324- WITHOUT ANY WARRANTY; without even the implied warranty of
2325- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2326- General Public License for more details.
2327+ This file is distributed in the hope that it will be useful,
2328+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2329+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2330+ GNU Lesser General Public License for more details.
2331
2332- You should have received a copy of the GNU General Public
2333- License along with gnulib; if not, see
2334- <https://www.gnu.org/licenses/>. */
2335+ You should have received a copy of the GNU Lesser General Public License
2336+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2337
2338 #ifndef _GETOPT_CDEFS_H
2339 #define _GETOPT_CDEFS_H 1
2340--- a/gnulib/lib/getopt-core.h
2341+++ b/gnulib/lib/getopt-core.h
2342@@ -4,16 +4,16 @@
2343 Patches to this file should be submitted to both projects.
2344
2345 The GNU C Library is free software; you can redistribute it and/or
2346- modify it under the terms of the GNU General Public
2347+ modify it under the terms of the GNU Lesser General Public
2348 License as published by the Free Software Foundation; either
2349- version 3 of the License, or (at your option) any later version.
2350+ version 2.1 of the License, or (at your option) any later version.
2351
2352 The GNU C Library is distributed in the hope that it will be useful,
2353 but WITHOUT ANY WARRANTY; without even the implied warranty of
2354 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2355- General Public License for more details.
2356+ Lesser General Public License for more details.
2357
2358- You should have received a copy of the GNU General Public
2359+ You should have received a copy of the GNU Lesser General Public
2360 License along with the GNU C Library; if not, see
2361 <https://www.gnu.org/licenses/>. */
2362
2363--- a/gnulib/lib/getopt-ext.h
2364+++ b/gnulib/lib/getopt-ext.h
2365@@ -4,16 +4,16 @@
2366 Patches to this file should be submitted to both projects.
2367
2368 The GNU C Library is free software; you can redistribute it and/or
2369- modify it under the terms of the GNU General Public
2370+ modify it under the terms of the GNU Lesser General Public
2371 License as published by the Free Software Foundation; either
2372- version 3 of the License, or (at your option) any later version.
2373+ version 2.1 of the License, or (at your option) any later version.
2374
2375 The GNU C Library is distributed in the hope that it will be useful,
2376 but WITHOUT ANY WARRANTY; without even the implied warranty of
2377 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2378- General Public License for more details.
2379+ Lesser General Public License for more details.
2380
2381- You should have received a copy of the GNU General Public
2382+ You should have received a copy of the GNU Lesser General Public
2383 License along with the GNU C Library; if not, see
2384 <https://www.gnu.org/licenses/>. */
2385
2386--- a/gnulib/lib/getopt-pfx-core.h
2387+++ b/gnulib/lib/getopt-pfx-core.h
2388@@ -4,19 +4,18 @@
2389 Unlike most of the getopt implementation, it is NOT shared
2390 with the GNU C Library.
2391
2392- This file is free software; you can redistribute it and/or modify it
2393- under the terms of the GNU General Public License as
2394- published by the Free Software Foundation; either version 3 of
2395- the License, or (at your option) any later version.
2396+ This file is free software: you can redistribute it and/or modify
2397+ it under the terms of the GNU Lesser General Public License as
2398+ published by the Free Software Foundation; either version 2.1 of the
2399+ License, or (at your option) any later version.
2400
2401- This file is distributed in the hope that it will be useful, but
2402- WITHOUT ANY WARRANTY; without even the implied warranty of
2403- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2404- General Public License for more details.
2405+ This file is distributed in the hope that it will be useful,
2406+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2407+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2408+ GNU Lesser General Public License for more details.
2409
2410- You should have received a copy of the GNU General Public
2411- License along with gnulib; if not, see
2412- <https://www.gnu.org/licenses/>. */
2413+ You should have received a copy of the GNU Lesser General Public License
2414+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2415
2416 #ifndef _GETOPT_PFX_CORE_H
2417 #define _GETOPT_PFX_CORE_H 1
2418--- a/gnulib/lib/getopt-pfx-ext.h
2419+++ b/gnulib/lib/getopt-pfx-ext.h
2420@@ -4,19 +4,18 @@
2421 Unlike most of the getopt implementation, it is NOT shared
2422 with the GNU C Library.
2423
2424- This file is free software; you can redistribute it and/or modify it
2425- under the terms of the GNU General Public License as
2426- published by the Free Software Foundation; either version 3 of
2427- the License, or (at your option) any later version.
2428+ This file is free software: you can redistribute it and/or modify
2429+ it under the terms of the GNU Lesser General Public License as
2430+ published by the Free Software Foundation; either version 2.1 of the
2431+ License, or (at your option) any later version.
2432
2433- This file is distributed in the hope that it will be useful, but
2434- WITHOUT ANY WARRANTY; without even the implied warranty of
2435- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2436- General Public License for more details.
2437+ This file is distributed in the hope that it will be useful,
2438+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2439+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2440+ GNU Lesser General Public License for more details.
2441
2442- You should have received a copy of the GNU General Public
2443- License along with gnulib; if not, see
2444- <https://www.gnu.org/licenses/>. */
2445+ You should have received a copy of the GNU Lesser General Public License
2446+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2447
2448 #ifndef _GETOPT_PFX_EXT_H
2449 #define _GETOPT_PFX_EXT_H 1
2450--- a/gnulib/lib/getopt.c
2451+++ b/gnulib/lib/getopt.c
2452@@ -4,16 +4,16 @@
2453 Patches to this file should be submitted to both projects.
2454
2455 The GNU C Library is free software; you can redistribute it and/or
2456- modify it under the terms of the GNU General Public
2457+ modify it under the terms of the GNU Lesser General Public
2458 License as published by the Free Software Foundation; either
2459- version 3 of the License, or (at your option) any later version.
2460+ version 2.1 of the License, or (at your option) any later version.
2461
2462 The GNU C Library is distributed in the hope that it will be useful,
2463 but WITHOUT ANY WARRANTY; without even the implied warranty of
2464 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2465- General Public License for more details.
2466+ Lesser General Public License for more details.
2467
2468- You should have received a copy of the GNU General Public
2469+ You should have received a copy of the GNU Lesser General Public
2470 License along with the GNU C Library; if not, see
2471 <https://www.gnu.org/licenses/>. */
2472
2473--- a/gnulib/lib/getopt.in.h
2474+++ b/gnulib/lib/getopt.in.h
2475@@ -5,18 +5,18 @@
2476 with the GNU C Library, which supplies a different version of
2477 this file.
2478
2479- This file is free software; you can redistribute it and/or modify it
2480- under the terms of the GNU General Public License as
2481- published by the Free Software Foundation; either version 3 of
2482- the License, or (at your option) any later version.
2483+ This file is free software: you can redistribute it and/or modify
2484+ it under the terms of the GNU Lesser General Public License as
2485+ published by the Free Software Foundation; either version 2.1 of the
2486+ License, or (at your option) any later version.
2487
2488- This file is distributed in the hope that it will be useful, but
2489- WITHOUT ANY WARRANTY; without even the implied warranty of
2490- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2491- General Public License for more details.
2492+ This file is distributed in the hope that it will be useful,
2493+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2494+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2495+ GNU Lesser General Public License for more details.
2496
2497- You should have received a copy of the GNU General Public
2498- License along with gnulib; if not, see <https://www.gnu.org/licenses/>. */
2499+ You should have received a copy of the GNU Lesser General Public License
2500+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2501
2502 #ifndef _@GUARD_PREFIX@_GETOPT_H
2503
2504--- a/gnulib/lib/getopt1.c
2505+++ b/gnulib/lib/getopt1.c
2506@@ -4,16 +4,16 @@
2507 Patches to this file should be submitted to both projects.
2508
2509 The GNU C Library is free software; you can redistribute it and/or
2510- modify it under the terms of the GNU General Public
2511+ modify it under the terms of the GNU Lesser General Public
2512 License as published by the Free Software Foundation; either
2513- version 3 of the License, or (at your option) any later version.
2514+ version 2.1 of the License, or (at your option) any later version.
2515
2516 The GNU C Library is distributed in the hope that it will be useful,
2517 but WITHOUT ANY WARRANTY; without even the implied warranty of
2518 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2519- General Public License for more details.
2520+ Lesser General Public License for more details.
2521
2522- You should have received a copy of the GNU General Public
2523+ You should have received a copy of the GNU Lesser General Public
2524 License along with the GNU C Library; if not, see
2525 <https://www.gnu.org/licenses/>. */
2526
2527--- a/gnulib/lib/getopt_int.h
2528+++ b/gnulib/lib/getopt_int.h
2529@@ -4,16 +4,16 @@
2530 Patches to this file should be submitted to both projects.
2531
2532 The GNU C Library is free software; you can redistribute it and/or
2533- modify it under the terms of the GNU General Public
2534+ modify it under the terms of the GNU Lesser General Public
2535 License as published by the Free Software Foundation; either
2536- version 3 of the License, or (at your option) any later version.
2537+ version 2.1 of the License, or (at your option) any later version.
2538
2539 The GNU C Library is distributed in the hope that it will be useful,
2540 but WITHOUT ANY WARRANTY; without even the implied warranty of
2541 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2542- General Public License for more details.
2543+ Lesser General Public License for more details.
2544
2545- You should have received a copy of the GNU General Public
2546+ You should have received a copy of the GNU Lesser General Public
2547 License along with the GNU C Library; if not, see
2548 <https://www.gnu.org/licenses/>. */
2549
2550--- a/gnulib/lib/getprogname.c
2551+++ b/gnulib/lib/getprogname.c
2552@@ -2,16 +2,16 @@
2553 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2554
2555 This program is free software: you can redistribute it and/or modify
2556- it under the terms of the GNU General Public License as published by
2557- the Free Software Foundation; either version 3 of the License, or
2558+ it under the terms of the GNU Lesser General Public License as published by
2559+ the Free Software Foundation; either version 2.1 of the License, or
2560 (at your option) any later version.
2561
2562 This program is distributed in the hope that it will be useful,
2563 but WITHOUT ANY WARRANTY; without even the implied warranty of
2564 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2565- GNU General Public License for more details.
2566+ GNU Lesser General Public License for more details.
2567
2568- You should have received a copy of the GNU General Public License
2569+ You should have received a copy of the GNU Lesser General Public License
2570 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2571
2572 #include <config.h>
2573@@ -43,7 +43,7 @@
2574 # include <string.h>
2575 #endif
2576
2577-#ifdef __sgi
2578+#if defined __sgi || defined __osf__
2579 # include <string.h>
2580 # include <unistd.h>
2581 # include <stdio.h>
2582@@ -224,11 +224,15 @@ getprogname (void)
2583 free (buf.ps_pathptr);
2584 }
2585 return p;
2586-# elif defined __sgi /* IRIX */
2587+# elif defined __sgi || defined __osf__ /* IRIX or Tru64 */
2588 char filename[50];
2589 int fd;
2590
2591- sprintf (filename, "/proc/pinfo/%d", (int) getpid ());
2592+ # if defined __sgi
2593+ sprintf (filename, "/proc/pinfo/%d", (int) getpid ());
2594+ # else
2595+ sprintf (filename, "/proc/%d", (int) getpid ());
2596+ # endif
2597 fd = open (filename, O_RDONLY | O_CLOEXEC);
2598 if (0 <= fd)
2599 {
2600--- a/gnulib/lib/getprogname.h
2601+++ b/gnulib/lib/getprogname.h
2602@@ -2,16 +2,16 @@
2603 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2604
2605 This program is free software: you can redistribute it and/or modify
2606- it under the terms of the GNU General Public License as published by
2607- the Free Software Foundation; either version 3 of the License, or
2608+ it under the terms of the GNU Lesser General Public License as published by
2609+ the Free Software Foundation; either version 2.1 of the License, or
2610 (at your option) any later version.
2611
2612 This program is distributed in the hope that it will be useful,
2613 but WITHOUT ANY WARRANTY; without even the implied warranty of
2614 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2615- GNU General Public License for more details.
2616+ GNU Lesser General Public License for more details.
2617
2618- You should have received a copy of the GNU General Public License
2619+ You should have received a copy of the GNU Lesser General Public License
2620 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2621
2622 #ifndef _GL_GETPROGNAME_H
2623--- a/gnulib/lib/gettext.h
2624+++ b/gnulib/lib/gettext.h
2625@@ -2,18 +2,18 @@
2626 Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2021 Free Software
2627 Foundation, Inc.
2628
2629- This program is free software; you can redistribute it and/or modify
2630- it under the terms of the GNU General Public License as published by
2631- the Free Software Foundation; either version 3, or (at your option)
2632- any later version.
2633+ This file is free software: you can redistribute it and/or modify
2634+ it under the terms of the GNU Lesser General Public License as
2635+ published by the Free Software Foundation; either version 2.1 of the
2636+ License, or (at your option) any later version.
2637
2638- This program is distributed in the hope that it will be useful,
2639+ This file is distributed in the hope that it will be useful,
2640 but WITHOUT ANY WARRANTY; without even the implied warranty of
2641 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2642- GNU General Public License for more details.
2643+ GNU Lesser General Public License for more details.
2644
2645- You should have received a copy of the GNU General Public License along
2646- with this program; if not, see <https://www.gnu.org/licenses/>. */
2647+ You should have received a copy of the GNU Lesser General Public License
2648+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2649
2650 #ifndef _LIBGETTEXT_H
2651 #define _LIBGETTEXT_H 1
2652--- a/gnulib/lib/glthread/lock.c
2653+++ b/gnulib/lib/glthread/lock.c
2654@@ -1,18 +1,18 @@
2655 /* Locking in multithreaded situations.
2656 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2657
2658- This program is free software; you can redistribute it and/or modify
2659- it under the terms of the GNU General Public License as published by
2660- the Free Software Foundation; either version 3, or (at your option)
2661- any later version.
2662+ This file is free software: you can redistribute it and/or modify
2663+ it under the terms of the GNU Lesser General Public License as
2664+ published by the Free Software Foundation; either version 2.1 of the
2665+ License, or (at your option) any later version.
2666
2667- This program is distributed in the hope that it will be useful,
2668+ This file is distributed in the hope that it will be useful,
2669 but WITHOUT ANY WARRANTY; without even the implied warranty of
2670 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2671- GNU General Public License for more details.
2672+ GNU Lesser General Public License for more details.
2673
2674- You should have received a copy of the GNU General Public License
2675- along with this program; if not, see <https://www.gnu.org/licenses/>. */
2676+ You should have received a copy of the GNU Lesser General Public License
2677+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2678
2679 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
2680 Based on GCC's gthr-posix.h, gthr-posix95.h. */
2681--- a/gnulib/lib/glthread/lock.h
2682+++ b/gnulib/lib/glthread/lock.h
2683@@ -1,18 +1,18 @@
2684 /* Locking in multithreaded situations.
2685 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2686
2687- This program is free software; you can redistribute it and/or modify
2688- it under the terms of the GNU General Public License as published by
2689- the Free Software Foundation; either version 3, or (at your option)
2690- any later version.
2691+ This file is free software: you can redistribute it and/or modify
2692+ it under the terms of the GNU Lesser General Public License as
2693+ published by the Free Software Foundation; either version 2.1 of the
2694+ License, or (at your option) any later version.
2695
2696- This program is distributed in the hope that it will be useful,
2697+ This file is distributed in the hope that it will be useful,
2698 but WITHOUT ANY WARRANTY; without even the implied warranty of
2699 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2700- GNU General Public License for more details.
2701+ GNU Lesser General Public License for more details.
2702
2703- You should have received a copy of the GNU General Public License
2704- along with this program; if not, see <https://www.gnu.org/licenses/>. */
2705+ You should have received a copy of the GNU Lesser General Public License
2706+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2707
2708 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
2709 Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-win32.h. */
2710--- a/gnulib/lib/glthread/threadlib.c
2711+++ b/gnulib/lib/glthread/threadlib.c
2712@@ -1,18 +1,18 @@
2713 /* Multithreading primitives.
2714 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2715
2716- This program is free software; you can redistribute it and/or modify
2717- it under the terms of the GNU General Public License as published by
2718- the Free Software Foundation; either version 3, or (at your option)
2719- any later version.
2720+ This file is free software: you can redistribute it and/or modify
2721+ it under the terms of the GNU Lesser General Public License as
2722+ published by the Free Software Foundation; either version 2.1 of the
2723+ License, or (at your option) any later version.
2724
2725- This program is distributed in the hope that it will be useful,
2726+ This file is distributed in the hope that it will be useful,
2727 but WITHOUT ANY WARRANTY; without even the implied warranty of
2728 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2729- GNU General Public License for more details.
2730+ GNU Lesser General Public License for more details.
2731
2732- You should have received a copy of the GNU General Public License
2733- along with this program; if not, see <https://www.gnu.org/licenses/>. */
2734+ You should have received a copy of the GNU Lesser General Public License
2735+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2736
2737 /* Written by Bruno Haible <bruno@clisp.org>, 2005. */
2738
2739--- a/gnulib/lib/hard-locale.c
2740+++ b/gnulib/lib/hard-locale.c
2741@@ -3,17 +3,17 @@
2742 Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2021 Free Software
2743 Foundation, Inc.
2744
2745- This program is free software: you can redistribute it and/or modify
2746- it under the terms of the GNU General Public License as published by
2747- the Free Software Foundation; either version 3 of the License, or
2748- (at your option) any later version.
2749+ This file is free software: you can redistribute it and/or modify
2750+ it under the terms of the GNU Lesser General Public License as
2751+ published by the Free Software Foundation; either version 2.1 of the
2752+ License, or (at your option) any later version.
2753
2754- This program is distributed in the hope that it will be useful,
2755+ This file is distributed in the hope that it will be useful,
2756 but WITHOUT ANY WARRANTY; without even the implied warranty of
2757 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2758- GNU General Public License for more details.
2759+ GNU Lesser General Public License for more details.
2760
2761- You should have received a copy of the GNU General Public License
2762+ You should have received a copy of the GNU Lesser General Public License
2763 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2764
2765 #include <config.h>
2766--- a/gnulib/lib/hard-locale.h
2767+++ b/gnulib/lib/hard-locale.h
2768@@ -2,17 +2,17 @@
2769
2770 Copyright (C) 1999, 2003-2004, 2009-2021 Free Software Foundation, Inc.
2771
2772- This program is free software: you can redistribute it and/or modify
2773- it under the terms of the GNU General Public License as published by
2774- the Free Software Foundation; either version 3 of the License, or
2775- (at your option) any later version.
2776+ This file is free software: you can redistribute it and/or modify
2777+ it under the terms of the GNU Lesser General Public License as
2778+ published by the Free Software Foundation; either version 2.1 of the
2779+ License, or (at your option) any later version.
2780
2781- This program is distributed in the hope that it will be useful,
2782+ This file is distributed in the hope that it will be useful,
2783 but WITHOUT ANY WARRANTY; without even the implied warranty of
2784 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2785- GNU General Public License for more details.
2786+ GNU Lesser General Public License for more details.
2787
2788- You should have received a copy of the GNU General Public License
2789+ You should have received a copy of the GNU Lesser General Public License
2790 along with this program. If not, see <https://www.gnu.org/licenses/>. */
2791
2792 #ifndef HARD_LOCALE_H_
2793--- /dev/null
2794+++ b/gnulib/lib/ialloc.c
2795@@ -0,0 +1,21 @@
2796+/* malloc with idx_t rather than size_t
2797+
2798+ Copyright 2021 Free Software Foundation, Inc.
2799+
2800+ This file is free software: you can redistribute it and/or modify
2801+ it under the terms of the GNU Lesser General Public License as
2802+ published by the Free Software Foundation; either version 3 of the
2803+ License, or (at your option) any later version.
2804+
2805+ This file is distributed in the hope that it will be useful,
2806+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2807+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2808+ GNU Lesser General Public License for more details.
2809+
2810+ You should have received a copy of the GNU Lesser General Public License
2811+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2812+
2813+#include <config.h>
2814+
2815+#define IALLOC_INLINE _GL_EXTERN_INLINE
2816+#include "ialloc.h"
2817--- /dev/null
2818+++ b/gnulib/lib/ialloc.h
2819@@ -0,0 +1,94 @@
2820+/* ialloc.h -- malloc with idx_t rather than size_t
2821+
2822+ Copyright 2021 Free Software Foundation, Inc.
2823+
2824+ This file is free software: you can redistribute it and/or modify
2825+ it under the terms of the GNU Lesser General Public License as
2826+ published by the Free Software Foundation; either version 3 of the
2827+ License, or (at your option) any later version.
2828+
2829+ This file is distributed in the hope that it will be useful,
2830+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2831+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2832+ GNU Lesser General Public License for more details.
2833+
2834+ You should have received a copy of the GNU Lesser General Public License
2835+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
2836+
2837+#ifndef IALLOC_H_
2838+#define IALLOC_H_
2839+
2840+#include "idx.h"
2841+
2842+#include <errno.h>
2843+#include <stdint.h>
2844+#include <stdlib.h>
2845+
2846+#ifndef _GL_INLINE_HEADER_BEGIN
2847+ #error "Please include config.h first."
2848+#endif
2849+_GL_INLINE_HEADER_BEGIN
2850+#ifndef IALLOC_INLINE
2851+# define IALLOC_INLINE _GL_INLINE
2852+#endif
2853+
2854+#ifdef __cplusplus
2855+extern "C" {
2856+#endif
2857+
2858+IALLOC_INLINE void * _GL_ATTRIBUTE_COLD
2859+_gl_alloc_nomem (void)
2860+{
2861+ errno = ENOMEM;
2862+ return NULL;
2863+}
2864+
2865+IALLOC_INLINE void *
2866+imalloc (idx_t s)
2867+{
2868+ return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem ();
2869+}
2870+
2871+IALLOC_INLINE void *
2872+irealloc (void *p, idx_t s)
2873+{
2874+ /* Work around GNU realloc glitch by treating a zero size as if it
2875+ were 1, so that returning NULL is equivalent to failing. */
2876+ return s <= SIZE_MAX ? realloc (p, s | !s) : _gl_alloc_nomem ();
2877+}
2878+
2879+IALLOC_INLINE void *
2880+icalloc (idx_t n, idx_t s)
2881+{
2882+ if (SIZE_MAX < n)
2883+ {
2884+ if (s != 0)
2885+ return _gl_alloc_nomem ();
2886+ n = 0;
2887+ }
2888+ if (SIZE_MAX < s)
2889+ {
2890+ if (n != 0)
2891+ return _gl_alloc_nomem ();
2892+ s = 0;
2893+ }
2894+ return calloc (n, s);
2895+}
2896+
2897+IALLOC_INLINE void *
2898+ireallocarray (void *p, idx_t n, idx_t s)
2899+{
2900+ /* Work around GNU reallocarray glitch by treating a zero size as if
2901+ it were 1, so that returning NULL is equivalent to failing. */
2902+ if (n == 0 || s == 0)
2903+ n = s = 1;
2904+ return (n <= SIZE_MAX && s <= SIZE_MAX
2905+ ? reallocarray (p, n, s)
2906+ : _gl_alloc_nomem ());
2907+}
2908+
2909+#ifdef __cplusplus
2910+}
2911+#endif
2912+
2913+#endif
2914--- /dev/null
2915+++ b/gnulib/lib/idx.h
2916@@ -0,0 +1,114 @@
2917+/* A type for indices and sizes.
2918+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
2919+ This file is part of the GNU C Library.
2920+
2921+ The GNU C Library is free software; you can redistribute it and/or
2922+ modify it under the terms of the GNU Lesser General Public
2923+ License as published by the Free Software Foundation; either
2924+ version 2.1 of the License, or (at your option) any later version.
2925+
2926+ The GNU C Library is distributed in the hope that it will be useful,
2927+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2928+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2929+ Lesser General Public License for more details.
2930+
2931+ You should have received a copy of the GNU Lesser General Public
2932+ License along with the GNU C Library; if not, see
2933+ <https://www.gnu.org/licenses/>. */
2934+
2935+#ifndef _IDX_H
2936+#define _IDX_H
2937+
2938+/* Get ptrdiff_t. */
2939+#include <stddef.h>
2940+
2941+/* Get PTRDIFF_MAX. */
2942+#include <stdint.h>
2943+
2944+/* The type 'idx_t' holds an (array) index or an (object) size.
2945+ Its implementation promotes to a signed integer type,
2946+ which can hold the values
2947+ 0..2^63-1 (on 64-bit platforms) or
2948+ 0..2^31-1 (on 32-bit platforms).
2949+
2950+ Why a signed integer type?
2951+
2952+ * Security: Signed types can be checked for overflow via
2953+ '-fsanitize=undefined', but unsigned types cannot.
2954+
2955+ * Comparisons without surprises: ISO C99 § 6.3.1.8 specifies a few
2956+ surprising results for comparisons, such as
2957+
2958+ (int) -3 < (unsigned long) 7 => false
2959+ (int) -3 < (unsigned int) 7 => false
2960+ and on 32-bit machines:
2961+ (long) -3 < (unsigned int) 7 => false
2962+
2963+ This is surprising because the natural comparison order is by
2964+ value in the realm of infinite-precision signed integers (ℤ).
2965+
2966+ The best way to get rid of such surprises is to use signed types
2967+ for numerical integer values, and use unsigned types only for
2968+ bit masks and enums.
2969+
2970+ Why not use 'size_t' directly?
2971+
2972+ * Because 'size_t' is an unsigned type, and a signed type is better.
2973+ See above.
2974+
2975+ Why not use 'ptrdiff_t' directly?
2976+
2977+ * Maintainability: When reading and modifying code, it helps to know that
2978+ a certain variable cannot have negative values. For example, when you
2979+ have a loop
2980+
2981+ int n = ...;
2982+ for (int i = 0; i < n; i++) ...
2983+
2984+ or
2985+
2986+ ptrdiff_t n = ...;
2987+ for (ptrdiff_t i = 0; i < n; i++) ...
2988+
2989+ you have to ask yourself "what if n < 0?". Whereas in
2990+
2991+ idx_t n = ...;
2992+ for (idx_t i = 0; i < n; i++) ...
2993+
2994+ you know that this case cannot happen.
2995+
2996+ Similarly, when a programmer writes
2997+
2998+ idx_t = ptr2 - ptr1;
2999+
3000+ there is an implied assertion that ptr1 and ptr2 point into the same
3001+ object and that ptr1 <= ptr2.
3002+
3003+ * Being future-proof: In the future, range types (integers which are
3004+ constrained to a certain range of values) may be added to C compilers
3005+ or to the C standard. Several programming languages (Ada, Haskell,
3006+ Common Lisp, Pascal) already have range types. Such range types may
3007+ help producing good code and good warnings. The type 'idx_t' could
3008+ then be typedef'ed to a range type that is signed after promotion. */
3009+
3010+/* In the future, idx_t could be typedef'ed to a signed range type.
3011+ The clang "extended integer types", supported in Clang 11 or newer
3012+ <https://clang.llvm.org/docs/LanguageExtensions.html#extended-integer-types>,
3013+ are a special case of range types. However, these types don't support binary
3014+ operators with plain integer types (e.g. expressions such as x > 1).
3015+ Therefore, they don't behave like signed types (and not like unsigned types
3016+ either). So, we cannot use them here. */
3017+
3018+/* Use the signed type 'ptrdiff_t'. */
3019+/* Note: ISO C does not mandate that 'size_t' and 'ptrdiff_t' have the same
3020+ size, but it is so on all platforms we have seen since 1990. */
3021+typedef ptrdiff_t idx_t;
3022+
3023+/* IDX_MAX is the maximum value of an idx_t. */
3024+#define IDX_MAX PTRDIFF_MAX
3025+
3026+/* So far no need has been found for an IDX_WIDTH macro.
3027+ Perhaps there should be another macro IDX_VALUE_BITS that does not
3028+ count the sign bit and is therefore one less than PTRDIFF_WIDTH. */
3029+
3030+#endif /* _IDX_H */
3031--- a/gnulib/lib/intprops.h
3032+++ b/gnulib/lib/intprops.h
3033@@ -3,16 +3,16 @@
3034 Copyright (C) 2001-2021 Free Software Foundation, Inc.
3035
3036 This program is free software: you can redistribute it and/or modify it
3037- under the terms of the GNU General Public License as published
3038- by the Free Software Foundation; either version 3 of the License, or
3039+ under the terms of the GNU Lesser General Public License as published
3040+ by the Free Software Foundation; either version 2.1 of the License, or
3041 (at your option) any later version.
3042
3043 This program is distributed in the hope that it will be useful,
3044 but WITHOUT ANY WARRANTY; without even the implied warranty of
3045 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3046- GNU General Public License for more details.
3047+ GNU Lesser General Public License for more details.
3048
3049- You should have received a copy of the GNU General Public License
3050+ You should have received a copy of the GNU Lesser General Public License
3051 along with this program. If not, see <https://www.gnu.org/licenses/>. */
3052
3053 /* Written by Paul Eggert. */
3054@@ -133,7 +133,8 @@
3055 operators might not yield numerically correct answers due to
3056 arithmetic overflow. They do not rely on undefined or
3057 implementation-defined behavior. Their implementations are simple
3058- and straightforward, but they are a bit harder to use than the
3059+ and straightforward, but they are harder to use and may be less
3060+ efficient than the INT_<op>_WRAPV, INT_<op>_OK, and
3061 INT_<op>_OVERFLOW macros described below.
3062
3063 Example usage:
3064@@ -158,6 +159,9 @@
3065 must have minimum value MIN and maximum MAX. Unsigned types should
3066 use a zero MIN of the proper type.
3067
3068+ Because all arguments are subject to integer promotions, these
3069+ macros typically do not work on types narrower than 'int'.
3070+
3071 These macros are tuned for constant MIN and MAX. For commutative
3072 operations such as A + B, they are also tuned for constant B. */
3073
3074@@ -339,9 +343,15 @@
3075 arguments should not have side effects.
3076
3077 The WRAPV macros are not constant expressions. They support only
3078- +, binary -, and *. Because the WRAPV macros convert the result,
3079- they report overflow in different circumstances than the OVERFLOW
3080- macros do.
3081+ +, binary -, and *.
3082+
3083+ Because the WRAPV macros convert the result, they report overflow
3084+ in different circumstances than the OVERFLOW macros do. For
3085+ example, in the typical case with 16-bit 'short' and 32-bit 'int',
3086+ if A, B and R are all of type 'short' then INT_ADD_OVERFLOW (A, B)
3087+ returns false because the addition cannot overflow after A and B
3088+ are converted to 'int', whereas INT_ADD_WRAPV (A, B, &R) returns
3089+ true or false depending on whether the sum fits into 'short'.
3090
3091 These macros are tuned for their last input argument being a constant.
3092
3093--- a/gnulib/lib/inttypes.in.h
3094+++ b/gnulib/lib/inttypes.in.h
3095@@ -2,17 +2,17 @@
3096 Written by Paul Eggert, Bruno Haible, Derek Price.
3097 This file is part of gnulib.
3098
3099- This program is free software: you can redistribute it and/or modify
3100- it under the terms of the GNU General Public License as published by
3101- the Free Software Foundation; either version 3 of the License, or
3102- (at your option) any later version.
3103+ This file is free software: you can redistribute it and/or modify
3104+ it under the terms of the GNU Lesser General Public License as
3105+ published by the Free Software Foundation; either version 2.1 of the
3106+ License, or (at your option) any later version.
3107
3108- This program is distributed in the hope that it will be useful,
3109+ This file is distributed in the hope that it will be useful,
3110 but WITHOUT ANY WARRANTY; without even the implied warranty of
3111 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3112- GNU General Public License for more details.
3113+ GNU Lesser General Public License for more details.
3114
3115- You should have received a copy of the GNU General Public License
3116+ You should have received a copy of the GNU Lesser General Public License
3117 along with this program. If not, see <https://www.gnu.org/licenses/>. */
3118
3119 /*
3120--- a/gnulib/lib/iswblank.c
3121+++ b/gnulib/lib/iswblank.c
3122@@ -1,18 +1,18 @@
3123 /* Test wide character for being blank.
3124 Copyright (C) 2008-2021 Free Software Foundation, Inc.
3125
3126- This program is free software; you can redistribute it and/or modify
3127- it under the terms of the GNU General Public License as published by
3128- the Free Software Foundation; either version 3, or (at your option)
3129- any later version.
3130+ This file is free software: you can redistribute it and/or modify
3131+ it under the terms of the GNU Lesser General Public License as
3132+ published by the Free Software Foundation; either version 2.1 of the
3133+ License, or (at your option) any later version.
3134
3135- This program is distributed in the hope that it will be useful,
3136+ This file is distributed in the hope that it will be useful,
3137 but WITHOUT ANY WARRANTY; without even the implied warranty of
3138 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3139- GNU General Public License for more details.
3140+ GNU Lesser General Public License for more details.
3141
3142- You should have received a copy of the GNU General Public License along
3143- with this program; if not, see <https://www.gnu.org/licenses/>. */
3144+ You should have received a copy of the GNU Lesser General Public License
3145+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
3146
3147 #include <config.h>
3148
3149--- a/gnulib/lib/iswdigit.c
3150+++ b/gnulib/lib/iswdigit.c
3151@@ -1,18 +1,18 @@
3152 /* Test wide character for being a digit.
3153 Copyright (C) 2020-2021 Free Software Foundation, Inc.
3154
3155- This program is free software; you can redistribute it and/or modify
3156- it under the terms of the GNU General Public License as published by
3157- the Free Software Foundation; either version 3, or (at your option)
3158- any later version.
3159+ This file is free software: you can redistribute it and/or modify
3160+ it under the terms of the GNU Lesser General Public License as
3161+ published by the Free Software Foundation; either version 2.1 of the
3162+ License, or (at your option) any later version.
3163
3164- This program is distributed in the hope that it will be useful,
3165+ This file is distributed in the hope that it will be useful,
3166 but WITHOUT ANY WARRANTY; without even the implied warranty of
3167 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3168- GNU General Public License for more details.
3169+ GNU Lesser General Public License for more details.
3170
3171- You should have received a copy of the GNU General Public License along
3172- with this program; if not, see <https://www.gnu.org/licenses/>. */
3173+ You should have received a copy of the GNU Lesser General Public License
3174+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
3175
3176 #include <config.h>
3177
3178--- a/gnulib/lib/iswxdigit.c
3179+++ b/gnulib/lib/iswxdigit.c
3180@@ -1,18 +1,18 @@
3181 /* Test wide character for being a hexadecimal digit.
3182 Copyright (C) 2020-2021 Free Software Foundation, Inc.
3183
3184- This program is free software; you can redistribute it and/or modify
3185- it under the terms of the GNU General Public License as published by
3186- the Free Software Foundation; either version 3, or (at your option)
3187- any later version.
3188+ This file is free software: you can redistribute it and/or modify
3189+ it under the terms of the GNU Lesser General Public License as
3190+ published by the Free Software Foundation; either version 2.1 of the
3191+ License, or (at your option) any later version.
3192
3193- This program is distributed in the hope that it will be useful,
3194+ This file is distributed in the hope that it will be useful,
3195 but WITHOUT ANY WARRANTY; without even the implied warranty of
3196 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3197- GNU General Public License for more details.
3198+ GNU Lesser General Public License for more details.
3199
3200- You should have received a copy of the GNU General Public License along
3201- with this program; if not, see <https://www.gnu.org/licenses/>. */
3202+ You should have received a copy of the GNU Lesser General Public License
3203+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
3204
3205 #include <config.h>
3206
3207--- a/gnulib/lib/itold.c
3208+++ b/gnulib/lib/itold.c
3209@@ -2,17 +2,17 @@
3210 Copyright (C) 2011-2021 Free Software Foundation, Inc.
3211 Written by Bruno Haible <bruno@clisp.org>, 2011.
3212
3213- This program is free software: you can redistribute it and/or modify
3214- it under the terms of the GNU General Public License as published by
3215- the Free Software Foundation; either version 3 of the License, or
3216- (at your option) any later version.
3217+ This file is free software: you can redistribute it and/or modify
3218+ it under the terms of the GNU Lesser General Public License as
3219+ published by the Free Software Foundation; either version 2.1 of the
3220+ License, or (at your option) any later version.
3221
3222- This program is distributed in the hope that it will be useful,
3223+ This file is distributed in the hope that it will be useful,
3224 but WITHOUT ANY WARRANTY; without even the implied warranty of
3225 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3226- GNU General Public License for more details.
3227+ GNU Lesser General Public License for more details.
3228
3229- You should have received a copy of the GNU General Public License
3230+ You should have received a copy of the GNU Lesser General Public License
3231 along with this program. If not, see <https://www.gnu.org/licenses/>. */
3232
3233 #include <config.h>
3234--- a/gnulib/lib/langinfo.in.h
3235+++ b/gnulib/lib/langinfo.in.h
3236@@ -1,18 +1,18 @@
3237 /* Substitute for and wrapper around <langinfo.h>.
3238 Copyright (C) 2009-2021 Free Software Foundation, Inc.
3239
3240- This program is free software; you can redistribute it and/or modify
3241- it under the terms of the GNU General Public License as published by
3242- the Free Software Foundation; either version 3, or (at your option)
3243- any later version.
3244+ This file is free software: you can redistribute it and/or modify
3245+ it under the terms of the GNU Lesser General Public License as
3246+ published by the Free Software Foundation; either version 2.1 of the
3247+ License, or (at your option) any later version.
3248
3249- This program is distributed in the hope that it will be useful,
3250+ This file is distributed in the hope that it will be useful,
3251 but WITHOUT ANY WARRANTY; without even the implied warranty of
3252 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3253- GNU General Public License for more details.
3254+ GNU Lesser General Public License for more details.
3255
3256- You should have received a copy of the GNU General Public License
3257- along with this program; if not, see <https://www.gnu.org/licenses/>. */
3258+ You should have received a copy of the GNU Lesser General Public License
3259+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
3260
3261 /*
3262 * POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
3263--- a/gnulib/lib/lc-charset-dispatch.c
3264+++ b/gnulib/lib/lc-charset-dispatch.c
3265@@ -1,17 +1,17 @@
3266 /* Dispatching based on the current locale's character encoding.
3267 Copyright (C) 2018-2021 Free Software Foundation, Inc.
3268
3269- This program is free software: you can redistribute it and/or modify
3270- it under the terms of the GNU General Public License as published by
3271- the Free Software Foundation; either version 3 of the License, or
3272- (at your option) any later version.
3273+ This file is free software: you can redistribute it and/or modify
3274+ it under the terms of the GNU Lesser General Public License as
3275+ published by the Free Software Foundation; either version 2.1 of the
3276+ License, or (at your option) any later version.
3277
3278- This program is distributed in the hope that it will be useful,
3279+ This file is distributed in the hope that it will be useful,
3280 but WITHOUT ANY WARRANTY; without even the implied warranty of
3281 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3282- GNU General Public License for more details.
3283+ GNU Lesser General Public License for more details.
3284
3285- You should have received a copy of the GNU General Public License
3286+ You should have received a copy of the GNU Lesser General Public License
3287 along with this program. If not, see <https://www.gnu.org/licenses/>. */
3288
3289 /* Written by Bruno Haible <bruno@clisp.org>, 2018. */
3290--- a/gnulib/lib/lc-charset-dispatch.h
3291+++ b/gnulib/lib/lc-charset-dispatch.h
3292@@ -1,17 +1,17 @@
3293 /* Dispatching based on the current locale's character encoding.
3294 Copyright (C) 2018-2021 Free Software Foundation, Inc.
3295
3296- This program is free software: you can redistribute it and/or modify
3297- it under the terms of the GNU General Public License as published by
3298- the Free Software Foundation; either version 3 of the License, or
3299- (at your option) any later version.
3300+ This file is free software: you can redistribute it and/or modify
3301+ it under the terms of the GNU Lesser General Public License as
3302+ published by the Free Software Foundation; either version 2.1 of the
3303+ License, or (at your option) any later version.
3304
3305- This program is distributed in the hope that it will be useful,
3306+ This file is distributed in the hope that it will be useful,
3307 but WITHOUT ANY WARRANTY; without even the implied warranty of
3308 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3309- GNU General Public License for more details.
3310+ GNU Lesser General Public License for more details.
3311
3312- You should have received a copy of the GNU General Public License
3313+ You should have received a copy of the GNU Lesser General Public License
3314 along with this program. If not, see <https://www.gnu.org/licenses/>. */
3315
3316 /* Written by Bruno Haible <bruno@clisp.org>, 2018. */
3317--- a/gnulib/lib/libc-config.h
3318+++ b/gnulib/lib/libc-config.h
3319@@ -3,16 +3,16 @@
3320 Copyright 2017-2021 Free Software Foundation, Inc.
3321
3322 This program is free software; you can redistribute it and/or
3323- modify it under the terms of the GNU General Public
3324+ modify it under the terms of the GNU Lesser General Public
3325 License as published by the Free Software Foundation; either
3326- version 3 of the License, or (at your option) any later version.
3327+ version 2.1 of the License, or (at your option) any later version.
3328
3329 This program is distributed in the hope that it will be useful,
3330 but WITHOUT ANY WARRANTY; without even the implied warranty of
3331 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3332- General Public License for more details.
3333+ Lesser General Public License for more details.
3334
3335- You should have received a copy of the GNU General Public
3336+ You should have received a copy of the GNU Lesser General Public
3337 License along with this program; if not, see
3338 <https://www.gnu.org/licenses/>. */
3339
3340@@ -28,7 +28,10 @@
3341
3342 When compiled as part of glibc this is a no-op; when compiled as
3343 part of Gnulib this includes Gnulib's <config.h> and defines macros
3344- that glibc library code would normally assume. */
3345+ that glibc library code would normally assume.
3346+
3347+ Note: This header file MUST NOT be included by public header files
3348+ of Gnulib. */
3349
3350 #include <config.h>
3351
3352@@ -71,7 +74,7 @@
3353 # endif
3354 #endif
3355
3356-#ifndef __attribute_maybe_unused__
3357+#ifndef __attribute_nonnull__
3358 /* <sys/cdefs.h> either does not exist, or is too old for Gnulib.
3359 Prepare to include <cdefs.h>, which is Gnulib's version of a
3360 more-recent glibc <sys/cdefs.h>. */
3361@@ -80,13 +83,9 @@
3362 # ifndef _FEATURES_H
3363 # define _FEATURES_H 1
3364 # endif
3365-/* Define __WORDSIZE so that <cdefs.h> does not attempt to include
3366- nonexistent files. Make it a syntax error, since Gnulib does not
3367- use __WORDSIZE now, and if Gnulib uses it later the syntax error
3368- will let us know that __WORDSIZE needs configuring. */
3369-# ifndef __WORDSIZE
3370-# define __WORDSIZE %%%
3371-# endif
3372+/* Define __GNULIB_CDEFS so that <cdefs.h> does not attempt to include
3373+ nonexistent files. */
3374+# define __GNULIB_CDEFS
3375 /* Undef the macros unconditionally defined by our copy of glibc
3376 <sys/cdefs.h>, so that they do not clash with any system-defined
3377 versions. */
3378--- a/gnulib/lib/limits.in.h
3379+++ b/gnulib/lib/limits.in.h
3380@@ -2,18 +2,18 @@
3381
3382 Copyright 2016-2021 Free Software Foundation, Inc.
3383
3384- This program is free software; you can redistribute it and/or
3385- modify it under the terms of the GNU General Public License
3386- as published by the Free Software Foundation; either version 3, or
3387- (at your option) any later version.
3388+ This file is free software: you can redistribute it and/or modify
3389+ it under the terms of the GNU Lesser General Public License as
3390+ published by the Free Software Foundation; either version 2.1 of the
3391+ License, or (at your option) any later version.
3392
3393- This program is distributed in the hope that it will be useful,
3394+ This file is distributed in the hope that it will be useful,
3395 but WITHOUT ANY WARRANTY; without even the implied warranty of
3396 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3397- GNU General Public License for more details.
3398+ GNU Lesser General Public License for more details.
3399
3400- You should have received a copy of the GNU General Public License
3401- along with this program; if not, see <https://www.gnu.org/licenses/>. */
3402+ You should have received a copy of the GNU Lesser General Public License
3403+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
3404
3405 #if __GNUC__ >= 3
3406 @PRAGMA_SYSTEM_HEADER@
3407--- a/gnulib/lib/localcharset.c
3408+++ b/gnulib/lib/localcharset.c
3409@@ -2,18 +2,18 @@
3410
3411 Copyright (C) 2000-2006, 2008-2021 Free Software Foundation, Inc.
3412
3413- This program is free software; you can redistribute it and/or modify
3414- it under the terms of the GNU General Public License as published by
3415- the Free Software Foundation; either version 3, or (at your option)
3416- any later version.
3417+ This file is free software: you can redistribute it and/or modify
3418+ it under the terms of the GNU Lesser General Public License as
3419+ published by the Free Software Foundation; either version 2.1 of the
3420+ License, or (at your option) any later version.
3421
3422- This program is distributed in the hope that it will be useful,
3423+ This file is distributed in the hope that it will be useful,
3424 but WITHOUT ANY WARRANTY; without even the implied warranty of
3425 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3426- GNU General Public License for more details.
3427+ GNU Lesser General Public License for more details.
3428
3429- You should have received a copy of the GNU General Public License along
3430- with this program; if not, see <https://www.gnu.org/licenses/>. */
3431+ You should have received a copy of the GNU Lesser General Public License
3432+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
3433
3434 /* Written by Bruno Haible <bruno@clisp.org>. */
3435
3436--- a/gnulib/lib/localcharset.h
3437+++ b/gnulib/lib/localcharset.h
3438@@ -2,18 +2,18 @@
3439 Copyright (C) 2000-2003, 2009-2021 Free Software Foundation, Inc.
3440 This file is part of the GNU CHARSET Library.
3441
3442- This program is free software; you can redistribute it and/or modify
3443- it under the terms of the GNU General Public License as published by
3444- the Free Software Foundation; either version 3, or (at your option)
3445- any later version.
3446+ This file is free software: you can redistribute it and/or modify
3447+ it under the terms of the GNU Lesser General Public License as
3448+ published by the Free Software Foundation; either version 2.1 of the
3449+ License, or (at your option) any later version.
3450
3451- This program is distributed in the hope that it will be useful,
3452+ This file is distributed in the hope that it will be useful,
3453 but WITHOUT ANY WARRANTY; without even the implied warranty of
3454 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3455- GNU General Public License for more details.
3456+ GNU Lesser General Public License for more details.
3457
3458- You should have received a copy of the GNU General Public License along
3459- with this program; if not, see <https://www.gnu.org/licenses/>. */
3460+ You should have received a copy of the GNU Lesser General Public License
3461+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
3462
3463 #ifndef _LOCALCHARSET_H
3464 #define _LOCALCHARSET_H
3465--- a/gnulib/lib/locale.in.h
3466+++ b/gnulib/lib/locale.in.h
3467@@ -1,17 +1,17 @@
3468 /* A POSIX <locale.h>.
3469 Copyright (C) 2007-2021 Free Software Foundation, Inc.
3470
3471- This program is free software: you can redistribute it and/or modify
3472- it under the terms of the GNU General Public License as published by
3473- the Free Software Foundation; either version 3 of the License, or
3474- (at your option) any later version.
3475+ This file is free software: you can redistribute it and/or modify
3476+ it under the terms of the GNU Lesser General Public License as
3477+ published by the Free Software Foundation; either version 2.1 of the
3478+ License, or (at your option) any later version.
3479
3480- This program is distributed in the hope that it will be useful,
3481+ This file is distributed in the hope that it will be useful,
3482 but WITHOUT ANY WARRANTY; without even the implied warranty of
3483 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3484- GNU General Public License for more details.
3485+ GNU Lesser General Public License for more details.
3486
3487- You should have received a copy of the GNU General Public License
3488+ You should have received a copy of the GNU Lesser General Public License
3489 along with this program. If not, see <https://www.gnu.org/licenses/>. */
3490
3491 #if __GNUC__ >= 3
3492--- a/gnulib/lib/localeconv.c
3493+++ b/gnulib/lib/localeconv.c
3494@@ -1,17 +1,17 @@
3495 /* Query locale dependent information for formatting numbers.
3496 Copyright (C) 2012-2021 Free Software Foundation, Inc.
3497
3498- This program is free software: you can redistribute it and/or modify
3499- it under the terms of the GNU General Public License as published by
3500- the Free Software Foundation; either version 3 of the License, or
3501- (at your option) any later version.
3502+ This file is free software: you can redistribute it and/or modify
3503+ it under the terms of the GNU Lesser General Public License as
3504+ published by the Free Software Foundation; either version 2.1 of the
3505+ License, or (at your option) any later version.
3506
3507- This program is distributed in the hope that it will be useful,
3508+ This file is distributed in the hope that it will be useful,
3509 but WITHOUT ANY WARRANTY; without even the implied warranty of
3510 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3511- GNU General Public License for more details.
3512+ GNU Lesser General Public License for more details.
3513
3514- You should have received a copy of the GNU General Public License
3515+ You should have received a copy of the GNU Lesser General Public License
3516 along with this program. If not, see <https://www.gnu.org/licenses/>. */
3517
3518 #include <config.h>
3519--- a/gnulib/lib/malloc.c
3520+++ b/gnulib/lib/malloc.c
3521@@ -2,61 +2,50 @@
3522
3523 Copyright (C) 1997-1998, 2006-2007, 2009-2021 Free Software Foundation, Inc.
3524
3525- This program is free software; you can redistribute it and/or modify
3526- it under the terms of the GNU General Public License as published by
3527- the Free Software Foundation; either version 3, or (at your option)
3528- any later version.
3529+ This file is free software: you can redistribute it and/or modify
3530+ it under the terms of the GNU Lesser General Public License as
3531+ published by the Free Software Foundation; either version 2.1 of the
3532+ License, or (at your option) any later version.
3533
3534- This program is distributed in the hope that it will be useful,
3535+ This file is distributed in the hope that it will be useful,
3536 but WITHOUT ANY WARRANTY; without even the implied warranty of
3537 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3538- GNU General Public License for more details.
3539+ GNU Lesser General Public License for more details.
3540
3541- You should have received a copy of the GNU General Public License
3542- along with this program; if not, see <https://www.gnu.org/licenses/>. */
3543+ You should have received a copy of the GNU Lesser General Public License
3544+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
3545
3546 /* written by Jim Meyering and Bruno Haible */
3547
3548 #define _GL_USE_STDLIB_ALLOC 1
3549 #include <config.h>
3550-/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
3551-#ifdef malloc
3552-# define NEED_MALLOC_GNU 1
3553-# undef malloc
3554-/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */
3555-#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU
3556-# define NEED_MALLOC_GNU 1
3557-#endif
3558
3559 #include <stdlib.h>
3560
3561-/* A function definition is only needed if NEED_MALLOC_GNU is defined above
3562- or if the module 'malloc-posix' requests it. */
3563-#if NEED_MALLOC_GNU || (GNULIB_MALLOC_POSIX && !HAVE_MALLOC_POSIX)
3564+#include <errno.h>
3565
3566-# include <errno.h>
3567+#include "xalloc-oversized.h"
3568
3569-/* Allocate an N-byte block of memory from the heap.
3570- If N is zero, allocate a 1-byte block. */
3571+/* Allocate an N-byte block of memory from the heap, even if N is 0. */
3572
3573 void *
3574 rpl_malloc (size_t n)
3575 {
3576- void *result;
3577-
3578-# if NEED_MALLOC_GNU
3579 if (n == 0)
3580 n = 1;
3581-# endif
3582
3583- result = malloc (n);
3584+ if (xalloc_oversized (n, 1))
3585+ {
3586+ errno = ENOMEM;
3587+ return NULL;
3588+ }
3589+
3590+ void *result = malloc (n);
3591
3592-# if !HAVE_MALLOC_POSIX
3593+#if !HAVE_MALLOC_POSIX
3594 if (result == NULL)
3595 errno = ENOMEM;
3596-# endif
3597+#endif
3598
3599 return result;
3600 }
3601-
3602-#endif
3603--- a/gnulib/lib/malloc/dynarray-skeleton.c
3604+++ b/gnulib/lib/malloc/dynarray-skeleton.c
3605@@ -3,16 +3,16 @@
3606 This file is part of the GNU C Library.
3607
3608 The GNU C Library is free software; you can redistribute it and/or
3609- modify it under the terms of the GNU General Public
3610+ modify it under the terms of the GNU Lesser General Public
3611 License as published by the Free Software Foundation; either
3612- version 3 of the License, or (at your option) any later version.
3613+ version 2.1 of the License, or (at your option) any later version.
3614
3615 The GNU C Library is distributed in the hope that it will be useful,
3616 but WITHOUT ANY WARRANTY; without even the implied warranty of
3617 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3618- General Public License for more details.
3619+ Lesser General Public License for more details.
3620
3621- You should have received a copy of the GNU General Public
3622+ You should have received a copy of the GNU Lesser General Public
3623 License along with the GNU C Library; if not, see
3624 <https://www.gnu.org/licenses/>. */
3625
3626--- a/gnulib/lib/malloc/dynarray.h
3627+++ b/gnulib/lib/malloc/dynarray.h
3628@@ -3,16 +3,16 @@
3629 This file is part of the GNU C Library.
3630
3631 The GNU C Library is free software; you can redistribute it and/or
3632- modify it under the terms of the GNU General Public
3633+ modify it under the terms of the GNU Lesser General Public
3634 License as published by the Free Software Foundation; either
3635- version 3 of the License, or (at your option) any later version.
3636+ version 2.1 of the License, or (at your option) any later version.
3637
3638 The GNU C Library is distributed in the hope that it will be useful,
3639 but WITHOUT ANY WARRANTY; without even the implied warranty of
3640 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3641- General Public License for more details.
3642+ Lesser General Public License for more details.
3643
3644- You should have received a copy of the GNU General Public
3645+ You should have received a copy of the GNU Lesser General Public
3646 License along with the GNU C Library; if not, see
3647 <https://www.gnu.org/licenses/>. */
3648
3649--- a/gnulib/lib/malloc/dynarray_at_failure.c
3650+++ b/gnulib/lib/malloc/dynarray_at_failure.c
3651@@ -3,16 +3,16 @@
3652 This file is part of the GNU C Library.
3653
3654 The GNU C Library is free software; you can redistribute it and/or
3655- modify it under the terms of the GNU General Public
3656+ modify it under the terms of the GNU Lesser General Public
3657 License as published by the Free Software Foundation; either
3658- version 3 of the License, or (at your option) any later version.
3659+ version 2.1 of the License, or (at your option) any later version.
3660
3661 The GNU C Library is distributed in the hope that it will be useful,
3662 but WITHOUT ANY WARRANTY; without even the implied warranty of
3663 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3664- General Public License for more details.
3665+ Lesser General Public License for more details.
3666
3667- You should have received a copy of the GNU General Public
3668+ You should have received a copy of the GNU Lesser General Public
3669 License along with the GNU C Library; if not, see
3670 <https://www.gnu.org/licenses/>. */
3671
3672--- a/gnulib/lib/malloc/dynarray_emplace_enlarge.c
3673+++ b/gnulib/lib/malloc/dynarray_emplace_enlarge.c
3674@@ -3,16 +3,16 @@
3675 This file is part of the GNU C Library.
3676
3677 The GNU C Library is free software; you can redistribute it and/or
3678- modify it under the terms of the GNU General Public
3679+ modify it under the terms of the GNU Lesser General Public
3680 License as published by the Free Software Foundation; either
3681- version 3 of the License, or (at your option) any later version.
3682+ version 2.1 of the License, or (at your option) any later version.
3683
3684 The GNU C Library is distributed in the hope that it will be useful,
3685 but WITHOUT ANY WARRANTY; without even the implied warranty of
3686 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3687- General Public License for more details.
3688+ Lesser General Public License for more details.
3689
3690- You should have received a copy of the GNU General Public
3691+ You should have received a copy of the GNU Lesser General Public
3692 License along with the GNU C Library; if not, see
3693 <https://www.gnu.org/licenses/>. */
3694
3695--- a/gnulib/lib/malloc/dynarray_finalize.c
3696+++ b/gnulib/lib/malloc/dynarray_finalize.c
3697@@ -3,16 +3,16 @@
3698 This file is part of the GNU C Library.
3699
3700 The GNU C Library is free software; you can redistribute it and/or
3701- modify it under the terms of the GNU General Public
3702+ modify it under the terms of the GNU Lesser General Public
3703 License as published by the Free Software Foundation; either
3704- version 3 of the License, or (at your option) any later version.
3705+ version 2.1 of the License, or (at your option) any later version.
3706
3707 The GNU C Library is distributed in the hope that it will be useful,
3708 but WITHOUT ANY WARRANTY; without even the implied warranty of
3709 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3710- General Public License for more details.
3711+ Lesser General Public License for more details.
3712
3713- You should have received a copy of the GNU General Public
3714+ You should have received a copy of the GNU Lesser General Public
3715 License along with the GNU C Library; if not, see
3716 <https://www.gnu.org/licenses/>. */
3717
3718--- a/gnulib/lib/malloc/dynarray_resize.c
3719+++ b/gnulib/lib/malloc/dynarray_resize.c
3720@@ -3,16 +3,16 @@
3721 This file is part of the GNU C Library.
3722
3723 The GNU C Library is free software; you can redistribute it and/or
3724- modify it under the terms of the GNU General Public
3725+ modify it under the terms of the GNU Lesser General Public
3726 License as published by the Free Software Foundation; either
3727- version 3 of the License, or (at your option) any later version.
3728+ version 2.1 of the License, or (at your option) any later version.
3729
3730 The GNU C Library is distributed in the hope that it will be useful,
3731 but WITHOUT ANY WARRANTY; without even the implied warranty of
3732 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3733- General Public License for more details.
3734+ Lesser General Public License for more details.
3735
3736- You should have received a copy of the GNU General Public
3737+ You should have received a copy of the GNU Lesser General Public
3738 License along with the GNU C Library; if not, see
3739 <https://www.gnu.org/licenses/>. */
3740
3741--- a/gnulib/lib/malloc/dynarray_resize_clear.c
3742+++ b/gnulib/lib/malloc/dynarray_resize_clear.c
3743@@ -3,16 +3,16 @@
3744 This file is part of the GNU C Library.
3745
3746 The GNU C Library is free software; you can redistribute it and/or
3747- modify it under the terms of the GNU General Public
3748+ modify it under the terms of the GNU Lesser General Public
3749 License as published by the Free Software Foundation; either
3750- version 3 of the License, or (at your option) any later version.
3751+ version 2.1 of the License, or (at your option) any later version.
3752
3753 The GNU C Library is distributed in the hope that it will be useful,
3754 but WITHOUT ANY WARRANTY; without even the implied warranty of
3755 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3756- General Public License for more details.
3757+ Lesser General Public License for more details.
3758
3759- You should have received a copy of the GNU General Public
3760+ You should have received a copy of the GNU Lesser General Public
3761 License along with the GNU C Library; if not, see
3762 <https://www.gnu.org/licenses/>. */
3763
3764--- a/gnulib/lib/malloca.c
3765+++ b/gnulib/lib/malloca.c
3766@@ -2,18 +2,18 @@
3767 Copyright (C) 2003, 2006-2007, 2009-2021 Free Software Foundation, Inc.
3768 Written by Bruno Haible <bruno@clisp.org>, 2003, 2018.
3769
3770- This program is free software; you can redistribute it and/or modify
3771- it under the terms of the GNU General Public License as published by
3772- the Free Software Foundation; either version 3, or (at your option)
3773- any later version.
3774+ This file is free software: you can redistribute it and/or modify
3775+ it under the terms of the GNU Lesser General Public License as
3776+ published by the Free Software Foundation; either version 2.1 of the
3777+ License, or (at your option) any later version.
3778
3779- This program is distributed in the hope that it will be useful,
3780+ This file is distributed in the hope that it will be useful,
3781 but WITHOUT ANY WARRANTY; without even the implied warranty of
3782 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3783- GNU General Public License for more details.
3784+ GNU Lesser General Public License for more details.
3785
3786- You should have received a copy of the GNU General Public License
3787- along with this program; if not, see <https://www.gnu.org/licenses/>. */
3788+ You should have received a copy of the GNU Lesser General Public License
3789+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
3790
3791 #define _GL_USE_STDLIB_ALLOC 1
3792 #include <config.h>
3793@@ -21,6 +21,8 @@
3794 /* Specification. */
3795 #include "malloca.h"
3796
3797+#include "idx.h"
3798+#include "intprops.h"
3799 #include "verify.h"
3800
3801 /* The speed critical point in this file is freea() applied to an alloca()
3802@@ -45,9 +47,9 @@ mmalloca (size_t n)
3803 #if HAVE_ALLOCA
3804 /* Allocate one more word, used to determine the address to pass to freea(),
3805 and room for the alignment ≡ sa_alignment_max mod 2*sa_alignment_max. */
3806- size_t nplus = n + sizeof (small_t) + 2 * sa_alignment_max - 1;
3807-
3808- if (nplus >= n)
3809+ int plus = sizeof (small_t) + 2 * sa_alignment_max - 1;
3810+ idx_t nplus;
3811+ if (!INT_ADD_WRAPV (n, plus, &nplus) && !xalloc_oversized (nplus, 1))
3812 {
3813 char *mem = (char *) malloc (nplus);
3814
3815--- a/gnulib/lib/malloca.h
3816+++ b/gnulib/lib/malloca.h
3817@@ -2,18 +2,18 @@
3818 Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc.
3819 Written by Bruno Haible <bruno@clisp.org>, 2003.
3820
3821- This program is free software; you can redistribute it and/or modify
3822- it under the terms of the GNU General Public License as published by
3823- the Free Software Foundation; either version 3, or (at your option)
3824- any later version.
3825+ This file is free software: you can redistribute it and/or modify
3826+ it under the terms of the GNU Lesser General Public License as
3827+ published by the Free Software Foundation; either version 2.1 of the
3828+ License, or (at your option) any later version.
3829
3830- This program is distributed in the hope that it will be useful,
3831+ This file is distributed in the hope that it will be useful,
3832 but WITHOUT ANY WARRANTY; without even the implied warranty of
3833 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3834- GNU General Public License for more details.
3835+ GNU Lesser General Public License for more details.
3836
3837- You should have received a copy of the GNU General Public License
3838- along with this program; if not, see <https://www.gnu.org/licenses/>. */
3839+ You should have received a copy of the GNU Lesser General Public License
3840+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
3841
3842 #ifndef _MALLOCA_H
3843 #define _MALLOCA_H
3844@@ -76,9 +76,10 @@ extern void freea (void *p);
3845
3846 /* nmalloca(N,S) is an overflow-safe variant of malloca (N * S).
3847 It allocates an array of N objects, each with S bytes of memory,
3848- on the stack. S must be positive and N must be nonnegative.
3849+ on the stack. N and S should be nonnegative and free of side effects.
3850 The array must be freed using freea() before the function returns. */
3851-#define nmalloca(n, s) (xalloc_oversized (n, s) ? NULL : malloca ((n) * (s)))
3852+#define nmalloca(n, s) \
3853+ (xalloc_oversized (n, s) ? NULL : malloca ((n) * (size_t) (s)))
3854
3855
3856 #ifdef __cplusplus
3857--- a/gnulib/lib/mbchar.c
3858+++ b/gnulib/lib/mbchar.c
3859@@ -1,16 +1,16 @@
3860 /* Copyright (C) 2001, 2006, 2009-2021 Free Software Foundation, Inc.
3861
3862- This program is free software: you can redistribute it and/or modify
3863- it under the terms of the GNU General Public License as published by
3864- the Free Software Foundation; either version 3 of the License, or
3865- (at your option) any later version.
3866+ This file is free software: you can redistribute it and/or modify
3867+ it under the terms of the GNU Lesser General Public License as
3868+ published by the Free Software Foundation; either version 2.1 of the
3869+ License, or (at your option) any later version.
3870
3871- This program is distributed in the hope that it will be useful,
3872+ This file is distributed in the hope that it will be useful,
3873 but WITHOUT ANY WARRANTY; without even the implied warranty of
3874 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3875- GNU General Public License for more details.
3876+ GNU Lesser General Public License for more details.
3877
3878- You should have received a copy of the GNU General Public License
3879+ You should have received a copy of the GNU Lesser General Public License
3880 along with this program. If not, see <https://www.gnu.org/licenses/>. */
3881
3882
3883--- a/gnulib/lib/mbchar.h
3884+++ b/gnulib/lib/mbchar.h
3885@@ -1,17 +1,17 @@
3886 /* Multibyte character data type.
3887 Copyright (C) 2001, 2005-2007, 2009-2021 Free Software Foundation, Inc.
3888
3889- This program is free software: you can redistribute it and/or modify
3890- it under the terms of the GNU General Public License as published by
3891- the Free Software Foundation; either version 3 of the License, or
3892- (at your option) any later version.
3893+ This file is free software: you can redistribute it and/or modify
3894+ it under the terms of the GNU Lesser General Public License as
3895+ published by the Free Software Foundation; either version 2.1 of the
3896+ License, or (at your option) any later version.
3897
3898- This program is distributed in the hope that it will be useful,
3899+ This file is distributed in the hope that it will be useful,
3900 but WITHOUT ANY WARRANTY; without even the implied warranty of
3901 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3902- GNU General Public License for more details.
3903+ GNU Lesser General Public License for more details.
3904
3905- You should have received a copy of the GNU General Public License
3906+ You should have received a copy of the GNU Lesser General Public License
3907 along with this program. If not, see <https://www.gnu.org/licenses/>. */
3908
3909 /* Written by Bruno Haible <bruno@clisp.org>. */
3910--- a/gnulib/lib/mbiter.c
3911+++ b/gnulib/lib/mbiter.c
3912@@ -1,3 +1,21 @@
3913+/* Iterating through multibyte strings: macros for multi-byte encodings.
3914+
3915+ Copyright (C) 2012-2021 Free Software Foundation, Inc.
3916+
3917+ This file is free software: you can redistribute it and/or modify
3918+ it under the terms of the GNU Lesser General Public License as
3919+ published by the Free Software Foundation; either version 2.1 of the
3920+ License, or (at your option) any later version.
3921+
3922+ This file is distributed in the hope that it will be useful,
3923+ but WITHOUT ANY WARRANTY; without even the implied warranty of
3924+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3925+ GNU Lesser General Public License for more details.
3926+
3927+ You should have received a copy of the GNU Lesser General Public License
3928+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
3929+
3930 #include <config.h>
3931+
3932 #define MBITER_INLINE _GL_EXTERN_INLINE
3933 #include "mbiter.h"
3934--- a/gnulib/lib/mbiter.h
3935+++ b/gnulib/lib/mbiter.h
3936@@ -1,17 +1,17 @@
3937 /* Iterating through multibyte strings: macros for multi-byte encodings.
3938 Copyright (C) 2001, 2005, 2007, 2009-2021 Free Software Foundation, Inc.
3939
3940- This program is free software: you can redistribute it and/or modify
3941- it under the terms of the GNU General Public License as published by
3942- the Free Software Foundation; either version 3 of the License, or
3943- (at your option) any later version.
3944+ This file is free software: you can redistribute it and/or modify
3945+ it under the terms of the GNU Lesser General Public License as
3946+ published by the Free Software Foundation; either version 2.1 of the
3947+ License, or (at your option) any later version.
3948
3949- This program is distributed in the hope that it will be useful,
3950+ This file is distributed in the hope that it will be useful,
3951 but WITHOUT ANY WARRANTY; without even the implied warranty of
3952 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3953- GNU General Public License for more details.
3954+ GNU Lesser General Public License for more details.
3955
3956- You should have received a copy of the GNU General Public License
3957+ You should have received a copy of the GNU Lesser General Public License
3958 along with this program. If not, see <https://www.gnu.org/licenses/>. */
3959
3960 /* Written by Bruno Haible <bruno@clisp.org>. */
3961--- a/gnulib/lib/mbrtowc-impl-utf8.h
3962+++ b/gnulib/lib/mbrtowc-impl-utf8.h
3963@@ -1,17 +1,17 @@
3964 /* Convert multibyte character to wide character.
3965 Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc.
3966
3967- This program is free software: you can redistribute it and/or modify
3968- it under the terms of the GNU General Public License as published by
3969- the Free Software Foundation; either version 3 of the License, or
3970- (at your option) any later version.
3971+ This file is free software: you can redistribute it and/or modify
3972+ it under the terms of the GNU Lesser General Public License as
3973+ published by the Free Software Foundation; either version 2.1 of the
3974+ License, or (at your option) any later version.
3975
3976- This program is distributed in the hope that it will be useful,
3977+ This file is distributed in the hope that it will be useful,
3978 but WITHOUT ANY WARRANTY; without even the implied warranty of
3979 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3980- GNU General Public License for more details.
3981+ GNU Lesser General Public License for more details.
3982
3983- You should have received a copy of the GNU General Public License
3984+ You should have received a copy of the GNU Lesser General Public License
3985 along with this program. If not, see <https://www.gnu.org/licenses/>. */
3986
3987 /* Written by Bruno Haible <bruno@clisp.org>, 2008. */
3988@@ -96,7 +96,7 @@
3989
3990 if ((c2 ^ 0x80) < 0x40
3991 && (c >= 0xf1 || c2 >= 0x90)
3992- && (c < 0xf4 || (c == 0xf4 && c2 < 0x90)))
3993+ && (c < 0xf4 || (/* c == 0xf4 && */ c2 < 0x90)))
3994 {
3995 if (m == 2)
3996 goto incomplete;
3997--- a/gnulib/lib/mbrtowc-impl.h
3998+++ b/gnulib/lib/mbrtowc-impl.h
3999@@ -1,17 +1,17 @@
4000 /* Convert multibyte character to wide character.
4001 Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc.
4002
4003- This program is free software: you can redistribute it and/or modify
4004- it under the terms of the GNU General Public License as published by
4005- the Free Software Foundation; either version 3 of the License, or
4006- (at your option) any later version.
4007+ This file is free software: you can redistribute it and/or modify
4008+ it under the terms of the GNU Lesser General Public License as
4009+ published by the Free Software Foundation; either version 2.1 of the
4010+ License, or (at your option) any later version.
4011
4012- This program is distributed in the hope that it will be useful,
4013+ This file is distributed in the hope that it will be useful,
4014 but WITHOUT ANY WARRANTY; without even the implied warranty of
4015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4016- GNU General Public License for more details.
4017+ GNU Lesser General Public License for more details.
4018
4019- You should have received a copy of the GNU General Public License
4020+ You should have received a copy of the GNU Lesser General Public License
4021 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4022
4023 /* Written by Bruno Haible <bruno@clisp.org>, 2008. */
4024--- a/gnulib/lib/mbrtowc.c
4025+++ b/gnulib/lib/mbrtowc.c
4026@@ -2,17 +2,17 @@
4027 Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc.
4028 Written by Bruno Haible <bruno@clisp.org>, 2008.
4029
4030- This program is free software: you can redistribute it and/or modify
4031- it under the terms of the GNU General Public License as published by
4032- the Free Software Foundation; either version 3 of the License, or
4033- (at your option) any later version.
4034+ This file is free software: you can redistribute it and/or modify
4035+ it under the terms of the GNU Lesser General Public License as
4036+ published by the Free Software Foundation; either version 2.1 of the
4037+ License, or (at your option) any later version.
4038
4039- This program is distributed in the hope that it will be useful,
4040+ This file is distributed in the hope that it will be useful,
4041 but WITHOUT ANY WARRANTY; without even the implied warranty of
4042 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4043- GNU General Public License for more details.
4044+ GNU Lesser General Public License for more details.
4045
4046- You should have received a copy of the GNU General Public License
4047+ You should have received a copy of the GNU Lesser General Public License
4048 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4049
4050 #include <config.h>
4051--- a/gnulib/lib/mbscasecmp.c
4052+++ b/gnulib/lib/mbscasecmp.c
4053@@ -3,17 +3,17 @@
4054 Written by Bruno Haible <bruno@clisp.org>, 2005,
4055 based on earlier glibc code.
4056
4057- This program is free software: you can redistribute it and/or modify
4058- it under the terms of the GNU General Public License as published by
4059- the Free Software Foundation; either version 3 of the License, or
4060- (at your option) any later version.
4061+ This file is free software: you can redistribute it and/or modify
4062+ it under the terms of the GNU Lesser General Public License as
4063+ published by the Free Software Foundation; either version 3 of the
4064+ License, or (at your option) any later version.
4065
4066- This program is distributed in the hope that it will be useful,
4067+ This file is distributed in the hope that it will be useful,
4068 but WITHOUT ANY WARRANTY; without even the implied warranty of
4069 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4070- GNU General Public License for more details.
4071+ GNU Lesser General Public License for more details.
4072
4073- You should have received a copy of the GNU General Public License
4074+ You should have received a copy of the GNU Lesser General Public License
4075 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4076
4077 #include <config.h>
4078--- a/gnulib/lib/mbschr.c
4079+++ b/gnulib/lib/mbschr.c
4080@@ -2,17 +2,17 @@
4081 Copyright (C) 2007-2021 Free Software Foundation, Inc.
4082 Written by Bruno Haible <bruno@clisp.org>, 2007.
4083
4084- This program is free software: you can redistribute it and/or modify
4085- it under the terms of the GNU General Public License as published by
4086- the Free Software Foundation; either version 3 of the License, or
4087- (at your option) any later version.
4088+ This file is free software: you can redistribute it and/or modify
4089+ it under the terms of the GNU Lesser General Public License as
4090+ published by the Free Software Foundation; either version 3 of the
4091+ License, or (at your option) any later version.
4092
4093- This program is distributed in the hope that it will be useful,
4094+ This file is distributed in the hope that it will be useful,
4095 but WITHOUT ANY WARRANTY; without even the implied warranty of
4096 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4097- GNU General Public License for more details.
4098+ GNU Lesser General Public License for more details.
4099
4100- You should have received a copy of the GNU General Public License
4101+ You should have received a copy of the GNU Lesser General Public License
4102 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4103
4104 #include <config.h>
4105--- a/gnulib/lib/mbsinit.c
4106+++ b/gnulib/lib/mbsinit.c
4107@@ -2,17 +2,17 @@
4108 Copyright (C) 2008-2021 Free Software Foundation, Inc.
4109 Written by Bruno Haible <bruno@clisp.org>, 2008.
4110
4111- This program is free software: you can redistribute it and/or modify
4112- it under the terms of the GNU General Public License as published by
4113- the Free Software Foundation; either version 3 of the License, or
4114- (at your option) any later version.
4115+ This file is free software: you can redistribute it and/or modify
4116+ it under the terms of the GNU Lesser General Public License as
4117+ published by the Free Software Foundation; either version 2.1 of the
4118+ License, or (at your option) any later version.
4119
4120- This program is distributed in the hope that it will be useful,
4121+ This file is distributed in the hope that it will be useful,
4122 but WITHOUT ANY WARRANTY; without even the implied warranty of
4123 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4124- GNU General Public License for more details.
4125+ GNU Lesser General Public License for more details.
4126
4127- You should have received a copy of the GNU General Public License
4128+ You should have received a copy of the GNU Lesser General Public License
4129 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4130
4131 #include <config.h>
4132--- a/gnulib/lib/mbslen.c
4133+++ b/gnulib/lib/mbslen.c
4134@@ -2,17 +2,17 @@
4135 Copyright (C) 2007-2021 Free Software Foundation, Inc.
4136 Written by Bruno Haible <bruno@clisp.org>, 2007.
4137
4138- This program is free software: you can redistribute it and/or modify
4139- it under the terms of the GNU General Public License as published by
4140- the Free Software Foundation; either version 3 of the License, or
4141- (at your option) any later version.
4142+ This file is free software: you can redistribute it and/or modify
4143+ it under the terms of the GNU Lesser General Public License as
4144+ published by the Free Software Foundation; either version 3 of the
4145+ License, or (at your option) any later version.
4146
4147- This program is distributed in the hope that it will be useful,
4148+ This file is distributed in the hope that it will be useful,
4149 but WITHOUT ANY WARRANTY; without even the implied warranty of
4150 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4151- GNU General Public License for more details.
4152+ GNU Lesser General Public License for more details.
4153
4154- You should have received a copy of the GNU General Public License
4155+ You should have received a copy of the GNU Lesser General Public License
4156 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4157
4158 #include <config.h>
4159--- a/gnulib/lib/mbsncasecmp.c
4160+++ b/gnulib/lib/mbsncasecmp.c
4161@@ -3,17 +3,17 @@
4162 Written by Bruno Haible <bruno@clisp.org>, 2005,
4163 based on earlier glibc code.
4164
4165- This program is free software: you can redistribute it and/or modify
4166- it under the terms of the GNU General Public License as published by
4167- the Free Software Foundation; either version 3 of the License, or
4168- (at your option) any later version.
4169+ This file is free software: you can redistribute it and/or modify
4170+ it under the terms of the GNU Lesser General Public License as
4171+ published by the Free Software Foundation; either version 3 of the
4172+ License, or (at your option) any later version.
4173
4174- This program is distributed in the hope that it will be useful,
4175+ This file is distributed in the hope that it will be useful,
4176 but WITHOUT ANY WARRANTY; without even the implied warranty of
4177 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4178- GNU General Public License for more details.
4179+ GNU Lesser General Public License for more details.
4180
4181- You should have received a copy of the GNU General Public License
4182+ You should have received a copy of the GNU Lesser General Public License
4183 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4184
4185 #include <config.h>
4186--- a/gnulib/lib/mbsstr.c
4187+++ b/gnulib/lib/mbsstr.c
4188@@ -2,17 +2,17 @@
4189 Copyright (C) 2005-2021 Free Software Foundation, Inc.
4190 Written by Bruno Haible <bruno@clisp.org>, 2005.
4191
4192- This program is free software: you can redistribute it and/or modify
4193- it under the terms of the GNU General Public License as published by
4194- the Free Software Foundation; either version 3 of the License, or
4195- (at your option) any later version.
4196+ This file is free software: you can redistribute it and/or modify
4197+ it under the terms of the GNU Lesser General Public License as
4198+ published by the Free Software Foundation; either version 3 of the
4199+ License, or (at your option) any later version.
4200
4201- This program is distributed in the hope that it will be useful,
4202+ This file is distributed in the hope that it will be useful,
4203 but WITHOUT ANY WARRANTY; without even the implied warranty of
4204 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4205- GNU General Public License for more details.
4206+ GNU Lesser General Public License for more details.
4207
4208- You should have received a copy of the GNU General Public License
4209+ You should have received a copy of the GNU Lesser General Public License
4210 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4211
4212 #include <config.h>
4213--- a/gnulib/lib/mbtowc-impl.h
4214+++ b/gnulib/lib/mbtowc-impl.h
4215@@ -2,17 +2,17 @@
4216 Copyright (C) 2011-2021 Free Software Foundation, Inc.
4217 Written by Bruno Haible <bruno@clisp.org>, 2011.
4218
4219- This program is free software: you can redistribute it and/or modify
4220- it under the terms of the GNU General Public License as published by
4221- the Free Software Foundation; either version 3 of the License, or
4222- (at your option) any later version.
4223+ This file is free software: you can redistribute it and/or modify
4224+ it under the terms of the GNU Lesser General Public License as
4225+ published by the Free Software Foundation; either version 2.1 of the
4226+ License, or (at your option) any later version.
4227
4228- This program is distributed in the hope that it will be useful,
4229+ This file is distributed in the hope that it will be useful,
4230 but WITHOUT ANY WARRANTY; without even the implied warranty of
4231 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4232- GNU General Public License for more details.
4233+ GNU Lesser General Public License for more details.
4234
4235- You should have received a copy of the GNU General Public License
4236+ You should have received a copy of the GNU Lesser General Public License
4237 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4238
4239 /* We don't need a static internal state, because the encoding is not state
4240--- a/gnulib/lib/mbtowc-lock.c
4241+++ b/gnulib/lib/mbtowc-lock.c
4242@@ -1,17 +1,17 @@
4243 /* Return the internal lock used by mbrtowc and mbrtoc32.
4244 Copyright (C) 2019-2021 Free Software Foundation, Inc.
4245
4246- This program is free software: you can redistribute it and/or modify
4247- it under the terms of the GNU General Public License as published by
4248- the Free Software Foundation; either version 3 of the License, or
4249- (at your option) any later version.
4250+ This file is free software: you can redistribute it and/or modify
4251+ it under the terms of the GNU Lesser General Public License as
4252+ published by the Free Software Foundation; either version 2.1 of the
4253+ License, or (at your option) any later version.
4254
4255- This program is distributed in the hope that it will be useful,
4256+ This file is distributed in the hope that it will be useful,
4257 but WITHOUT ANY WARRANTY; without even the implied warranty of
4258 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4259- GNU General Public License for more details.
4260+ GNU Lesser General Public License for more details.
4261
4262- You should have received a copy of the GNU General Public License
4263+ You should have received a copy of the GNU Lesser General Public License
4264 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4265
4266 /* Written by Bruno Haible <bruno@clisp.org>, 2019-2020. */
4267--- a/gnulib/lib/mbtowc-lock.h
4268+++ b/gnulib/lib/mbtowc-lock.h
4269@@ -1,17 +1,17 @@
4270 /* Use the internal lock used by mbrtowc and mbrtoc32.
4271 Copyright (C) 2019-2021 Free Software Foundation, Inc.
4272
4273- This program is free software: you can redistribute it and/or modify
4274- it under the terms of the GNU General Public License as published by
4275- the Free Software Foundation; either version 3 of the License, or
4276- (at your option) any later version.
4277+ This file is free software: you can redistribute it and/or modify
4278+ it under the terms of the GNU Lesser General Public License as
4279+ published by the Free Software Foundation; either version 2.1 of the
4280+ License, or (at your option) any later version.
4281
4282- This program is distributed in the hope that it will be useful,
4283+ This file is distributed in the hope that it will be useful,
4284 but WITHOUT ANY WARRANTY; without even the implied warranty of
4285 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4286- GNU General Public License for more details.
4287+ GNU Lesser General Public License for more details.
4288
4289- You should have received a copy of the GNU General Public License
4290+ You should have received a copy of the GNU Lesser General Public License
4291 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4292
4293 /* Written by Bruno Haible <bruno@clisp.org>, 2019-2020. */
4294--- a/gnulib/lib/mbtowc.c
4295+++ b/gnulib/lib/mbtowc.c
4296@@ -2,17 +2,17 @@
4297 Copyright (C) 2011-2021 Free Software Foundation, Inc.
4298 Written by Bruno Haible <bruno@clisp.org>, 2011.
4299
4300- This program is free software: you can redistribute it and/or modify
4301- it under the terms of the GNU General Public License as published by
4302- the Free Software Foundation; either version 3 of the License, or
4303- (at your option) any later version.
4304+ This file is free software: you can redistribute it and/or modify
4305+ it under the terms of the GNU Lesser General Public License as
4306+ published by the Free Software Foundation; either version 2.1 of the
4307+ License, or (at your option) any later version.
4308
4309- This program is distributed in the hope that it will be useful,
4310+ This file is distributed in the hope that it will be useful,
4311 but WITHOUT ANY WARRANTY; without even the implied warranty of
4312 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4313- GNU General Public License for more details.
4314+ GNU Lesser General Public License for more details.
4315
4316- You should have received a copy of the GNU General Public License
4317+ You should have received a copy of the GNU Lesser General Public License
4318 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4319
4320 #include <config.h>
4321--- a/gnulib/lib/mbuiter.c
4322+++ b/gnulib/lib/mbuiter.c
4323@@ -1,3 +1,20 @@
4324+/* Iterating through multibyte strings: macros for multi-byte encodings.
4325+ Copyright (C) 2012-2021 Free Software Foundation, Inc.
4326+
4327+ This file is free software: you can redistribute it and/or modify
4328+ it under the terms of the GNU Lesser General Public License as
4329+ published by the Free Software Foundation; either version 3 of the
4330+ License, or (at your option) any later version.
4331+
4332+ This file is distributed in the hope that it will be useful,
4333+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4334+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4335+ GNU Lesser General Public License for more details.
4336+
4337+ You should have received a copy of the GNU Lesser General Public License
4338+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4339+
4340 #include <config.h>
4341+
4342 #define MBUITER_INLINE _GL_EXTERN_INLINE
4343 #include "mbuiter.h"
4344--- a/gnulib/lib/mbuiter.h
4345+++ b/gnulib/lib/mbuiter.h
4346@@ -1,17 +1,17 @@
4347 /* Iterating through multibyte strings: macros for multi-byte encodings.
4348 Copyright (C) 2001, 2005, 2007, 2009-2021 Free Software Foundation, Inc.
4349
4350- This program is free software: you can redistribute it and/or modify
4351- it under the terms of the GNU General Public License as published by
4352- the Free Software Foundation; either version 3 of the License, or
4353- (at your option) any later version.
4354+ This file is free software: you can redistribute it and/or modify
4355+ it under the terms of the GNU Lesser General Public License as
4356+ published by the Free Software Foundation; either version 3 of the
4357+ License, or (at your option) any later version.
4358
4359- This program is distributed in the hope that it will be useful,
4360+ This file is distributed in the hope that it will be useful,
4361 but WITHOUT ANY WARRANTY; without even the implied warranty of
4362 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4363- GNU General Public License for more details.
4364+ GNU Lesser General Public License for more details.
4365
4366- You should have received a copy of the GNU General Public License
4367+ You should have received a copy of the GNU Lesser General Public License
4368 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4369
4370 /* Written by Bruno Haible <bruno@clisp.org>. */
4371--- a/gnulib/lib/memchr.c
4372+++ b/gnulib/lib/memchr.c
4373@@ -7,21 +7,21 @@
4374 adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
4375 and implemented by Roland McGrath (roland@ai.mit.edu).
4376
4377-NOTE: The canonical source of this file is maintained with the GNU C Library.
4378-Bugs can be reported to bug-glibc@prep.ai.mit.edu.
4379+ NOTE: The canonical source of this file is maintained with the GNU C Library.
4380+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
4381
4382-This program is free software: you can redistribute it and/or modify it
4383-under the terms of the GNU General Public License as published by the
4384-Free Software Foundation; either version 3 of the License, or any
4385-later version.
4386+ This file is free software: you can redistribute it and/or modify
4387+ it under the terms of the GNU Lesser General Public License as
4388+ published by the Free Software Foundation; either version 2.1 of the
4389+ License, or (at your option) any later version.
4390
4391-This program is distributed in the hope that it will be useful,
4392-but WITHOUT ANY WARRANTY; without even the implied warranty of
4393-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4394-GNU General Public License for more details.
4395+ This file is distributed in the hope that it will be useful,
4396+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4397+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4398+ GNU Lesser General Public License for more details.
4399
4400-You should have received a copy of the GNU General Public License
4401-along with this program. If not, see <https://www.gnu.org/licenses/>. */
4402+ You should have received a copy of the GNU Lesser General Public License
4403+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4404
4405 #ifndef _LIBC
4406 # include <config.h>
4407--- a/gnulib/lib/memchr.valgrind
4408+++ b/gnulib/lib/memchr.valgrind
4409@@ -2,17 +2,17 @@
4410
4411 # Copyright (C) 2009-2021 Free Software Foundation, Inc.
4412 #
4413-# This program is free software: you can redistribute it and/or modify
4414-# it under the terms of the GNU General Public License as published by
4415-# the Free Software Foundation; either version 3 of the License, or
4416-# (at your option) any later version.
4417+# This file is free software: you can redistribute it and/or modify
4418+# it under the terms of the GNU Lesser General Public License as
4419+# published by the Free Software Foundation; either version 2.1 of the
4420+# License, or (at your option) any later version.
4421 #
4422-# This program is distributed in the hope that it will be useful,
4423+# This file is distributed in the hope that it will be useful,
4424 # but WITHOUT ANY WARRANTY; without even the implied warranty of
4425 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4426-# GNU General Public License for more details.
4427+# GNU Lesser General Public License for more details.
4428 #
4429-# You should have received a copy of the GNU General Public License
4430+# You should have received a copy of the GNU Lesser General Public License
4431 # along with this program. If not, see <https://www.gnu.org/licenses/>.
4432
4433 # POSIX states that when the character is found, memchr must not read extra
4434--- a/gnulib/lib/mempcpy.c
4435+++ b/gnulib/lib/mempcpy.c
4436@@ -1,18 +1,18 @@
4437 /* Copy memory area and return pointer after last written byte.
4438 Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc.
4439
4440- This program is free software; you can redistribute it and/or modify
4441- it under the terms of the GNU General Public License as published by
4442- the Free Software Foundation; either version 3, or (at your option)
4443- any later version.
4444+ This file is free software: you can redistribute it and/or modify
4445+ it under the terms of the GNU Lesser General Public License as
4446+ published by the Free Software Foundation; either version 2.1 of the
4447+ License, or (at your option) any later version.
4448
4449- This program is distributed in the hope that it will be useful,
4450+ This file is distributed in the hope that it will be useful,
4451 but WITHOUT ANY WARRANTY; without even the implied warranty of
4452 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4453- GNU General Public License for more details.
4454+ GNU Lesser General Public License for more details.
4455
4456- You should have received a copy of the GNU General Public License
4457- along with this program; if not, see <https://www.gnu.org/licenses/>. */
4458+ You should have received a copy of the GNU Lesser General Public License
4459+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4460
4461 #include <config.h>
4462
4463--- a/gnulib/lib/memrchr.c
4464+++ b/gnulib/lib/memrchr.c
4465@@ -9,17 +9,17 @@
4466 adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
4467 and implemented by Roland McGrath (roland@ai.mit.edu).
4468
4469- This program is free software: you can redistribute it and/or modify
4470- it under the terms of the GNU General Public License as published by
4471- the Free Software Foundation; either version 3 of the License, or
4472- (at your option) any later version.
4473+ This file is free software: you can redistribute it and/or modify
4474+ it under the terms of the GNU Lesser General Public License as
4475+ published by the Free Software Foundation; either version 3 of the
4476+ License, or (at your option) any later version.
4477
4478- This program is distributed in the hope that it will be useful,
4479+ This file is distributed in the hope that it will be useful,
4480 but WITHOUT ANY WARRANTY; without even the implied warranty of
4481 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4482- GNU General Public License for more details.
4483+ GNU Lesser General Public License for more details.
4484
4485- You should have received a copy of the GNU General Public License
4486+ You should have received a copy of the GNU Lesser General Public License
4487 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4488
4489 #if defined _LIBC
4490--- /dev/null
4491+++ b/gnulib/lib/minmax.h
4492@@ -0,0 +1,60 @@
4493+/* MIN, MAX macros.
4494+ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2021 Free Software
4495+ Foundation, Inc.
4496+
4497+ This file is free software: you can redistribute it and/or modify
4498+ it under the terms of the GNU Lesser General Public License as
4499+ published by the Free Software Foundation; either version 2.1 of the
4500+ License, or (at your option) any later version.
4501+
4502+ This file is distributed in the hope that it will be useful,
4503+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4504+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4505+ GNU Lesser General Public License for more details.
4506+
4507+ You should have received a copy of the GNU Lesser General Public License
4508+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4509+
4510+#ifndef _MINMAX_H
4511+#define _MINMAX_H
4512+
4513+/* Note: MIN, MAX are also defined in <sys/param.h> on some systems
4514+ (glibc, IRIX, HP-UX, OSF/1). Therefore you might get warnings about
4515+ MIN, MAX macro redefinitions on some systems; the workaround is to
4516+ #include this file as the last one among the #include list. */
4517+
4518+/* Before we define the following symbols we get the <limits.h> file
4519+ since otherwise we get redefinitions on some systems if <limits.h> is
4520+ included after this file. Likewise for <sys/param.h>.
4521+ If more than one of these system headers define MIN and MAX, pick just
4522+ one of the headers (because the definitions most likely are the same). */
4523+#if HAVE_MINMAX_IN_LIMITS_H
4524+# include <limits.h>
4525+#elif HAVE_MINMAX_IN_SYS_PARAM_H
4526+# include <sys/param.h>
4527+#endif
4528+
4529+/* Note: MIN and MAX should be used with two arguments of the
4530+ same type. They might not return the minimum and maximum of their two
4531+ arguments, if the arguments have different types or have unusual
4532+ floating-point values. For example, on a typical host with 32-bit 'int',
4533+ 64-bit 'long long', and 64-bit IEEE 754 'double' types:
4534+
4535+ MAX (-1, 2147483648) returns 4294967295.
4536+ MAX (9007199254740992.0, 9007199254740993) returns 9007199254740992.0.
4537+ MAX (NaN, 0.0) returns 0.0.
4538+ MAX (+0.0, -0.0) returns -0.0.
4539+
4540+ and in each case the answer is in some sense bogus. */
4541+
4542+/* MAX(a,b) returns the maximum of A and B. */
4543+#ifndef MAX
4544+# define MAX(a,b) ((a) > (b) ? (a) : (b))
4545+#endif
4546+
4547+/* MIN(a,b) returns the minimum of A and B. */
4548+#ifndef MIN
4549+# define MIN(a,b) ((a) < (b) ? (a) : (b))
4550+#endif
4551+
4552+#endif /* _MINMAX_H */
4553--- a/gnulib/lib/msvc-inval.c
4554+++ b/gnulib/lib/msvc-inval.c
4555@@ -1,18 +1,18 @@
4556 /* Invalid parameter handler for MSVC runtime libraries.
4557 Copyright (C) 2011-2021 Free Software Foundation, Inc.
4558
4559- This program is free software; you can redistribute it and/or modify
4560- it under the terms of the GNU General Public License as published by
4561- the Free Software Foundation; either version 3, or (at your option)
4562- any later version.
4563+ This file is free software: you can redistribute it and/or modify
4564+ it under the terms of the GNU Lesser General Public License as
4565+ published by the Free Software Foundation; either version 2.1 of the
4566+ License, or (at your option) any later version.
4567
4568- This program is distributed in the hope that it will be useful,
4569+ This file is distributed in the hope that it will be useful,
4570 but WITHOUT ANY WARRANTY; without even the implied warranty of
4571 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4572- GNU General Public License for more details.
4573+ GNU Lesser General Public License for more details.
4574
4575- You should have received a copy of the GNU General Public License along
4576- with this program; if not, see <https://www.gnu.org/licenses/>. */
4577+ You should have received a copy of the GNU Lesser General Public License
4578+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4579
4580 #include <config.h>
4581
4582--- a/gnulib/lib/msvc-inval.h
4583+++ b/gnulib/lib/msvc-inval.h
4584@@ -1,18 +1,18 @@
4585 /* Invalid parameter handler for MSVC runtime libraries.
4586 Copyright (C) 2011-2021 Free Software Foundation, Inc.
4587
4588- This program is free software; you can redistribute it and/or modify
4589- it under the terms of the GNU General Public License as published by
4590- the Free Software Foundation; either version 3, or (at your option)
4591- any later version.
4592+ This file is free software: you can redistribute it and/or modify
4593+ it under the terms of the GNU Lesser General Public License as
4594+ published by the Free Software Foundation; either version 2.1 of the
4595+ License, or (at your option) any later version.
4596
4597- This program is distributed in the hope that it will be useful,
4598+ This file is distributed in the hope that it will be useful,
4599 but WITHOUT ANY WARRANTY; without even the implied warranty of
4600 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4601- GNU General Public License for more details.
4602+ GNU Lesser General Public License for more details.
4603
4604- You should have received a copy of the GNU General Public License along
4605- with this program; if not, see <https://www.gnu.org/licenses/>. */
4606+ You should have received a copy of the GNU Lesser General Public License
4607+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4608
4609 #ifndef _MSVC_INVAL_H
4610 #define _MSVC_INVAL_H
4611--- a/gnulib/lib/msvc-nothrow.c
4612+++ b/gnulib/lib/msvc-nothrow.c
4613@@ -2,18 +2,18 @@
4614 with MSVC runtime libraries.
4615 Copyright (C) 2011-2021 Free Software Foundation, Inc.
4616
4617- This program is free software; you can redistribute it and/or modify
4618- it under the terms of the GNU General Public License as published by
4619- the Free Software Foundation; either version 3, or (at your option)
4620- any later version.
4621+ This file is free software: you can redistribute it and/or modify
4622+ it under the terms of the GNU Lesser General Public License as
4623+ published by the Free Software Foundation; either version 2.1 of the
4624+ License, or (at your option) any later version.
4625
4626- This program is distributed in the hope that it will be useful,
4627+ This file is distributed in the hope that it will be useful,
4628 but WITHOUT ANY WARRANTY; without even the implied warranty of
4629 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4630- GNU General Public License for more details.
4631+ GNU Lesser General Public License for more details.
4632
4633- You should have received a copy of the GNU General Public License along
4634- with this program; if not, see <https://www.gnu.org/licenses/>. */
4635+ You should have received a copy of the GNU Lesser General Public License
4636+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4637
4638 #include <config.h>
4639
4640--- a/gnulib/lib/msvc-nothrow.h
4641+++ b/gnulib/lib/msvc-nothrow.h
4642@@ -2,18 +2,18 @@
4643 with MSVC runtime libraries.
4644 Copyright (C) 2011-2021 Free Software Foundation, Inc.
4645
4646- This program is free software; you can redistribute it and/or modify
4647- it under the terms of the GNU General Public License as published by
4648- the Free Software Foundation; either version 3, or (at your option)
4649- any later version.
4650+ This file is free software: you can redistribute it and/or modify
4651+ it under the terms of the GNU Lesser General Public License as
4652+ published by the Free Software Foundation; either version 2.1 of the
4653+ License, or (at your option) any later version.
4654
4655- This program is distributed in the hope that it will be useful,
4656+ This file is distributed in the hope that it will be useful,
4657 but WITHOUT ANY WARRANTY; without even the implied warranty of
4658 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4659- GNU General Public License for more details.
4660+ GNU Lesser General Public License for more details.
4661
4662- You should have received a copy of the GNU General Public License along
4663- with this program; if not, see <https://www.gnu.org/licenses/>. */
4664+ You should have received a copy of the GNU Lesser General Public License
4665+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4666
4667 #ifndef _MSVC_NOTHROW_H
4668 #define _MSVC_NOTHROW_H
4669--- a/gnulib/lib/nl_langinfo-lock.c
4670+++ b/gnulib/lib/nl_langinfo-lock.c
4671@@ -1,17 +1,17 @@
4672 /* Return the internal lock used by nl_langinfo.
4673 Copyright (C) 2019-2021 Free Software Foundation, Inc.
4674
4675- This program is free software: you can redistribute it and/or modify
4676- it under the terms of the GNU General Public License as published by
4677- the Free Software Foundation; either version 3 of the License, or
4678- (at your option) any later version.
4679+ This file is free software: you can redistribute it and/or modify
4680+ it under the terms of the GNU Lesser General Public License as
4681+ published by the Free Software Foundation; either version 2.1 of the
4682+ License, or (at your option) any later version.
4683
4684- This program is distributed in the hope that it will be useful,
4685+ This file is distributed in the hope that it will be useful,
4686 but WITHOUT ANY WARRANTY; without even the implied warranty of
4687 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4688- GNU General Public License for more details.
4689+ GNU Lesser General Public License for more details.
4690
4691- You should have received a copy of the GNU General Public License
4692+ You should have received a copy of the GNU Lesser General Public License
4693 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4694
4695 /* Written by Bruno Haible <bruno@clisp.org>, 2019-2020. */
4696--- a/gnulib/lib/nl_langinfo.c
4697+++ b/gnulib/lib/nl_langinfo.c
4698@@ -2,17 +2,17 @@
4699
4700 Copyright (C) 2007-2021 Free Software Foundation, Inc.
4701
4702- This program is free software: you can redistribute it and/or modify
4703- it under the terms of the GNU General Public License as published by
4704- the Free Software Foundation; either version 3 of the License, or
4705- (at your option) any later version.
4706+ This file is free software: you can redistribute it and/or modify
4707+ it under the terms of the GNU Lesser General Public License as
4708+ published by the Free Software Foundation; either version 2.1 of the
4709+ License, or (at your option) any later version.
4710
4711- This program is distributed in the hope that it will be useful,
4712+ This file is distributed in the hope that it will be useful,
4713 but WITHOUT ANY WARRANTY; without even the implied warranty of
4714 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4715- GNU General Public License for more details.
4716+ GNU Lesser General Public License for more details.
4717
4718- You should have received a copy of the GNU General Public License
4719+ You should have received a copy of the GNU Lesser General Public License
4720 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4721
4722 #include <config.h>
4723--- a/gnulib/lib/open.c
4724+++ b/gnulib/lib/open.c
4725@@ -1,17 +1,17 @@
4726 /* Open a descriptor to a file.
4727 Copyright (C) 2007-2021 Free Software Foundation, Inc.
4728
4729- This program is free software: you can redistribute it and/or modify
4730- it under the terms of the GNU General Public License as published by
4731- the Free Software Foundation; either version 3 of the License, or
4732- (at your option) any later version.
4733+ This file is free software: you can redistribute it and/or modify
4734+ it under the terms of the GNU Lesser General Public License as
4735+ published by the Free Software Foundation; either version 2.1 of the
4736+ License, or (at your option) any later version.
4737
4738- This program is distributed in the hope that it will be useful,
4739+ This file is distributed in the hope that it will be useful,
4740 but WITHOUT ANY WARRANTY; without even the implied warranty of
4741 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4742- GNU General Public License for more details.
4743+ GNU Lesser General Public License for more details.
4744
4745- You should have received a copy of the GNU General Public License
4746+ You should have received a copy of the GNU Lesser General Public License
4747 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4748
4749 /* Written by Bruno Haible <bruno@clisp.org>, 2007. */
4750--- a/gnulib/lib/pathmax.h
4751+++ b/gnulib/lib/pathmax.h
4752@@ -2,18 +2,18 @@
4753 Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2021 Free Software
4754 Foundation, Inc.
4755
4756- This program is free software; you can redistribute it and/or modify
4757- it under the terms of the GNU General Public License as published by
4758- the Free Software Foundation; either version 3, or (at your option)
4759- any later version.
4760+ This file is free software: you can redistribute it and/or modify
4761+ it under the terms of the GNU Lesser General Public License as
4762+ published by the Free Software Foundation; either version 2.1 of the
4763+ License, or (at your option) any later version.
4764
4765- This program is distributed in the hope that it will be useful,
4766+ This file is distributed in the hope that it will be useful,
4767 but WITHOUT ANY WARRANTY; without even the implied warranty of
4768 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4769- GNU General Public License for more details.
4770+ GNU Lesser General Public License for more details.
4771
4772- You should have received a copy of the GNU General Public License
4773- along with this program; if not, see <https://www.gnu.org/licenses/>. */
4774+ You should have received a copy of the GNU Lesser General Public License
4775+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4776
4777 #ifndef _PATHMAX_H
4778 # define _PATHMAX_H
4779--- a/gnulib/lib/printf-args.c
4780+++ b/gnulib/lib/printf-args.c
4781@@ -2,18 +2,18 @@
4782 Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2021 Free Software
4783 Foundation, Inc.
4784
4785- This program is free software; you can redistribute it and/or modify
4786- it under the terms of the GNU General Public License as published by
4787- the Free Software Foundation; either version 3, or (at your option)
4788- any later version.
4789+ This file is free software: you can redistribute it and/or modify
4790+ it under the terms of the GNU Lesser General Public License as
4791+ published by the Free Software Foundation; either version 2.1 of the
4792+ License, or (at your option) any later version.
4793
4794- This program is distributed in the hope that it will be useful,
4795+ This file is distributed in the hope that it will be useful,
4796 but WITHOUT ANY WARRANTY; without even the implied warranty of
4797 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4798- GNU General Public License for more details.
4799+ GNU Lesser General Public License for more details.
4800
4801- You should have received a copy of the GNU General Public License along
4802- with this program; if not, see <https://www.gnu.org/licenses/>. */
4803+ You should have received a copy of the GNU Lesser General Public License
4804+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4805
4806 /* This file can be parametrized with the following macros:
4807 ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
4808--- a/gnulib/lib/printf-args.h
4809+++ b/gnulib/lib/printf-args.h
4810@@ -2,18 +2,18 @@
4811 Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2021 Free Software
4812 Foundation, Inc.
4813
4814- This program is free software; you can redistribute it and/or modify
4815- it under the terms of the GNU General Public License as published by
4816- the Free Software Foundation; either version 3, or (at your option)
4817- any later version.
4818+ This file is free software: you can redistribute it and/or modify
4819+ it under the terms of the GNU Lesser General Public License as
4820+ published by the Free Software Foundation; either version 2.1 of the
4821+ License, or (at your option) any later version.
4822
4823- This program is distributed in the hope that it will be useful,
4824+ This file is distributed in the hope that it will be useful,
4825 but WITHOUT ANY WARRANTY; without even the implied warranty of
4826 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4827- GNU General Public License for more details.
4828+ GNU Lesser General Public License for more details.
4829
4830- You should have received a copy of the GNU General Public License along
4831- with this program; if not, see <https://www.gnu.org/licenses/>. */
4832+ You should have received a copy of the GNU Lesser General Public License
4833+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4834
4835 #ifndef _PRINTF_ARGS_H
4836 #define _PRINTF_ARGS_H
4837--- a/gnulib/lib/printf-parse.c
4838+++ b/gnulib/lib/printf-parse.c
4839@@ -1,18 +1,18 @@
4840 /* Formatted output to strings.
4841 Copyright (C) 1999-2000, 2002-2003, 2006-2021 Free Software Foundation, Inc.
4842
4843- This program is free software; you can redistribute it and/or modify
4844- it under the terms of the GNU General Public License as published by
4845- the Free Software Foundation; either version 3, or (at your option)
4846- any later version.
4847+ This file is free software: you can redistribute it and/or modify
4848+ it under the terms of the GNU Lesser General Public License as
4849+ published by the Free Software Foundation; either version 2.1 of the
4850+ License, or (at your option) any later version.
4851
4852- This program is distributed in the hope that it will be useful,
4853+ This file is distributed in the hope that it will be useful,
4854 but WITHOUT ANY WARRANTY; without even the implied warranty of
4855 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4856- GNU General Public License for more details.
4857+ GNU Lesser General Public License for more details.
4858
4859- You should have received a copy of the GNU General Public License along
4860- with this program; if not, see <https://www.gnu.org/licenses/>. */
4861+ You should have received a copy of the GNU Lesser General Public License
4862+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4863
4864 /* This file can be parametrized with the following macros:
4865 CHAR_T The element type of the format string.
4866@@ -48,16 +48,7 @@
4867 #include <stddef.h>
4868
4869 /* Get intmax_t. */
4870-#if defined IN_LIBINTL || defined IN_LIBASPRINTF
4871-# if HAVE_STDINT_H_WITH_UINTMAX
4872-# include <stdint.h>
4873-# endif
4874-# if HAVE_INTTYPES_H_WITH_UINTMAX
4875-# include <inttypes.h>
4876-# endif
4877-#else
4878-# include <stdint.h>
4879-#endif
4880+#include <stdint.h>
4881
4882 /* malloc(), realloc(), free(). */
4883 #include <stdlib.h>
4884--- a/gnulib/lib/printf-parse.h
4885+++ b/gnulib/lib/printf-parse.h
4886@@ -2,18 +2,18 @@
4887 Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2021 Free Software
4888 Foundation, Inc.
4889
4890- This program is free software; you can redistribute it and/or modify
4891- it under the terms of the GNU General Public License as published by
4892- the Free Software Foundation; either version 3, or (at your option)
4893- any later version.
4894+ This file is free software: you can redistribute it and/or modify
4895+ it under the terms of the GNU Lesser General Public License as
4896+ published by the Free Software Foundation; either version 2.1 of the
4897+ License, or (at your option) any later version.
4898
4899- This program is distributed in the hope that it will be useful,
4900+ This file is distributed in the hope that it will be useful,
4901 but WITHOUT ANY WARRANTY; without even the implied warranty of
4902 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4903- GNU General Public License for more details.
4904+ GNU Lesser General Public License for more details.
4905
4906- You should have received a copy of the GNU General Public License along
4907- with this program; if not, see <https://www.gnu.org/licenses/>. */
4908+ You should have received a copy of the GNU Lesser General Public License
4909+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4910
4911 #ifndef _PRINTF_PARSE_H
4912 #define _PRINTF_PARSE_H
4913--- /dev/null
4914+++ b/gnulib/lib/realloc.c
4915@@ -0,0 +1,63 @@
4916+/* realloc() function that is glibc compatible.
4917+
4918+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2021 Free Software
4919+ Foundation, Inc.
4920+
4921+ This file is free software: you can redistribute it and/or modify
4922+ it under the terms of the GNU Lesser General Public License as
4923+ published by the Free Software Foundation; either version 2.1 of the
4924+ License, or (at your option) any later version.
4925+
4926+ This file is distributed in the hope that it will be useful,
4927+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4928+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4929+ GNU Lesser General Public License for more details.
4930+
4931+ You should have received a copy of the GNU Lesser General Public License
4932+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4933+
4934+/* written by Jim Meyering and Bruno Haible */
4935+
4936+#include <config.h>
4937+
4938+#include <stdlib.h>
4939+
4940+#include <errno.h>
4941+
4942+#include "xalloc-oversized.h"
4943+
4944+/* Call the system's realloc below. This file does not define
4945+ _GL_USE_STDLIB_ALLOC because it needs Gnulib's malloc if present. */
4946+#undef realloc
4947+
4948+/* Change the size of an allocated block of memory P to N bytes,
4949+ with error checking. If P is NULL, use malloc. Otherwise if N is zero,
4950+ free P and return NULL. */
4951+
4952+void *
4953+rpl_realloc (void *p, size_t n)
4954+{
4955+ if (p == NULL)
4956+ return malloc (n);
4957+
4958+ if (n == 0)
4959+ {
4960+ free (p);
4961+ return NULL;
4962+ }
4963+
4964+ if (xalloc_oversized (n, 1))
4965+ {
4966+ errno = ENOMEM;
4967+ return NULL;
4968+ }
4969+
4970+ void *result = realloc (p, n);
4971+
4972+#if !HAVE_MALLOC_POSIX
4973+ if (result == NULL)
4974+ errno = ENOMEM;
4975+#endif
4976+
4977+ return result;
4978+}
4979--- /dev/null
4980+++ b/gnulib/lib/reallocarray.c
4981@@ -0,0 +1,39 @@
4982+/* reallocarray function that is glibc compatible.
4983+
4984+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
4985+
4986+ This file is free software: you can redistribute it and/or modify
4987+ it under the terms of the GNU Lesser General Public License as
4988+ published by the Free Software Foundation; either version 2.1 of the
4989+ License, or (at your option) any later version.
4990+
4991+ This file is distributed in the hope that it will be useful,
4992+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4993+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4994+ GNU Lesser General Public License for more details.
4995+
4996+ You should have received a copy of the GNU Lesser General Public License
4997+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
4998+
4999+/* written by Darshit Shah */
5000+
5001+#include <config.h>
5002+
5003+#include <stdlib.h>
5004+#include <errno.h>
5005+
5006+#include "intprops.h"
5007+
5008+void *
5009+reallocarray (void *ptr, size_t nmemb, size_t size)
5010+{
5011+ size_t nbytes;
5012+ if (INT_MULTIPLY_WRAPV (nmemb, size, &nbytes))
5013+ {
5014+ errno = ENOMEM;
5015+ return NULL;
5016+ }
5017+
5018+ /* Rely on the semantics of GNU realloc. */
5019+ return realloc (ptr, nbytes);
5020+}
5021--- a/gnulib/lib/regcomp.c
5022+++ b/gnulib/lib/regcomp.c
5023@@ -4,16 +4,16 @@
5024 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5025
5026 The GNU C Library is free software; you can redistribute it and/or
5027- modify it under the terms of the GNU General Public
5028+ modify it under the terms of the GNU Lesser General Public
5029 License as published by the Free Software Foundation; either
5030- version 3 of the License, or (at your option) any later version.
5031+ version 2.1 of the License, or (at your option) any later version.
5032
5033 The GNU C Library is distributed in the hope that it will be useful,
5034 but WITHOUT ANY WARRANTY; without even the implied warranty of
5035 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5036- General Public License for more details.
5037+ Lesser General Public License for more details.
5038
5039- You should have received a copy of the GNU General Public
5040+ You should have received a copy of the GNU Lesser General Public
5041 License along with the GNU C Library; if not, see
5042 <https://www.gnu.org/licenses/>. */
5043
5044--- a/gnulib/lib/regex.c
5045+++ b/gnulib/lib/regex.c
5046@@ -4,16 +4,16 @@
5047 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5048
5049 The GNU C Library is free software; you can redistribute it and/or
5050- modify it under the terms of the GNU General Public
5051+ modify it under the terms of the GNU Lesser General Public
5052 License as published by the Free Software Foundation; either
5053- version 3 of the License, or (at your option) any later version.
5054+ version 2.1 of the License, or (at your option) any later version.
5055
5056 The GNU C Library is distributed in the hope that it will be useful,
5057 but WITHOUT ANY WARRANTY; without even the implied warranty of
5058 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5059- General Public License for more details.
5060+ Lesser General Public License for more details.
5061
5062- You should have received a copy of the GNU General Public
5063+ You should have received a copy of the GNU Lesser General Public
5064 License along with the GNU C Library; if not, see
5065 <https://www.gnu.org/licenses/>. */
5066
5067--- a/gnulib/lib/regex.h
5068+++ b/gnulib/lib/regex.h
5069@@ -4,16 +4,16 @@
5070 This file is part of the GNU C Library.
5071
5072 The GNU C Library is free software; you can redistribute it and/or
5073- modify it under the terms of the GNU General Public
5074+ modify it under the terms of the GNU Lesser General Public
5075 License as published by the Free Software Foundation; either
5076- version 3 of the License, or (at your option) any later version.
5077+ version 2.1 of the License, or (at your option) any later version.
5078
5079 The GNU C Library is distributed in the hope that it will be useful,
5080 but WITHOUT ANY WARRANTY; without even the implied warranty of
5081 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5082- General Public License for more details.
5083+ Lesser General Public License for more details.
5084
5085- You should have received a copy of the GNU General Public
5086+ You should have received a copy of the GNU Lesser General Public
5087 License along with the GNU C Library; if not, see
5088 <https://www.gnu.org/licenses/>. */
5089
5090--- a/gnulib/lib/regex_internal.c
5091+++ b/gnulib/lib/regex_internal.c
5092@@ -4,16 +4,16 @@
5093 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5094
5095 The GNU C Library is free software; you can redistribute it and/or
5096- modify it under the terms of the GNU General Public
5097+ modify it under the terms of the GNU Lesser General Public
5098 License as published by the Free Software Foundation; either
5099- version 3 of the License, or (at your option) any later version.
5100+ version 2.1 of the License, or (at your option) any later version.
5101
5102 The GNU C Library is distributed in the hope that it will be useful,
5103 but WITHOUT ANY WARRANTY; without even the implied warranty of
5104 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5105- General Public License for more details.
5106+ Lesser General Public License for more details.
5107
5108- You should have received a copy of the GNU General Public
5109+ You should have received a copy of the GNU Lesser General Public
5110 License along with the GNU C Library; if not, see
5111 <https://www.gnu.org/licenses/>. */
5112
5113--- a/gnulib/lib/regex_internal.h
5114+++ b/gnulib/lib/regex_internal.h
5115@@ -4,16 +4,16 @@
5116 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5117
5118 The GNU C Library is free software; you can redistribute it and/or
5119- modify it under the terms of the GNU General Public
5120+ modify it under the terms of the GNU Lesser General Public
5121 License as published by the Free Software Foundation; either
5122- version 3 of the License, or (at your option) any later version.
5123+ version 2.1 of the License, or (at your option) any later version.
5124
5125 The GNU C Library is distributed in the hope that it will be useful,
5126 but WITHOUT ANY WARRANTY; without even the implied warranty of
5127 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5128- General Public License for more details.
5129+ Lesser General Public License for more details.
5130
5131- You should have received a copy of the GNU General Public
5132+ You should have received a copy of the GNU Lesser General Public
5133 License along with the GNU C Library; if not, see
5134 <https://www.gnu.org/licenses/>. */
5135
5136--- a/gnulib/lib/regexec.c
5137+++ b/gnulib/lib/regexec.c
5138@@ -4,16 +4,16 @@
5139 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5140
5141 The GNU C Library is free software; you can redistribute it and/or
5142- modify it under the terms of the GNU General Public
5143+ modify it under the terms of the GNU Lesser General Public
5144 License as published by the Free Software Foundation; either
5145- version 3 of the License, or (at your option) any later version.
5146+ version 2.1 of the License, or (at your option) any later version.
5147
5148 The GNU C Library is distributed in the hope that it will be useful,
5149 but WITHOUT ANY WARRANTY; without even the implied warranty of
5150 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5151- General Public License for more details.
5152+ Lesser General Public License for more details.
5153
5154- You should have received a copy of the GNU General Public
5155+ You should have received a copy of the GNU Lesser General Public
5156 License along with the GNU C Library; if not, see
5157 <https://www.gnu.org/licenses/>. */
5158
5159@@ -1220,9 +1220,13 @@ proceed_next_node (const re_match_contex
5160 {
5161 re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes;
5162 re_node_set *edests = &dfa->edests[node];
5163- bool ok = re_node_set_insert (eps_via_nodes, node);
5164- if (__glibc_unlikely (! ok))
5165- return -2;
5166+
5167+ if (! re_node_set_contains (eps_via_nodes, node))
5168+ {
5169+ bool ok = re_node_set_insert (eps_via_nodes, node);
5170+ if (__glibc_unlikely (! ok))
5171+ return -2;
5172+ }
5173
5174 /* Pick a valid destination, or return -1 if none is found. */
5175 Idx dest_node = -1;
5176@@ -1414,7 +1418,7 @@ set_regs (const regex_t *preg, const re_
5177 update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch);
5178
5179 if ((idx == pmatch[0].rm_eo && cur_node == mctx->last_node)
5180- || re_node_set_contains (&eps_via_nodes, cur_node))
5181+ || (fs && re_node_set_contains (&eps_via_nodes, cur_node)))
5182 {
5183 Idx reg_idx;
5184 cur_node = -1;
5185--- a/gnulib/lib/setlocale-lock.c
5186+++ b/gnulib/lib/setlocale-lock.c
5187@@ -1,17 +1,17 @@
5188 /* Return the internal lock used by setlocale_null_r.
5189 Copyright (C) 2019-2021 Free Software Foundation, Inc.
5190
5191- This program is free software: you can redistribute it and/or modify
5192- it under the terms of the GNU General Public License as published by
5193- the Free Software Foundation; either version 3 of the License, or
5194- (at your option) any later version.
5195+ This file is free software: you can redistribute it and/or modify
5196+ it under the terms of the GNU Lesser General Public License as
5197+ published by the Free Software Foundation; either version 2.1 of the
5198+ License, or (at your option) any later version.
5199
5200- This program is distributed in the hope that it will be useful,
5201+ This file is distributed in the hope that it will be useful,
5202 but WITHOUT ANY WARRANTY; without even the implied warranty of
5203 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5204- GNU General Public License for more details.
5205+ GNU Lesser General Public License for more details.
5206
5207- You should have received a copy of the GNU General Public License
5208+ You should have received a copy of the GNU Lesser General Public License
5209 along with this program. If not, see <https://www.gnu.org/licenses/>. */
5210
5211 /* Written by Bruno Haible <bruno@clisp.org>, 2019. */
5212--- a/gnulib/lib/setlocale_null.c
5213+++ b/gnulib/lib/setlocale_null.c
5214@@ -1,17 +1,17 @@
5215 /* Query the name of the current global locale.
5216 Copyright (C) 2019-2021 Free Software Foundation, Inc.
5217
5218- This program is free software: you can redistribute it and/or modify
5219- it under the terms of the GNU General Public License as published by
5220- the Free Software Foundation; either version 3 of the License, or
5221- (at your option) any later version.
5222+ This file is free software: you can redistribute it and/or modify
5223+ it under the terms of the GNU Lesser General Public License as
5224+ published by the Free Software Foundation; either version 2.1 of the
5225+ License, or (at your option) any later version.
5226
5227- This program is distributed in the hope that it will be useful,
5228+ This file is distributed in the hope that it will be useful,
5229 but WITHOUT ANY WARRANTY; without even the implied warranty of
5230 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5231- GNU General Public License for more details.
5232+ GNU Lesser General Public License for more details.
5233
5234- You should have received a copy of the GNU General Public License
5235+ You should have received a copy of the GNU Lesser General Public License
5236 along with this program. If not, see <https://www.gnu.org/licenses/>. */
5237
5238 /* Written by Bruno Haible <bruno@clisp.org>, 2019. */
5239--- a/gnulib/lib/setlocale_null.h
5240+++ b/gnulib/lib/setlocale_null.h
5241@@ -1,17 +1,17 @@
5242 /* Query the name of the current global locale.
5243 Copyright (C) 2019-2021 Free Software Foundation, Inc.
5244
5245- This program is free software: you can redistribute it and/or modify
5246- it under the terms of the GNU General Public License as published by
5247- the Free Software Foundation; either version 3 of the License, or
5248- (at your option) any later version.
5249+ This file is free software: you can redistribute it and/or modify
5250+ it under the terms of the GNU Lesser General Public License as
5251+ published by the Free Software Foundation; either version 2.1 of the
5252+ License, or (at your option) any later version.
5253
5254- This program is distributed in the hope that it will be useful,
5255+ This file is distributed in the hope that it will be useful,
5256 but WITHOUT ANY WARRANTY; without even the implied warranty of
5257 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5258- GNU General Public License for more details.
5259+ GNU Lesser General Public License for more details.
5260
5261- You should have received a copy of the GNU General Public License
5262+ You should have received a copy of the GNU Lesser General Public License
5263 along with this program. If not, see <https://www.gnu.org/licenses/>. */
5264
5265 /* Written by Bruno Haible <bruno@clisp.org>, 2019. */
5266--- a/gnulib/lib/size_max.h
5267+++ b/gnulib/lib/size_max.h
5268@@ -2,18 +2,18 @@
5269 Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
5270 Written by Simon Josefsson.
5271
5272- This program is free software; you can redistribute it and/or modify
5273- it under the terms of the GNU General Public License as published by
5274- the Free Software Foundation; either version 3, or (at your option)
5275- any later version.
5276+ This file is free software: you can redistribute it and/or modify
5277+ it under the terms of the GNU Lesser General Public License as
5278+ published by the Free Software Foundation; either version 2.1 of the
5279+ License, or (at your option) any later version.
5280
5281- This program is distributed in the hope that it will be useful,
5282+ This file is distributed in the hope that it will be useful,
5283 but WITHOUT ANY WARRANTY; without even the implied warranty of
5284 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5285- GNU General Public License for more details.
5286+ GNU Lesser General Public License for more details.
5287
5288- You should have received a copy of the GNU General Public License
5289- along with this program; if not, see <https://www.gnu.org/licenses/>. */
5290+ You should have received a copy of the GNU Lesser General Public License
5291+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
5292
5293 #ifndef GNULIB_SIZE_MAX_H
5294 #define GNULIB_SIZE_MAX_H
5295--- a/gnulib/lib/stat-time.c
5296+++ b/gnulib/lib/stat-time.c
5297@@ -1,3 +1,21 @@
5298+/* stat-related time functions.
5299+
5300+ Copyright (C) 2012-2021 Free Software Foundation, Inc.
5301+
5302+ This file is free software: you can redistribute it and/or modify
5303+ it under the terms of the GNU Lesser General Public License as
5304+ published by the Free Software Foundation; either version 2.1 of the
5305+ License, or (at your option) any later version.
5306+
5307+ This file is distributed in the hope that it will be useful,
5308+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5309+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5310+ GNU Lesser General Public License for more details.
5311+
5312+ You should have received a copy of the GNU Lesser General Public License
5313+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
5314+
5315 #include <config.h>
5316+
5317 #define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE
5318 #include "stat-time.h"
5319--- a/gnulib/lib/stat-time.h
5320+++ b/gnulib/lib/stat-time.h
5321@@ -2,17 +2,17 @@
5322
5323 Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc.
5324
5325- This program is free software: you can redistribute it and/or modify
5326- it under the terms of the GNU General Public License as published by
5327- the Free Software Foundation; either version 3 of the License, or
5328- (at your option) any later version.
5329+ This file is free software: you can redistribute it and/or modify
5330+ it under the terms of the GNU Lesser General Public License as
5331+ published by the Free Software Foundation; either version 2.1 of the
5332+ License, or (at your option) any later version.
5333
5334- This program is distributed in the hope that it will be useful,
5335+ This file is distributed in the hope that it will be useful,
5336 but WITHOUT ANY WARRANTY; without even the implied warranty of
5337 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5338- GNU General Public License for more details.
5339+ GNU Lesser General Public License for more details.
5340
5341- You should have received a copy of the GNU General Public License
5342+ You should have received a copy of the GNU Lesser General Public License
5343 along with this program. If not, see <https://www.gnu.org/licenses/>. */
5344
5345 /* Written by Paul Eggert. */
5346--- a/gnulib/lib/stat-w32.c
5347+++ b/gnulib/lib/stat-w32.c
5348@@ -1,17 +1,17 @@
5349 /* Core of implementation of fstat and stat for native Windows.
5350 Copyright (C) 2017-2021 Free Software Foundation, Inc.
5351
5352- This program is free software: you can redistribute it and/or modify
5353- it under the terms of the GNU General Public License as published by
5354- the Free Software Foundation; either version 3 of the License, or
5355- (at your option) any later version.
5356+ This file is free software: you can redistribute it and/or modify
5357+ it under the terms of the GNU Lesser General Public License as
5358+ published by the Free Software Foundation; either version 2.1 of the
5359+ License, or (at your option) any later version.
5360
5361- This program is distributed in the hope that it will be useful,
5362+ This file is distributed in the hope that it will be useful,
5363 but WITHOUT ANY WARRANTY; without even the implied warranty of
5364 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5365- GNU General Public License for more details.
5366+ GNU Lesser General Public License for more details.
5367
5368- You should have received a copy of the GNU General Public License
5369+ You should have received a copy of the GNU Lesser General Public License
5370 along with this program. If not, see <https://www.gnu.org/licenses/>. */
5371
5372 /* Written by Bruno Haible. */
5373--- a/gnulib/lib/stat-w32.h
5374+++ b/gnulib/lib/stat-w32.h
5375@@ -1,17 +1,17 @@
5376 /* Core of implementation of fstat and stat for native Windows.
5377 Copyright (C) 2017-2021 Free Software Foundation, Inc.
5378
5379- This program is free software: you can redistribute it and/or modify
5380- it under the terms of the GNU General Public License as published by
5381- the Free Software Foundation; either version 3 of the License, or
5382- (at your option) any later version.
5383+ This file is free software: you can redistribute it and/or modify
5384+ it under the terms of the GNU Lesser General Public License as
5385+ published by the Free Software Foundation; either version 2.1 of the
5386+ License, or (at your option) any later version.
5387
5388- This program is distributed in the hope that it will be useful,
5389+ This file is distributed in the hope that it will be useful,
5390 but WITHOUT ANY WARRANTY; without even the implied warranty of
5391 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5392- GNU General Public License for more details.
5393+ GNU Lesser General Public License for more details.
5394
5395- You should have received a copy of the GNU General Public License
5396+ You should have received a copy of the GNU Lesser General Public License
5397 along with this program. If not, see <https://www.gnu.org/licenses/>. */
5398
5399 #ifndef _STAT_W32_H
5400--- a/gnulib/lib/stat.c
5401+++ b/gnulib/lib/stat.c
5402@@ -1,17 +1,17 @@
5403 /* Work around platform bugs in stat.
5404 Copyright (C) 2009-2021 Free Software Foundation, Inc.
5405
5406- This program is free software: you can redistribute it and/or modify
5407- it under the terms of the GNU General Public License as published by
5408- the Free Software Foundation; either version 3 of the License, or
5409- (at your option) any later version.
5410+ This file is free software: you can redistribute it and/or modify
5411+ it under the terms of the GNU Lesser General Public License as
5412+ published by the Free Software Foundation; either version 2.1 of the
5413+ License, or (at your option) any later version.
5414
5415- This program is distributed in the hope that it will be useful,
5416+ This file is distributed in the hope that it will be useful,
5417 but WITHOUT ANY WARRANTY; without even the implied warranty of
5418 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5419- GNU General Public License for more details.
5420+ GNU Lesser General Public License for more details.
5421
5422- You should have received a copy of the GNU General Public License
5423+ You should have received a copy of the GNU Lesser General Public License
5424 along with this program. If not, see <https://www.gnu.org/licenses/>. */
5425
5426 /* Written by Eric Blake and Bruno Haible. */
5427--- a/gnulib/lib/stdarg.in.h
5428+++ b/gnulib/lib/stdarg.in.h
5429@@ -1,18 +1,18 @@
5430 /* Substitute for and wrapper around <stdarg.h>.
5431 Copyright (C) 2008-2021 Free Software Foundation, Inc.
5432
5433- This program is free software; you can redistribute it and/or modify
5434- it under the terms of the GNU General Public License as published by
5435- the Free Software Foundation; either version 3, or (at your option)
5436- any later version.
5437+ This file is free software: you can redistribute it and/or modify
5438+ it under the terms of the GNU Lesser General Public License as
5439+ published by the Free Software Foundation; either version 2.1 of the
5440+ License, or (at your option) any later version.
5441
5442- This program is distributed in the hope that it will be useful,
5443+ This file is distributed in the hope that it will be useful,
5444 but WITHOUT ANY WARRANTY; without even the implied warranty of
5445 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5446- GNU General Public License for more details.
5447+ GNU Lesser General Public License for more details.
5448
5449- You should have received a copy of the GNU General Public License
5450- along with this program; if not, see <https://www.gnu.org/licenses/>. */
5451+ You should have received a copy of the GNU Lesser General Public License
5452+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
5453
5454 #ifndef _@GUARD_PREFIX@_STDARG_H
5455
5456--- a/gnulib/lib/stdbool.in.h
5457+++ b/gnulib/lib/stdbool.in.h
5458@@ -1,18 +1,18 @@
5459 /* Copyright (C) 2001-2003, 2006-2021 Free Software Foundation, Inc.
5460 Written by Bruno Haible <haible@clisp.cons.org>, 2001.
5461
5462- This program is free software; you can redistribute it and/or modify
5463- it under the terms of the GNU General Public License as published by
5464- the Free Software Foundation; either version 3, or (at your option)
5465- any later version.
5466+ This file is free software: you can redistribute it and/or modify
5467+ it under the terms of the GNU Lesser General Public License as
5468+ published by the Free Software Foundation; either version 2.1 of the
5469+ License, or (at your option) any later version.
5470
5471- This program is distributed in the hope that it will be useful,
5472+ This file is distributed in the hope that it will be useful,
5473 but WITHOUT ANY WARRANTY; without even the implied warranty of
5474 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5475- GNU General Public License for more details.
5476+ GNU Lesser General Public License for more details.
5477
5478- You should have received a copy of the GNU General Public License
5479- along with this program; if not, see <https://www.gnu.org/licenses/>. */
5480+ You should have received a copy of the GNU Lesser General Public License
5481+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
5482
5483 #ifndef _GL_STDBOOL_H
5484 #define _GL_STDBOOL_H
5485--- a/gnulib/lib/stddef.in.h
5486+++ b/gnulib/lib/stddef.in.h
5487@@ -2,18 +2,18 @@
5488
5489 Copyright (C) 2009-2021 Free Software Foundation, Inc.
5490
5491- This program is free software; you can redistribute it and/or modify
5492- it under the terms of the GNU General Public License as published by
5493- the Free Software Foundation; either version 3, or (at your option)
5494- any later version.
5495+ This file is free software: you can redistribute it and/or modify
5496+ it under the terms of the GNU Lesser General Public License as
5497+ published by the Free Software Foundation; either version 2.1 of the
5498+ License, or (at your option) any later version.
5499
5500- This program is distributed in the hope that it will be useful,
5501+ This file is distributed in the hope that it will be useful,
5502 but WITHOUT ANY WARRANTY; without even the implied warranty of
5503 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5504- GNU General Public License for more details.
5505+ GNU Lesser General Public License for more details.
5506
5507- You should have received a copy of the GNU General Public License
5508- along with this program; if not, see <https://www.gnu.org/licenses/>. */
5509+ You should have received a copy of the GNU Lesser General Public License
5510+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
5511
5512 /* Written by Eric Blake. */
5513
5514--- a/gnulib/lib/stdint.in.h
5515+++ b/gnulib/lib/stdint.in.h
5516@@ -2,18 +2,18 @@
5517 Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
5518 This file is part of gnulib.
5519
5520- This program is free software; you can redistribute it and/or modify
5521- it under the terms of the GNU General Public License as published by
5522- the Free Software Foundation; either version 3, or (at your option)
5523- any later version.
5524+ This file is free software: you can redistribute it and/or modify
5525+ it under the terms of the GNU Lesser General Public License as
5526+ published by the Free Software Foundation; either version 2.1 of the
5527+ License, or (at your option) any later version.
5528
5529- This program is distributed in the hope that it will be useful,
5530+ This file is distributed in the hope that it will be useful,
5531 but WITHOUT ANY WARRANTY; without even the implied warranty of
5532 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5533- GNU General Public License for more details.
5534+ GNU Lesser General Public License for more details.
5535
5536- You should have received a copy of the GNU General Public License
5537- along with this program; if not, see <https://www.gnu.org/licenses/>. */
5538+ You should have received a copy of the GNU Lesser General Public License
5539+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
5540
5541 /*
5542 * ISO C 99 <stdint.h> for platforms that lack it.
5543@@ -85,7 +85,7 @@
5544
5545 /* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
5546 wint_t. */
5547-#if @GNULIB_OVERRIDES_WINT_T@
5548+#if @GNULIBHEADERS_OVERRIDE_WINT_T@
5549 # undef WINT_MIN
5550 # undef WINT_MAX
5551 # define WINT_MIN 0x0U
5552@@ -598,7 +598,7 @@ typedef int _verify_intmax_size[sizeof (
5553 /* wint_t limits */
5554 /* If gnulib's <wchar.h> or <wctype.h> overrides wint_t, @WINT_T_SUFFIX@ is not
5555 accurate, therefore use the definitions from above. */
5556-# if !@GNULIB_OVERRIDES_WINT_T@
5557+# if !@GNULIBHEADERS_OVERRIDE_WINT_T@
5558 # undef WINT_MIN
5559 # undef WINT_MAX
5560 # if @HAVE_SIGNED_WINT_T@
5561--- a/gnulib/lib/stdio.in.h
5562+++ b/gnulib/lib/stdio.in.h
5563@@ -2,18 +2,18 @@
5564
5565 Copyright (C) 2004, 2007-2021 Free Software Foundation, Inc.
5566
5567- This program is free software; you can redistribute it and/or modify
5568- it under the terms of the GNU General Public License as published by
5569- the Free Software Foundation; either version 3, or (at your option)
5570- any later version.
5571+ This file is free software: you can redistribute it and/or modify
5572+ it under the terms of the GNU Lesser General Public License as
5573+ published by the Free Software Foundation; either version 2.1 of the
5574+ License, or (at your option) any later version.
5575
5576- This program is distributed in the hope that it will be useful,
5577+ This file is distributed in the hope that it will be useful,
5578 but WITHOUT ANY WARRANTY; without even the implied warranty of
5579 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5580- GNU General Public License for more details.
5581+ GNU Lesser General Public License for more details.
5582
5583- You should have received a copy of the GNU General Public License
5584- along with this program; if not, see <https://www.gnu.org/licenses/>. */
5585+ You should have received a copy of the GNU Lesser General Public License
5586+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
5587
5588 #if __GNUC__ >= 3
5589 @PRAGMA_SYSTEM_HEADER@
5590@@ -242,7 +242,7 @@ _GL_WARN_ON_USE (fclose, "fclose is not
5591 _GL_CXXALIAS_MDA (fcloseall, int, (void));
5592 # else
5593 # if @HAVE_DECL_FCLOSEALL@
5594-# if defined __FreeBSD__
5595+# if defined __FreeBSD__ || defined __DragonFly__
5596 _GL_CXXALIAS_SYS (fcloseall, void, (void));
5597 # else
5598 _GL_CXXALIAS_SYS (fcloseall, int, (void));
5599@@ -1257,6 +1257,7 @@ _GL_CXXALIASWARN (scanf);
5600 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
5601 # define snprintf rpl_snprintf
5602 # endif
5603+# define GNULIB_overrides_snprintf 1
5604 _GL_FUNCDECL_RPL (snprintf, int,
5605 (char *restrict str, size_t size,
5606 const char *restrict format, ...)
5607@@ -1302,6 +1303,7 @@ _GL_WARN_ON_USE (snprintf, "snprintf is
5608 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
5609 # define sprintf rpl_sprintf
5610 # endif
5611+# define GNULIB_overrides_sprintf 1
5612 _GL_FUNCDECL_RPL (sprintf, int,
5613 (char *restrict str, const char *restrict format, ...)
5614 _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
5615@@ -1369,6 +1371,7 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is no
5616 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
5617 # define asprintf rpl_asprintf
5618 # endif
5619+# define GNULIB_overrides_asprintf
5620 _GL_FUNCDECL_RPL (asprintf, int,
5621 (char **result, const char *format, ...)
5622 _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
5623@@ -1390,6 +1393,7 @@ _GL_CXXALIASWARN (asprintf);
5624 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
5625 # define vasprintf rpl_vasprintf
5626 # endif
5627+# define GNULIB_overrides_vasprintf 1
5628 _GL_FUNCDECL_RPL (vasprintf, int,
5629 (char **result, const char *format, va_list args)
5630 _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
5631@@ -1573,6 +1577,7 @@ _GL_CXXALIASWARN (vscanf);
5632 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
5633 # define vsnprintf rpl_vsnprintf
5634 # endif
5635+# define GNULIB_overrides_vsnprintf 1
5636 _GL_FUNCDECL_RPL (vsnprintf, int,
5637 (char *restrict str, size_t size,
5638 const char *restrict format, va_list args)
5639@@ -1609,6 +1614,7 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf i
5640 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
5641 # define vsprintf rpl_vsprintf
5642 # endif
5643+# define GNULIB_overrides_vsprintf 1
5644 _GL_FUNCDECL_RPL (vsprintf, int,
5645 (char *restrict str,
5646 const char *restrict format, va_list args)
5647--- a/gnulib/lib/stdlib.in.h
5648+++ b/gnulib/lib/stdlib.in.h
5649@@ -2,17 +2,17 @@
5650
5651 Copyright (C) 1995, 2001-2004, 2006-2021 Free Software Foundation, Inc.
5652
5653- This program is free software: you can redistribute it and/or modify
5654- it under the terms of the GNU General Public License as published by
5655- the Free Software Foundation; either version 3 of the License, or
5656- (at your option) any later version.
5657+ This file is free software: you can redistribute it and/or modify
5658+ it under the terms of the GNU Lesser General Public License as
5659+ published by the Free Software Foundation; either version 2.1 of the
5660+ License, or (at your option) any later version.
5661
5662- This program is distributed in the hope that it will be useful,
5663+ This file is distributed in the hope that it will be useful,
5664 but WITHOUT ANY WARRANTY; without even the implied warranty of
5665 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5666- GNU General Public License for more details.
5667+ GNU Lesser General Public License for more details.
5668
5669- You should have received a copy of the GNU General Public License
5670+ You should have received a copy of the GNU Lesser General Public License
5671 along with this program. If not, see <https://www.gnu.org/licenses/>. */
5672
5673 #if __GNUC__ >= 3
5674@@ -1032,12 +1032,23 @@ _GL_WARN_ON_USE (realloc, "realloc is no
5675
5676
5677 #if @GNULIB_REALLOCARRAY@
5678-# if ! @HAVE_REALLOCARRAY@
5679+# if @REPLACE_REALLOCARRAY@
5680+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
5681+# undef reallocarray
5682+# define reallocarray rpl_reallocarray
5683+# endif
5684+_GL_FUNCDECL_RPL (reallocarray, void *,
5685+ (void *ptr, size_t nmemb, size_t size));
5686+_GL_CXXALIAS_RPL (reallocarray, void *,
5687+ (void *ptr, size_t nmemb, size_t size));
5688+# else
5689+# if ! @HAVE_REALLOCARRAY@
5690 _GL_FUNCDECL_SYS (reallocarray, void *,
5691 (void *ptr, size_t nmemb, size_t size));
5692-# endif
5693+# endif
5694 _GL_CXXALIAS_SYS (reallocarray, void *,
5695 (void *ptr, size_t nmemb, size_t size));
5696+# endif
5697 _GL_CXXALIASWARN (reallocarray);
5698 #elif defined GNULIB_POSIXCHECK
5699 # undef reallocarray
5700@@ -1202,6 +1213,47 @@ _GL_WARN_ON_USE (strtold, "strtold is un
5701 # endif
5702 #endif
5703
5704+#if @GNULIB_STRTOL@
5705+/* Parse a signed integer whose textual representation starts at STRING.
5706+ The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
5707+ it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
5708+ "0x").
5709+ If ENDPTR is not NULL, the address of the first byte after the integer is
5710+ stored in *ENDPTR.
5711+ Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is set
5712+ to ERANGE. */
5713+# if @REPLACE_STRTOL@
5714+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
5715+# define strtol rpl_strtol
5716+# endif
5717+# define GNULIB_defined_strtol_function 1
5718+_GL_FUNCDECL_RPL (strtol, long,
5719+ (const char *restrict string, char **restrict endptr,
5720+ int base)
5721+ _GL_ARG_NONNULL ((1)));
5722+_GL_CXXALIAS_RPL (strtol, long,
5723+ (const char *restrict string, char **restrict endptr,
5724+ int base));
5725+# else
5726+# if !@HAVE_STRTOL@
5727+_GL_FUNCDECL_SYS (strtol, long,
5728+ (const char *restrict string, char **restrict endptr,
5729+ int base)
5730+ _GL_ARG_NONNULL ((1)));
5731+# endif
5732+_GL_CXXALIAS_SYS (strtol, long,
5733+ (const char *restrict string, char **restrict endptr,
5734+ int base));
5735+# endif
5736+_GL_CXXALIASWARN (strtol);
5737+#elif defined GNULIB_POSIXCHECK
5738+# undef strtol
5739+# if HAVE_RAW_DECL_STRTOL
5740+_GL_WARN_ON_USE (strtol, "strtol is unportable - "
5741+ "use gnulib module strtol for portability");
5742+# endif
5743+#endif
5744+
5745 #if @GNULIB_STRTOLL@
5746 /* Parse a signed integer whose textual representation starts at STRING.
5747 The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
5748@@ -1211,15 +1263,29 @@ _GL_WARN_ON_USE (strtold, "strtold is un
5749 stored in *ENDPTR.
5750 Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
5751 to ERANGE. */
5752-# if !@HAVE_STRTOLL@
5753+# if @REPLACE_STRTOLL@
5754+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
5755+# define strtoll rpl_strtoll
5756+# endif
5757+# define GNULIB_defined_strtoll_function 1
5758+_GL_FUNCDECL_RPL (strtoll, long long,
5759+ (const char *restrict string, char **restrict endptr,
5760+ int base)
5761+ _GL_ARG_NONNULL ((1)));
5762+_GL_CXXALIAS_RPL (strtoll, long long,
5763+ (const char *restrict string, char **restrict endptr,
5764+ int base));
5765+# else
5766+# if !@HAVE_STRTOLL@
5767 _GL_FUNCDECL_SYS (strtoll, long long,
5768 (const char *restrict string, char **restrict endptr,
5769 int base)
5770 _GL_ARG_NONNULL ((1)));
5771-# endif
5772+# endif
5773 _GL_CXXALIAS_SYS (strtoll, long long,
5774 (const char *restrict string, char **restrict endptr,
5775 int base));
5776+# endif
5777 _GL_CXXALIASWARN (strtoll);
5778 #elif defined GNULIB_POSIXCHECK
5779 # undef strtoll
5780@@ -1229,6 +1295,46 @@ _GL_WARN_ON_USE (strtoll, "strtoll is un
5781 # endif
5782 #endif
5783
5784+#if @GNULIB_STRTOUL@
5785+/* Parse an unsigned integer whose textual representation starts at STRING.
5786+ The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
5787+ it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
5788+ "0x").
5789+ If ENDPTR is not NULL, the address of the first byte after the integer is
5790+ stored in *ENDPTR.
5791+ Upon overflow, the return value is ULONG_MAX, and errno is set to ERANGE. */
5792+# if @REPLACE_STRTOUL@
5793+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
5794+# define strtoul rpl_strtoul
5795+# endif
5796+# define GNULIB_defined_strtoul_function 1
5797+_GL_FUNCDECL_RPL (strtoul, unsigned long,
5798+ (const char *restrict string, char **restrict endptr,
5799+ int base)
5800+ _GL_ARG_NONNULL ((1)));
5801+_GL_CXXALIAS_RPL (strtoul, unsigned long,
5802+ (const char *restrict string, char **restrict endptr,
5803+ int base));
5804+# else
5805+# if !@HAVE_STRTOUL@
5806+_GL_FUNCDECL_SYS (strtoul, unsigned long,
5807+ (const char *restrict string, char **restrict endptr,
5808+ int base)
5809+ _GL_ARG_NONNULL ((1)));
5810+# endif
5811+_GL_CXXALIAS_SYS (strtoul, unsigned long,
5812+ (const char *restrict string, char **restrict endptr,
5813+ int base));
5814+# endif
5815+_GL_CXXALIASWARN (strtoul);
5816+#elif defined GNULIB_POSIXCHECK
5817+# undef strtoul
5818+# if HAVE_RAW_DECL_STRTOUL
5819+_GL_WARN_ON_USE (strtoul, "strtoul is unportable - "
5820+ "use gnulib module strtoul for portability");
5821+# endif
5822+#endif
5823+
5824 #if @GNULIB_STRTOULL@
5825 /* Parse an unsigned integer whose textual representation starts at STRING.
5826 The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
5827@@ -1238,15 +1344,29 @@ _GL_WARN_ON_USE (strtoll, "strtoll is un
5828 stored in *ENDPTR.
5829 Upon overflow, the return value is ULLONG_MAX, and errno is set to
5830 ERANGE. */
5831-# if !@HAVE_STRTOULL@
5832+# if @REPLACE_STRTOULL@
5833+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
5834+# define strtoull rpl_strtoull
5835+# endif
5836+# define GNULIB_defined_strtoull_function 1
5837+_GL_FUNCDECL_RPL (strtoull, unsigned long long,
5838+ (const char *restrict string, char **restrict endptr,
5839+ int base)
5840+ _GL_ARG_NONNULL ((1)));
5841+_GL_CXXALIAS_RPL (strtoull, unsigned long long,
5842+ (const char *restrict string, char **restrict endptr,
5843+ int base));
5844+# else
5845+# if !@HAVE_STRTOULL@
5846 _GL_FUNCDECL_SYS (strtoull, unsigned long long,
5847 (const char *restrict string, char **restrict endptr,
5848 int base)
5849 _GL_ARG_NONNULL ((1)));
5850-# endif
5851+# endif
5852 _GL_CXXALIAS_SYS (strtoull, unsigned long long,
5853 (const char *restrict string, char **restrict endptr,
5854 int base));
5855+# endif
5856 _GL_CXXALIASWARN (strtoull);
5857 #elif defined GNULIB_POSIXCHECK
5858 # undef strtoull
5859--- a/gnulib/lib/stpcpy.c
5860+++ b/gnulib/lib/stpcpy.c
5861@@ -5,17 +5,17 @@
5862 NOTE: The canonical source of this file is maintained with the GNU C Library.
5863 Bugs can be reported to bug-glibc@prep.ai.mit.edu.
5864
5865- This program is free software: you can redistribute it and/or modify it
5866- under the terms of the GNU General Public License as published by the
5867- Free Software Foundation; either version 3 of the License, or any
5868- later version.
5869+ This file is free software: you can redistribute it and/or modify
5870+ it under the terms of the GNU Lesser General Public License as
5871+ published by the Free Software Foundation; either version 2.1 of the
5872+ License, or (at your option) any later version.
5873
5874- This program is distributed in the hope that it will be useful,
5875+ This file is distributed in the hope that it will be useful,
5876 but WITHOUT ANY WARRANTY; without even the implied warranty of
5877 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5878- GNU General Public License for more details.
5879+ GNU Lesser General Public License for more details.
5880
5881- You should have received a copy of the GNU General Public License
5882+ You should have received a copy of the GNU Lesser General Public License
5883 along with this program. If not, see <https://www.gnu.org/licenses/>. */
5884
5885 #include <config.h>
5886--- a/gnulib/lib/str-kmp.h
5887+++ b/gnulib/lib/str-kmp.h
5888@@ -3,18 +3,26 @@
5889 Copyright (C) 2005-2021 Free Software Foundation, Inc.
5890 Written by Bruno Haible <bruno@clisp.org>, 2005.
5891
5892- This program is free software; you can redistribute it and/or modify
5893- it under the terms of the GNU General Public License as published by
5894- the Free Software Foundation; either version 3, or (at your option)
5895- any later version.
5896+ This file is free software.
5897+ It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+".
5898+ You can redistribute it and/or modify it under either
5899+ - the terms of the GNU Lesser General Public License as published
5900+ by the Free Software Foundation; either version 3, or (at your
5901+ option) any later version, or
5902+ - the terms of the GNU General Public License as published by the
5903+ Free Software Foundation; either version 2, or (at your option)
5904+ any later version, or
5905+ - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+".
5906
5907- This program is distributed in the hope that it will be useful,
5908+ This file is distributed in the hope that it will be useful,
5909 but WITHOUT ANY WARRANTY; without even the implied warranty of
5910- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5911- GNU General Public License for more details.
5912+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5913+ Lesser General Public License and the GNU General Public License
5914+ for more details.
5915
5916- You should have received a copy of the GNU General Public License
5917- along with this program; if not, see <https://www.gnu.org/licenses/>. */
5918+ You should have received a copy of the GNU Lesser General Public
5919+ License and of the GNU General Public License along with this
5920+ program. If not, see <https://www.gnu.org/licenses/>. */
5921
5922 /* Before including this file, you need to define:
5923 UNIT The element type of the needle and haystack.
5924--- a/gnulib/lib/str-two-way.h
5925+++ b/gnulib/lib/str-two-way.h
5926@@ -3,18 +3,18 @@
5927 This file is part of the GNU C Library.
5928 Written by Eric Blake <ebb9@byu.net>, 2008.
5929
5930- This program is free software; you can redistribute it and/or modify
5931- it under the terms of the GNU General Public License as published by
5932- the Free Software Foundation; either version 3, or (at your option)
5933- any later version.
5934+ This file is free software: you can redistribute it and/or modify
5935+ it under the terms of the GNU Lesser General Public License as
5936+ published by the Free Software Foundation; either version 2.1 of the
5937+ License, or (at your option) any later version.
5938
5939- This program is distributed in the hope that it will be useful,
5940+ This file is distributed in the hope that it will be useful,
5941 but WITHOUT ANY WARRANTY; without even the implied warranty of
5942 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5943- GNU General Public License for more details.
5944+ GNU Lesser General Public License for more details.
5945
5946- You should have received a copy of the GNU General Public License along
5947- with this program; if not, see <https://www.gnu.org/licenses/>. */
5948+ You should have received a copy of the GNU Lesser General Public License
5949+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
5950
5951 /* Before including this file, you need to include <config.h> and
5952 <string.h>, and define:
5953--- a/gnulib/lib/strcasecmp.c
5954+++ b/gnulib/lib/strcasecmp.c
5955@@ -1,18 +1,18 @@
5956 /* Case-insensitive string comparison function.
5957 Copyright (C) 1998-1999, 2005-2007, 2009-2021 Free Software Foundation, Inc.
5958
5959- This program is free software; you can redistribute it and/or modify
5960- it under the terms of the GNU General Public License as published by
5961- the Free Software Foundation; either version 3, or (at your option)
5962- any later version.
5963+ This file is free software: you can redistribute it and/or modify
5964+ it under the terms of the GNU Lesser General Public License as
5965+ published by the Free Software Foundation; either version 2.1 of the
5966+ License, or (at your option) any later version.
5967
5968- This program is distributed in the hope that it will be useful,
5969+ This file is distributed in the hope that it will be useful,
5970 but WITHOUT ANY WARRANTY; without even the implied warranty of
5971 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5972- GNU General Public License for more details.
5973+ GNU Lesser General Public License for more details.
5974
5975- You should have received a copy of the GNU General Public License
5976- along with this program; if not, see <https://www.gnu.org/licenses/>. */
5977+ You should have received a copy of the GNU Lesser General Public License
5978+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
5979
5980 #include <config.h>
5981
5982--- a/gnulib/lib/strcasestr.c
5983+++ b/gnulib/lib/strcasestr.c
5984@@ -2,18 +2,18 @@
5985 Copyright (C) 2005-2021 Free Software Foundation, Inc.
5986 Written by Bruno Haible <bruno@clisp.org>, 2005.
5987
5988- This program is free software; you can redistribute it and/or modify
5989- it under the terms of the GNU General Public License as published by
5990- the Free Software Foundation; either version 3, or (at your option)
5991- any later version.
5992+ This file is free software: you can redistribute it and/or modify
5993+ it under the terms of the GNU Lesser General Public License as
5994+ published by the Free Software Foundation; either version 2.1 of the
5995+ License, or (at your option) any later version.
5996
5997- This program is distributed in the hope that it will be useful,
5998+ This file is distributed in the hope that it will be useful,
5999 but WITHOUT ANY WARRANTY; without even the implied warranty of
6000 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6001- GNU General Public License for more details.
6002+ GNU Lesser General Public License for more details.
6003
6004- You should have received a copy of the GNU General Public License
6005- along with this program; if not, see <https://www.gnu.org/licenses/>. */
6006+ You should have received a copy of the GNU Lesser General Public License
6007+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6008
6009 #include <config.h>
6010
6011--- a/gnulib/lib/strdup.c
6012+++ b/gnulib/lib/strdup.c
6013@@ -3,18 +3,18 @@
6014
6015 This file is part of the GNU C Library.
6016
6017- This program is free software; you can redistribute it and/or modify
6018- it under the terms of the GNU General Public License as published by
6019- the Free Software Foundation; either version 3, or (at your option)
6020- any later version.
6021+ This file is free software: you can redistribute it and/or modify
6022+ it under the terms of the GNU Lesser General Public License as
6023+ published by the Free Software Foundation; either version 2.1 of the
6024+ License, or (at your option) any later version.
6025
6026- This program is distributed in the hope that it will be useful,
6027+ This file is distributed in the hope that it will be useful,
6028 but WITHOUT ANY WARRANTY; without even the implied warranty of
6029 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6030- GNU General Public License for more details.
6031+ GNU Lesser General Public License for more details.
6032
6033- You should have received a copy of the GNU General Public License along
6034- with this program; if not, see <https://www.gnu.org/licenses/>. */
6035+ You should have received a copy of the GNU Lesser General Public License
6036+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6037
6038 #ifndef _LIBC
6039 # include <config.h>
6040--- a/gnulib/lib/streq.h
6041+++ b/gnulib/lib/streq.h
6042@@ -1,17 +1,17 @@
6043 /* Optimized string comparison.
6044 Copyright (C) 2001-2002, 2007, 2009-2021 Free Software Foundation, Inc.
6045
6046- This program is free software: you can redistribute it and/or modify it
6047- under the terms of the GNU General Public License as published
6048- by the Free Software Foundation; either version 3 of the License, or
6049- (at your option) any later version.
6050+ This file is free software: you can redistribute it and/or modify
6051+ it under the terms of the GNU Lesser General Public License as
6052+ published by the Free Software Foundation; either version 2.1 of the
6053+ License, or (at your option) any later version.
6054
6055- This program is distributed in the hope that it will be useful,
6056+ This file is distributed in the hope that it will be useful,
6057 but WITHOUT ANY WARRANTY; without even the implied warranty of
6058- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6059- General Public License for more details.
6060+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6061+ GNU Lesser General Public License for more details.
6062
6063- You should have received a copy of the GNU General Public License
6064+ You should have received a copy of the GNU Lesser General Public License
6065 along with this program. If not, see <https://www.gnu.org/licenses/>. */
6066
6067 /* Written by Bruno Haible <bruno@clisp.org>. */
6068--- a/gnulib/lib/strerror-override.c
6069+++ b/gnulib/lib/strerror-override.c
6070@@ -2,17 +2,17 @@
6071
6072 Copyright (C) 2010-2021 Free Software Foundation, Inc.
6073
6074- This program is free software: you can redistribute it and/or modify
6075- it under the terms of the GNU General Public License as published by
6076- the Free Software Foundation; either version 3 of the License, or
6077- (at your option) any later version.
6078+ This file is free software: you can redistribute it and/or modify
6079+ it under the terms of the GNU Lesser General Public License as
6080+ published by the Free Software Foundation; either version 2.1 of the
6081+ License, or (at your option) any later version.
6082
6083- This program is distributed in the hope that it will be useful,
6084+ This file is distributed in the hope that it will be useful,
6085 but WITHOUT ANY WARRANTY; without even the implied warranty of
6086 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6087- GNU General Public License for more details.
6088+ GNU Lesser General Public License for more details.
6089
6090- You should have received a copy of the GNU General Public License
6091+ You should have received a copy of the GNU Lesser General Public License
6092 along with this program. If not, see <https://www.gnu.org/licenses/>. */
6093
6094 /* Written by Bruno Haible <bruno@clisp.org>, 2010. */
6095@@ -29,6 +29,8 @@
6096 # endif
6097 #endif
6098
6099+#if !GNULIB_defined_strerror_override_macro
6100+
6101 /* If ERRNUM maps to an errno value defined by gnulib, return a string
6102 describing the error. Otherwise return NULL. */
6103 const char *
6104@@ -37,12 +39,12 @@ strerror_override (int errnum)
6105 /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
6106 switch (errnum)
6107 {
6108-#if REPLACE_STRERROR_0
6109+# if REPLACE_STRERROR_0
6110 case 0:
6111 return "Success";
6112-#endif
6113+# endif
6114
6115-#if GNULIB_defined_ESOCK /* native Windows platforms with older <errno.h> */
6116+# if GNULIB_defined_ESOCK /* native Windows platforms with older <errno.h> */
6117 case EINPROGRESS:
6118 return "Operation now in progress";
6119 case EALREADY:
6120@@ -89,8 +91,8 @@ strerror_override (int errnum)
6121 return "No route to host";
6122 case EWOULDBLOCK:
6123 return "Operation would block";
6124-#endif
6125-#if GNULIB_defined_ESTREAMS /* native Windows platforms with older <errno.h> */
6126+# endif
6127+# if GNULIB_defined_ESTREAMS /* native Windows platforms with older <errno.h> */
6128 case ETXTBSY:
6129 return "Text file busy";
6130 case ENODATA:
6131@@ -103,8 +105,8 @@ strerror_override (int errnum)
6132 return "Timer expired";
6133 case EOTHER:
6134 return "Other error";
6135-#endif
6136-#if GNULIB_defined_EWINSOCK /* native Windows platforms */
6137+# endif
6138+# if GNULIB_defined_EWINSOCK /* native Windows platforms */
6139 case ESOCKTNOSUPPORT:
6140 return "Socket type not supported";
6141 case EPFNOSUPPORT:
6142@@ -125,7 +127,7 @@ strerror_override (int errnum)
6143 return "Stale NFS file handle";
6144 case EREMOTE:
6145 return "Object is remote";
6146-# if HAVE_WINSOCK2_H
6147+# if HAVE_WINSOCK2_H
6148 /* WSA_INVALID_HANDLE maps to EBADF */
6149 /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
6150 /* WSA_INVALID_PARAMETER maps to EINVAL */
6151@@ -213,90 +215,92 @@ strerror_override (int errnum)
6152 case WSANO_DATA:
6153 return "Valid name, no data record of requested type";
6154 /* WSA_QOS_* omitted */
6155+# endif
6156 # endif
6157-#endif
6158
6159-#if GNULIB_defined_ENOMSG
6160+# if GNULIB_defined_ENOMSG
6161 case ENOMSG:
6162 return "No message of desired type";
6163-#endif
6164+# endif
6165
6166-#if GNULIB_defined_EIDRM
6167+# if GNULIB_defined_EIDRM
6168 case EIDRM:
6169 return "Identifier removed";
6170-#endif
6171+# endif
6172
6173-#if GNULIB_defined_ENOLINK
6174+# if GNULIB_defined_ENOLINK
6175 case ENOLINK:
6176 return "Link has been severed";
6177-#endif
6178+# endif
6179
6180-#if GNULIB_defined_EPROTO
6181+# if GNULIB_defined_EPROTO
6182 case EPROTO:
6183 return "Protocol error";
6184-#endif
6185+# endif
6186
6187-#if GNULIB_defined_EMULTIHOP
6188+# if GNULIB_defined_EMULTIHOP
6189 case EMULTIHOP:
6190 return "Multihop attempted";
6191-#endif
6192+# endif
6193
6194-#if GNULIB_defined_EBADMSG
6195+# if GNULIB_defined_EBADMSG
6196 case EBADMSG:
6197 return "Bad message";
6198-#endif
6199+# endif
6200
6201-#if GNULIB_defined_EOVERFLOW
6202+# if GNULIB_defined_EOVERFLOW
6203 case EOVERFLOW:
6204 return "Value too large for defined data type";
6205-#endif
6206+# endif
6207
6208-#if GNULIB_defined_ENOTSUP
6209+# if GNULIB_defined_ENOTSUP
6210 case ENOTSUP:
6211 return "Not supported";
6212-#endif
6213+# endif
6214
6215-#if GNULIB_defined_ENETRESET
6216+# if GNULIB_defined_ENETRESET
6217 case ENETRESET:
6218 return "Network dropped connection on reset";
6219-#endif
6220+# endif
6221
6222-#if GNULIB_defined_ECONNABORTED
6223+# if GNULIB_defined_ECONNABORTED
6224 case ECONNABORTED:
6225 return "Software caused connection abort";
6226-#endif
6227+# endif
6228
6229-#if GNULIB_defined_ESTALE
6230+# if GNULIB_defined_ESTALE
6231 case ESTALE:
6232 return "Stale NFS file handle";
6233-#endif
6234+# endif
6235
6236-#if GNULIB_defined_EDQUOT
6237+# if GNULIB_defined_EDQUOT
6238 case EDQUOT:
6239 return "Disk quota exceeded";
6240-#endif
6241+# endif
6242
6243-#if GNULIB_defined_ECANCELED
6244+# if GNULIB_defined_ECANCELED
6245 case ECANCELED:
6246 return "Operation canceled";
6247-#endif
6248+# endif
6249
6250-#if GNULIB_defined_EOWNERDEAD
6251+# if GNULIB_defined_EOWNERDEAD
6252 case EOWNERDEAD:
6253 return "Owner died";
6254-#endif
6255+# endif
6256
6257-#if GNULIB_defined_ENOTRECOVERABLE
6258+# if GNULIB_defined_ENOTRECOVERABLE
6259 case ENOTRECOVERABLE:
6260 return "State not recoverable";
6261-#endif
6262+# endif
6263
6264-#if GNULIB_defined_EILSEQ
6265+# if GNULIB_defined_EILSEQ
6266 case EILSEQ:
6267 return "Invalid or incomplete multibyte or wide character";
6268-#endif
6269+# endif
6270
6271 default:
6272 return NULL;
6273 }
6274 }
6275+
6276+#endif
6277--- a/gnulib/lib/strerror-override.h
6278+++ b/gnulib/lib/strerror-override.h
6279@@ -2,17 +2,17 @@
6280
6281 Copyright (C) 2010-2021 Free Software Foundation, Inc.
6282
6283- This program is free software: you can redistribute it and/or modify
6284- it under the terms of the GNU General Public License as published by
6285- the Free Software Foundation; either version 3 of the License, or
6286- (at your option) any later version.
6287+ This file is free software: you can redistribute it and/or modify
6288+ it under the terms of the GNU Lesser General Public License as
6289+ published by the Free Software Foundation; either version 2.1 of the
6290+ License, or (at your option) any later version.
6291
6292- This program is distributed in the hope that it will be useful,
6293+ This file is distributed in the hope that it will be useful,
6294 but WITHOUT ANY WARRANTY; without even the implied warranty of
6295 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6296- GNU General Public License for more details.
6297+ GNU Lesser General Public License for more details.
6298
6299- You should have received a copy of the GNU General Public License
6300+ You should have received a copy of the GNU Lesser General Public License
6301 along with this program. If not, see <https://www.gnu.org/licenses/>. */
6302
6303 #ifndef _GL_STRERROR_OVERRIDE_H
6304@@ -51,6 +51,7 @@
6305 extern const char *strerror_override (int errnum) _GL_ATTRIBUTE_CONST;
6306 # else
6307 # define strerror_override(ignored) NULL
6308+# define GNULIB_defined_strerror_override_macro 1
6309 # endif
6310
6311 #endif /* _GL_STRERROR_OVERRIDE_H */
6312--- a/gnulib/lib/strerror.c
6313+++ b/gnulib/lib/strerror.c
6314@@ -2,17 +2,17 @@
6315
6316 Copyright (C) 2007-2021 Free Software Foundation, Inc.
6317
6318- This program is free software: you can redistribute it and/or modify
6319- it under the terms of the GNU General Public License as published by
6320- the Free Software Foundation; either version 3 of the License, or
6321- (at your option) any later version.
6322+ This file is free software: you can redistribute it and/or modify
6323+ it under the terms of the GNU Lesser General Public License as
6324+ published by the Free Software Foundation; either version 2.1 of the
6325+ License, or (at your option) any later version.
6326
6327- This program is distributed in the hope that it will be useful,
6328+ This file is distributed in the hope that it will be useful,
6329 but WITHOUT ANY WARRANTY; without even the implied warranty of
6330 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6331- GNU General Public License for more details.
6332+ GNU Lesser General Public License for more details.
6333
6334- You should have received a copy of the GNU General Public License
6335+ You should have received a copy of the GNU Lesser General Public License
6336 along with this program. If not, see <https://www.gnu.org/licenses/>. */
6337
6338 #include <config.h>
6339--- a/gnulib/lib/string.in.h
6340+++ b/gnulib/lib/string.in.h
6341@@ -2,18 +2,18 @@
6342
6343 Copyright (C) 1995-1996, 2001-2021 Free Software Foundation, Inc.
6344
6345- This program is free software; you can redistribute it and/or modify
6346- it under the terms of the GNU General Public License as published by
6347- the Free Software Foundation; either version 3, or (at your option)
6348- any later version.
6349+ This file is free software: you can redistribute it and/or modify
6350+ it under the terms of the GNU Lesser General Public License as
6351+ published by the Free Software Foundation; either version 2.1 of the
6352+ License, or (at your option) any later version.
6353
6354- This program is distributed in the hope that it will be useful,
6355+ This file is distributed in the hope that it will be useful,
6356 but WITHOUT ANY WARRANTY; without even the implied warranty of
6357 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6358- GNU General Public License for more details.
6359+ GNU Lesser General Public License for more details.
6360
6361- You should have received a copy of the GNU General Public License
6362- along with this program; if not, see <https://www.gnu.org/licenses/>. */
6363+ You should have received a copy of the GNU Lesser General Public License
6364+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6365
6366 #if __GNUC__ >= 3
6367 @PRAGMA_SYSTEM_HEADER@
6368@@ -446,7 +446,7 @@ _GL_WARN_ON_USE (strdup, "strdup is unpo
6369 #elif @GNULIB_MDA_STRDUP@
6370 /* On native Windows, map 'creat' to '_creat', so that -loldnames is not
6371 required. In C++ with GNULIB_NAMESPACE, avoid differences between
6372- platforms by defining GNULIB_NAMESPACE::creat always. */
6373+ platforms by defining GNULIB_NAMESPACE::strdup always. */
6374 # if defined _WIN32 && !defined __CYGWIN__
6375 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
6376 # undef strdup
6377--- a/gnulib/lib/strings.in.h
6378+++ b/gnulib/lib/strings.in.h
6379@@ -2,18 +2,18 @@
6380
6381 Copyright (C) 2007-2021 Free Software Foundation, Inc.
6382
6383- This program is free software; you can redistribute it and/or modify
6384- it under the terms of the GNU General Public License as published by
6385- the Free Software Foundation; either version 3, or (at your option)
6386- any later version.
6387+ This file is free software: you can redistribute it and/or modify
6388+ it under the terms of the GNU Lesser General Public License as
6389+ published by the Free Software Foundation; either version 2.1 of the
6390+ License, or (at your option) any later version.
6391
6392- This program is distributed in the hope that it will be useful,
6393+ This file is distributed in the hope that it will be useful,
6394 but WITHOUT ANY WARRANTY; without even the implied warranty of
6395 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6396- GNU General Public License for more details.
6397+ GNU Lesser General Public License for more details.
6398
6399- You should have received a copy of the GNU General Public License
6400- along with this program; if not, see <https://www.gnu.org/licenses/>. */
6401+ You should have received a copy of the GNU Lesser General Public License
6402+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6403
6404 #ifndef _@GUARD_PREFIX@_STRINGS_H
6405
6406--- a/gnulib/lib/strncasecmp.c
6407+++ b/gnulib/lib/strncasecmp.c
6408@@ -1,18 +1,18 @@
6409 /* strncasecmp.c -- case insensitive string comparator
6410 Copyright (C) 1998-1999, 2005-2007, 2009-2021 Free Software Foundation, Inc.
6411
6412- This program is free software; you can redistribute it and/or modify
6413- it under the terms of the GNU General Public License as published by
6414- the Free Software Foundation; either version 3, or (at your option)
6415- any later version.
6416+ This file is free software: you can redistribute it and/or modify
6417+ it under the terms of the GNU Lesser General Public License as
6418+ published by the Free Software Foundation; either version 2.1 of the
6419+ License, or (at your option) any later version.
6420
6421- This program is distributed in the hope that it will be useful,
6422+ This file is distributed in the hope that it will be useful,
6423 but WITHOUT ANY WARRANTY; without even the implied warranty of
6424 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6425- GNU General Public License for more details.
6426+ GNU Lesser General Public License for more details.
6427
6428- You should have received a copy of the GNU General Public License
6429- along with this program; if not, see <https://www.gnu.org/licenses/>. */
6430+ You should have received a copy of the GNU Lesser General Public License
6431+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6432
6433 #include <config.h>
6434
6435--- a/gnulib/lib/strndup.c
6436+++ b/gnulib/lib/strndup.c
6437@@ -3,18 +3,18 @@
6438 Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2021 Free Software
6439 Foundation, Inc.
6440
6441- This program is free software; you can redistribute it and/or modify it
6442- under the terms of the GNU General Public License as published by the
6443- Free Software Foundation; either version 3, or (at your option) any
6444- later version.
6445+ This file is free software: you can redistribute it and/or modify
6446+ it under the terms of the GNU Lesser General Public License as
6447+ published by the Free Software Foundation; either version 2.1 of the
6448+ License, or (at your option) any later version.
6449
6450- This program is distributed in the hope that it will be useful,
6451+ This file is distributed in the hope that it will be useful,
6452 but WITHOUT ANY WARRANTY; without even the implied warranty of
6453 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6454- GNU General Public License for more details.
6455+ GNU Lesser General Public License for more details.
6456
6457- You should have received a copy of the GNU General Public License
6458- along with this program; if not, see <https://www.gnu.org/licenses/>. */
6459+ You should have received a copy of the GNU Lesser General Public License
6460+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6461
6462 #include <config.h>
6463
6464--- a/gnulib/lib/strnlen.c
6465+++ b/gnulib/lib/strnlen.c
6466@@ -2,18 +2,18 @@
6467 Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc.
6468 Written by Simon Josefsson.
6469
6470- This program is free software; you can redistribute it and/or modify
6471- it under the terms of the GNU General Public License as published by
6472- the Free Software Foundation; either version 3, or (at your option)
6473- any later version.
6474+ This file is free software: you can redistribute it and/or modify
6475+ it under the terms of the GNU Lesser General Public License as
6476+ published by the Free Software Foundation; either version 2.1 of the
6477+ License, or (at your option) any later version.
6478
6479- This program is distributed in the hope that it will be useful,
6480+ This file is distributed in the hope that it will be useful,
6481 but WITHOUT ANY WARRANTY; without even the implied warranty of
6482 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6483- GNU General Public License for more details.
6484+ GNU Lesser General Public License for more details.
6485
6486- You should have received a copy of the GNU General Public License
6487- along with this program; if not, see <https://www.gnu.org/licenses/>. */
6488+ You should have received a copy of the GNU Lesser General Public License
6489+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6490
6491 #include <config.h>
6492
6493--- a/gnulib/lib/strnlen1.c
6494+++ b/gnulib/lib/strnlen1.c
6495@@ -1,17 +1,17 @@
6496 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
6497 Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
6498
6499- This program is free software: you can redistribute it and/or modify
6500- it under the terms of the GNU General Public License as published by
6501- the Free Software Foundation; either version 3 of the License, or
6502- (at your option) any later version.
6503+ This file is free software: you can redistribute it and/or modify
6504+ it under the terms of the GNU Lesser General Public License as
6505+ published by the Free Software Foundation; either version 2.1 of the
6506+ License, or (at your option) any later version.
6507
6508- This program is distributed in the hope that it will be useful,
6509+ This file is distributed in the hope that it will be useful,
6510 but WITHOUT ANY WARRANTY; without even the implied warranty of
6511 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6512- GNU General Public License for more details.
6513+ GNU Lesser General Public License for more details.
6514
6515- You should have received a copy of the GNU General Public License
6516+ You should have received a copy of the GNU Lesser General Public License
6517 along with this program. If not, see <https://www.gnu.org/licenses/>. */
6518
6519 #include <config.h>
6520--- a/gnulib/lib/strnlen1.h
6521+++ b/gnulib/lib/strnlen1.h
6522@@ -1,17 +1,17 @@
6523 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
6524 Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc.
6525
6526- This program is free software: you can redistribute it and/or modify
6527- it under the terms of the GNU General Public License as published by
6528- the Free Software Foundation; either version 3 of the License, or
6529- (at your option) any later version.
6530+ This file is free software: you can redistribute it and/or modify
6531+ it under the terms of the GNU Lesser General Public License as
6532+ published by the Free Software Foundation; either version 2.1 of the
6533+ License, or (at your option) any later version.
6534
6535- This program is distributed in the hope that it will be useful,
6536+ This file is distributed in the hope that it will be useful,
6537 but WITHOUT ANY WARRANTY; without even the implied warranty of
6538 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6539- GNU General Public License for more details.
6540+ GNU Lesser General Public License for more details.
6541
6542- You should have received a copy of the GNU General Public License
6543+ You should have received a copy of the GNU Lesser General Public License
6544 along with this program. If not, see <https://www.gnu.org/licenses/>. */
6545
6546 #ifndef _STRNLEN1_H
6547--- a/gnulib/lib/strstr.c
6548+++ b/gnulib/lib/strstr.c
6549@@ -2,18 +2,18 @@
6550 Foundation, Inc.
6551 This file is part of the GNU C Library.
6552
6553- This program is free software; you can redistribute it and/or modify
6554- it under the terms of the GNU General Public License as published by
6555- the Free Software Foundation; either version 3, or (at your option)
6556- any later version.
6557+ This file is free software: you can redistribute it and/or modify
6558+ it under the terms of the GNU Lesser General Public License as
6559+ published by the Free Software Foundation; either version 2.1 of the
6560+ License, or (at your option) any later version.
6561
6562- This program is distributed in the hope that it will be useful,
6563+ This file is distributed in the hope that it will be useful,
6564 but WITHOUT ANY WARRANTY; without even the implied warranty of
6565 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6566- GNU General Public License for more details.
6567+ GNU Lesser General Public License for more details.
6568
6569- You should have received a copy of the GNU General Public License along
6570- with this program; if not, see <https://www.gnu.org/licenses/>. */
6571+ You should have received a copy of the GNU Lesser General Public License
6572+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6573
6574 /* This particular implementation was written by Eric Blake, 2008. */
6575
6576--- a/gnulib/lib/sys_stat.in.h
6577+++ b/gnulib/lib/sys_stat.in.h
6578@@ -1,18 +1,18 @@
6579 /* Provide a more complete sys/stat.h header file.
6580 Copyright (C) 2005-2021 Free Software Foundation, Inc.
6581
6582- This program is free software; you can redistribute it and/or modify
6583- it under the terms of the GNU General Public License as published by
6584- the Free Software Foundation; either version 3, or (at your option)
6585- any later version.
6586+ This file is free software: you can redistribute it and/or modify
6587+ it under the terms of the GNU Lesser General Public License as
6588+ published by the Free Software Foundation; either version 2.1 of the
6589+ License, or (at your option) any later version.
6590
6591- This program is distributed in the hope that it will be useful,
6592+ This file is distributed in the hope that it will be useful,
6593 but WITHOUT ANY WARRANTY; without even the implied warranty of
6594 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6595- GNU General Public License for more details.
6596+ GNU Lesser General Public License for more details.
6597
6598- You should have received a copy of the GNU General Public License
6599- along with this program; if not, see <https://www.gnu.org/licenses/>. */
6600+ You should have received a copy of the GNU Lesser General Public License
6601+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6602
6603 /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */
6604
6605--- a/gnulib/lib/sys_types.in.h
6606+++ b/gnulib/lib/sys_types.in.h
6607@@ -2,18 +2,18 @@
6608
6609 Copyright (C) 2011-2021 Free Software Foundation, Inc.
6610
6611- This program is free software; you can redistribute it and/or modify
6612- it under the terms of the GNU General Public License as published by
6613- the Free Software Foundation; either version 3, or (at your option)
6614- any later version.
6615+ This file is free software: you can redistribute it and/or modify
6616+ it under the terms of the GNU Lesser General Public License as
6617+ published by the Free Software Foundation; either version 2.1 of the
6618+ License, or (at your option) any later version.
6619
6620- This program is distributed in the hope that it will be useful,
6621+ This file is distributed in the hope that it will be useful,
6622 but WITHOUT ANY WARRANTY; without even the implied warranty of
6623 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6624- GNU General Public License for more details.
6625+ GNU Lesser General Public License for more details.
6626
6627- You should have received a copy of the GNU General Public License
6628- along with this program; if not, see <https://www.gnu.org/licenses/>. */
6629+ You should have received a copy of the GNU Lesser General Public License
6630+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6631
6632 #if __GNUC__ >= 3
6633 @PRAGMA_SYSTEM_HEADER@
6634--- a/gnulib/lib/time.in.h
6635+++ b/gnulib/lib/time.in.h
6636@@ -2,18 +2,18 @@
6637
6638 Copyright (C) 2007-2021 Free Software Foundation, Inc.
6639
6640- This program is free software; you can redistribute it and/or modify
6641- it under the terms of the GNU General Public License as published by
6642- the Free Software Foundation; either version 3, or (at your option)
6643- any later version.
6644+ This file is free software: you can redistribute it and/or modify
6645+ it under the terms of the GNU Lesser General Public License as
6646+ published by the Free Software Foundation; either version 2.1 of the
6647+ License, or (at your option) any later version.
6648
6649- This program is distributed in the hope that it will be useful,
6650+ This file is distributed in the hope that it will be useful,
6651 but WITHOUT ANY WARRANTY; without even the implied warranty of
6652 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6653- GNU General Public License for more details.
6654+ GNU Lesser General Public License for more details.
6655
6656- You should have received a copy of the GNU General Public License
6657- along with this program; if not, see <https://www.gnu.org/licenses/>. */
6658+ You should have received a copy of the GNU Lesser General Public License
6659+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6660
6661 #if __GNUC__ >= 3
6662 @PRAGMA_SYSTEM_HEADER@
6663@@ -340,22 +340,60 @@ _GL_CXXALIASWARN (strftime);
6664 # endif
6665
6666 # if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@
6667+/* Functions that use a first-class time zone data type, instead of
6668+ relying on an implicit global time zone.
6669+ Inspired by NetBSD. */
6670+
6671+/* Represents a time zone.
6672+ (timezone_t) NULL stands for UTC. */
6673 typedef struct tm_zone *timezone_t;
6674+
6675+/* tzalloc (name)
6676+ Returns a time zone object for the given time zone NAME. This object
6677+ represents the time zone that other functions would use it the TZ
6678+ environment variable was set to NAME.
6679+ If NAME is NULL, the result represents the time zone that other functions
6680+ would use it the TZ environment variable was unset.
6681+ May return NULL if NAME is invalid (this is platform dependent) or
6682+ upon memory allocation failure. */
6683 _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name));
6684 _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name));
6685+
6686+/* tzfree (tz)
6687+ Frees a time zone object.
6688+ The argument must have been returned by tzalloc(). */
6689 _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz));
6690 _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz));
6691+
6692+/* localtime_rz (tz, &t, &result)
6693+ Converts an absolute time T to a broken-down time RESULT, assuming the
6694+ time zone TZ.
6695+ This function is like 'localtime_r', but relies on the argument TZ instead
6696+ of an implicit global time zone. */
6697 _GL_FUNCDECL_SYS (localtime_rz, struct tm *,
6698 (timezone_t __tz, time_t const *restrict __timer,
6699 struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3)));
6700 _GL_CXXALIAS_SYS (localtime_rz, struct tm *,
6701 (timezone_t __tz, time_t const *restrict __timer,
6702 struct tm *restrict __result));
6703+
6704+/* mktime_z (tz, &tm)
6705+ Normalizes the broken-down time TM and converts it to an absolute time,
6706+ assuming the time zone TZ. Returns the absolute time.
6707+ This function is like 'mktime', but relies on the argument TZ instead
6708+ of an implicit global time zone. */
6709 _GL_FUNCDECL_SYS (mktime_z, time_t,
6710- (timezone_t __tz, struct tm *restrict __result)
6711+ (timezone_t __tz, struct tm *restrict __tm)
6712 _GL_ARG_NONNULL ((2)));
6713 _GL_CXXALIAS_SYS (mktime_z, time_t,
6714- (timezone_t __tz, struct tm *restrict __result));
6715+ (timezone_t __tz, struct tm *restrict __tm));
6716+
6717+/* Time zone abbreviation strings (returned by 'localtime_rz' or 'mktime_z'
6718+ in the 'tm_zone' member of 'struct tm') are valid as long as
6719+ - the 'struct tm' argument is not destroyed or overwritten,
6720+ and
6721+ - the 'timezone_t' argument is not freed through tzfree(). */
6722+
6723 # endif
6724
6725 /* Convert TM to a time_t value, assuming UTC. */
6726--- a/gnulib/lib/unistd.c
6727+++ b/gnulib/lib/unistd.c
6728@@ -1,4 +1,22 @@
6729+/* Inline functions for <unistd.h>.
6730+
6731+ Copyright (C) 2012-2021 Free Software Foundation, Inc.
6732+
6733+ This file is free software: you can redistribute it and/or modify
6734+ it under the terms of the GNU Lesser General Public License as
6735+ published by the Free Software Foundation; either version 2.1 of the
6736+ License, or (at your option) any later version.
6737+
6738+ This file is distributed in the hope that it will be useful,
6739+ but WITHOUT ANY WARRANTY; without even the implied warranty of
6740+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6741+ GNU Lesser General Public License for more details.
6742+
6743+ You should have received a copy of the GNU Lesser General Public License
6744+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6745+
6746 #include <config.h>
6747+
6748 #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
6749 #include "unistd.h"
6750 typedef int dummy;
6751--- a/gnulib/lib/unistd.in.h
6752+++ b/gnulib/lib/unistd.in.h
6753@@ -1,18 +1,18 @@
6754 /* Substitute for and wrapper around <unistd.h>.
6755 Copyright (C) 2003-2021 Free Software Foundation, Inc.
6756
6757- This program is free software; you can redistribute it and/or modify
6758- it under the terms of the GNU General Public License as published by
6759- the Free Software Foundation; either version 3, or (at your option)
6760- any later version.
6761+ This file is free software: you can redistribute it and/or modify
6762+ it under the terms of the GNU Lesser General Public License as
6763+ published by the Free Software Foundation; either version 2.1 of the
6764+ License, or (at your option) any later version.
6765
6766- This program is distributed in the hope that it will be useful,
6767+ This file is distributed in the hope that it will be useful,
6768 but WITHOUT ANY WARRANTY; without even the implied warranty of
6769 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6770- GNU General Public License for more details.
6771+ GNU Lesser General Public License for more details.
6772
6773- You should have received a copy of the GNU General Public License
6774- along with this program; if not, see <https://www.gnu.org/licenses/>. */
6775+ You should have received a copy of the GNU Lesser General Public License
6776+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6777
6778 #ifndef _@GUARD_PREFIX@_UNISTD_H
6779
6780@@ -1521,6 +1521,7 @@ _GL_WARN_ON_USE (group_member, "group_me
6781 # undef isatty
6782 # define isatty rpl_isatty
6783 # endif
6784+# define GNULIB_defined_isatty 1
6785 _GL_FUNCDECL_RPL (isatty, int, (int fd));
6786 _GL_CXXALIAS_RPL (isatty, int, (int fd));
6787 # elif defined _WIN32 && !defined __CYGWIN__
6788@@ -2027,15 +2028,23 @@ _GL_WARN_ON_USE (sleep, "sleep is unport
6789 #if @GNULIB_MDA_SWAB@
6790 /* On native Windows, map 'swab' to '_swab', so that -loldnames is not
6791 required. In C++ with GNULIB_NAMESPACE, avoid differences between
6792- platforms by defining GNULIB_NAMESPACE::creat always. */
6793+ platforms by defining GNULIB_NAMESPACE::swab always. */
6794 # if defined _WIN32 && !defined __CYGWIN__
6795 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
6796 # undef swab
6797 # define swab _swab
6798 # endif
6799-_GL_CXXALIAS_MDA (swab, void, (char *from, char *to, int n));
6800-# else
6801+/* Need to cast, because in old mingw the arguments are
6802+ (const char *from, char *to, size_t n). */
6803+_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n));
6804+# else
6805+# if defined __hpux /* HP-UX */
6806+_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n));
6807+# elif defined __sun && !defined _XPG4 /* Solaris */
6808+_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n));
6809+# else
6810 _GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n));
6811+# endif
6812 # endif
6813 _GL_CXXALIASWARN (swab);
6814 #endif
6815--- a/gnulib/lib/unitypes.in.h
6816+++ b/gnulib/lib/unitypes.in.h
6817@@ -1,17 +1,17 @@
6818 /* Elementary types and macros for the GNU UniString library.
6819 Copyright (C) 2002, 2005-2006, 2009-2021 Free Software Foundation, Inc.
6820
6821- This program is free software: you can redistribute it and/or modify it
6822- under the terms of the GNU General Public License as published
6823- by the Free Software Foundation; either version 3 of the License, or
6824- (at your option) any later version.
6825+ This file is free software: you can redistribute it and/or modify
6826+ it under the terms of the GNU Lesser General Public License as
6827+ published by the Free Software Foundation; either version 2.1 of the
6828+ License, or (at your option) any later version.
6829
6830- This program is distributed in the hope that it will be useful,
6831+ This file is distributed in the hope that it will be useful,
6832 but WITHOUT ANY WARRANTY; without even the implied warranty of
6833- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6834- General Public License for more details.
6835+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6836+ GNU Lesser General Public License for more details.
6837
6838- You should have received a copy of the GNU General Public License
6839+ You should have received a copy of the GNU Lesser General Public License
6840 along with this program. If not, see <https://www.gnu.org/licenses/>. */
6841
6842 #ifndef _UNITYPES_H
6843--- a/gnulib/lib/uniwidth.in.h
6844+++ b/gnulib/lib/uniwidth.in.h
6845@@ -2,17 +2,17 @@
6846 Copyright (C) 2001-2002, 2005, 2007, 2009-2021 Free Software Foundation,
6847 Inc.
6848
6849- This program is free software: you can redistribute it and/or modify it
6850- under the terms of the GNU General Public License as published
6851- by the Free Software Foundation; either version 3 of the License, or
6852- (at your option) any later version.
6853+ This file is free software: you can redistribute it and/or modify
6854+ it under the terms of the GNU Lesser General Public License as
6855+ published by the Free Software Foundation; either version 2.1 of the
6856+ License, or (at your option) any later version.
6857
6858- This program is distributed in the hope that it will be useful,
6859+ This file is distributed in the hope that it will be useful,
6860 but WITHOUT ANY WARRANTY; without even the implied warranty of
6861- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6862- General Public License for more details.
6863+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6864+ GNU Lesser General Public License for more details.
6865
6866- You should have received a copy of the GNU General Public License
6867+ You should have received a copy of the GNU Lesser General Public License
6868 along with this program. If not, see <https://www.gnu.org/licenses/>. */
6869
6870 #ifndef _UNIWIDTH_H
6871--- a/gnulib/lib/uniwidth/cjk.h
6872+++ b/gnulib/lib/uniwidth/cjk.h
6873@@ -2,17 +2,17 @@
6874 Copyright (C) 2001-2002, 2005-2007, 2009-2021 Free Software Foundation, Inc.
6875 Written by Bruno Haible <bruno@clisp.org>, 2002.
6876
6877- This program is free software: you can redistribute it and/or modify it
6878- under the terms of the GNU General Public License as published
6879- by the Free Software Foundation; either version 3 of the License, or
6880- (at your option) any later version.
6881+ This file is free software: you can redistribute it and/or modify
6882+ it under the terms of the GNU Lesser General Public License as
6883+ published by the Free Software Foundation; either version 2.1 of the
6884+ License, or (at your option) any later version.
6885
6886- This program is distributed in the hope that it will be useful,
6887+ This file is distributed in the hope that it will be useful,
6888 but WITHOUT ANY WARRANTY; without even the implied warranty of
6889- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6890- General Public License for more details.
6891+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6892+ GNU Lesser General Public License for more details.
6893
6894- You should have received a copy of the GNU General Public License
6895+ You should have received a copy of the GNU Lesser General Public License
6896 along with this program. If not, see <https://www.gnu.org/licenses/>. */
6897
6898 #include "streq.h"
6899--- a/gnulib/lib/uniwidth/width.c
6900+++ b/gnulib/lib/uniwidth/width.c
6901@@ -2,17 +2,17 @@
6902 Copyright (C) 2001-2002, 2006-2021 Free Software Foundation, Inc.
6903 Written by Bruno Haible <bruno@clisp.org>, 2002.
6904
6905- This program is free software: you can redistribute it and/or modify it
6906- under the terms of the GNU General Public License as published
6907- by the Free Software Foundation; either version 3 of the License, or
6908- (at your option) any later version.
6909+ This file is free software: you can redistribute it and/or modify
6910+ it under the terms of the GNU Lesser General Public License as
6911+ published by the Free Software Foundation; either version 2.1 of the
6912+ License, or (at your option) any later version.
6913
6914- This program is distributed in the hope that it will be useful,
6915+ This file is distributed in the hope that it will be useful,
6916 but WITHOUT ANY WARRANTY; without even the implied warranty of
6917- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6918- General Public License for more details.
6919+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6920+ GNU Lesser General Public License for more details.
6921
6922- You should have received a copy of the GNU General Public License
6923+ You should have received a copy of the GNU Lesser General Public License
6924 along with this program. If not, see <https://www.gnu.org/licenses/>. */
6925
6926 #include <config.h>
6927--- a/gnulib/lib/vasnprintf.c
6928+++ b/gnulib/lib/vasnprintf.c
6929@@ -1,18 +1,18 @@
6930 /* vsprintf with automatic memory allocation.
6931 Copyright (C) 1999, 2002-2021 Free Software Foundation, Inc.
6932
6933- This program is free software; you can redistribute it and/or modify
6934- it under the terms of the GNU General Public License as published by
6935- the Free Software Foundation; either version 3, or (at your option)
6936- any later version.
6937+ This file is free software: you can redistribute it and/or modify
6938+ it under the terms of the GNU Lesser General Public License as
6939+ published by the Free Software Foundation; either version 2.1 of the
6940+ License, or (at your option) any later version.
6941
6942- This program is distributed in the hope that it will be useful,
6943+ This file is distributed in the hope that it will be useful,
6944 but WITHOUT ANY WARRANTY; without even the implied warranty of
6945 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6946- GNU General Public License for more details.
6947+ GNU Lesser General Public License for more details.
6948
6949- You should have received a copy of the GNU General Public License along
6950- with this program; if not, see <https://www.gnu.org/licenses/>. */
6951+ You should have received a copy of the GNU Lesser General Public License
6952+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
6953
6954 /* This file can be parametrized with the following macros:
6955 VASNPRINTF The name of the function being defined.
6956@@ -60,9 +60,7 @@
6957 #ifndef VASNPRINTF
6958 # include <config.h>
6959 #endif
6960-#ifndef IN_LIBINTL
6961-# include <alloca.h>
6962-#endif
6963+#include <alloca.h>
6964
6965 /* Specification. */
6966 #ifndef VASNPRINTF
6967@@ -1859,6 +1857,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
6968 /* errno is already set. */
6969 return NULL;
6970
6971+ /* Frees the memory allocated by this function. Preserves errno. */
6972 #define CLEANUP() \
6973 if (d.dir != d.direct_alloc_dir) \
6974 free (d.dir); \
6975@@ -1923,7 +1922,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
6976
6977 /* Ensures that allocated >= needed. Aborts through a jump to
6978 out_of_memory if needed is SIZE_MAX or otherwise too big. */
6979-#define ENSURE_ALLOCATION(needed) \
6980+#define ENSURE_ALLOCATION_ELSE(needed, oom_statement) \
6981 if ((needed) > allocated) \
6982 { \
6983 size_t memory_size; \
6984@@ -1934,17 +1933,19 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
6985 allocated = (needed); \
6986 memory_size = xtimes (allocated, sizeof (DCHAR_T)); \
6987 if (size_overflow_p (memory_size)) \
6988- goto out_of_memory; \
6989+ oom_statement \
6990 if (result == resultbuf || result == NULL) \
6991 memory = (DCHAR_T *) malloc (memory_size); \
6992 else \
6993 memory = (DCHAR_T *) realloc (result, memory_size); \
6994 if (memory == NULL) \
6995- goto out_of_memory; \
6996+ oom_statement \
6997 if (result == resultbuf && length > 0) \
6998 DCHAR_CPY (memory, result, length); \
6999 result = memory; \
7000 }
7001+#define ENSURE_ALLOCATION(needed) \
7002+ ENSURE_ALLOCATION_ELSE((needed), goto out_of_memory; )
7003
7004 for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
7005 {
7006@@ -2183,18 +2184,17 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
7007 # endif
7008 if (converted == NULL)
7009 {
7010- int saved_errno = errno;
7011 if (!(result == resultbuf || result == NULL))
7012 free (result);
7013 if (buf_malloced != NULL)
7014 free (buf_malloced);
7015 CLEANUP ();
7016- errno = saved_errno;
7017 return NULL;
7018 }
7019 if (converted != result + length)
7020 {
7021- ENSURE_ALLOCATION (xsum (length, converted_len));
7022+ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
7023+ { free (converted); goto out_of_memory; });
7024 DCHAR_CPY (result + length, converted, converted_len);
7025 free (converted);
7026 }
7027@@ -2309,18 +2309,17 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
7028 # endif
7029 if (converted == NULL)
7030 {
7031- int saved_errno = errno;
7032 if (!(result == resultbuf || result == NULL))
7033 free (result);
7034 if (buf_malloced != NULL)
7035 free (buf_malloced);
7036 CLEANUP ();
7037- errno = saved_errno;
7038 return NULL;
7039 }
7040 if (converted != result + length)
7041 {
7042- ENSURE_ALLOCATION (xsum (length, converted_len));
7043+ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
7044+ { free (converted); goto out_of_memory; });
7045 DCHAR_CPY (result + length, converted, converted_len);
7046 free (converted);
7047 }
7048@@ -2435,18 +2434,17 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
7049 # endif
7050 if (converted == NULL)
7051 {
7052- int saved_errno = errno;
7053 if (!(result == resultbuf || result == NULL))
7054 free (result);
7055 if (buf_malloced != NULL)
7056 free (buf_malloced);
7057 CLEANUP ();
7058- errno = saved_errno;
7059 return NULL;
7060 }
7061 if (converted != result + length)
7062 {
7063- ENSURE_ALLOCATION (xsum (length, converted_len));
7064+ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
7065+ { free (converted); goto out_of_memory; });
7066 DCHAR_CPY (result + length, converted, converted_len);
7067 free (converted);
7068 }
7069@@ -2852,14 +2850,12 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
7070 NULL, &tmpdst_len);
7071 if (tmpdst == NULL)
7072 {
7073- int saved_errno = errno;
7074 free (tmpsrc);
7075 if (!(result == resultbuf || result == NULL))
7076 free (result);
7077 if (buf_malloced != NULL)
7078 free (buf_malloced);
7079 CLEANUP ();
7080- errno = saved_errno;
7081 return NULL;
7082 }
7083 free (tmpsrc);
7084@@ -2951,7 +2947,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
7085 }
7086 }
7087 # else
7088- ENSURE_ALLOCATION (xsum (length, tmpdst_len));
7089+ ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
7090+ { free (tmpdst); goto out_of_memory; });
7091 DCHAR_CPY (result + length, tmpdst, tmpdst_len);
7092 free (tmpdst);
7093 length += tmpdst_len;
7094@@ -3079,13 +3076,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
7095 NULL, &tmpdst_len);
7096 if (tmpdst == NULL)
7097 {
7098- int saved_errno = errno;
7099 if (!(result == resultbuf || result == NULL))
7100 free (result);
7101 if (buf_malloced != NULL)
7102 free (buf_malloced);
7103 CLEANUP ();
7104- errno = saved_errno;
7105 return NULL;
7106 }
7107 # endif
7108@@ -3156,7 +3151,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
7109 }
7110 }
7111 # else
7112- ENSURE_ALLOCATION (xsum (length, tmpdst_len));
7113+ ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
7114+ { free (tmpdst); goto out_of_memory; });
7115 DCHAR_CPY (result + length, tmpdst, tmpdst_len);
7116 free (tmpdst);
7117 length += tmpdst_len;
7118@@ -5449,15 +5445,14 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
7119 /* Attempt to handle failure. */
7120 if (count < 0)
7121 {
7122- /* SNPRINTF or sprintf failed. Save and use the errno
7123- that it has set, if any. */
7124- int saved_errno = errno;
7125- if (saved_errno == 0)
7126+ /* SNPRINTF or sprintf failed. Use the errno that it
7127+ has set, if any. */
7128+ if (errno == 0)
7129 {
7130 if (dp->conversion == 'c' || dp->conversion == 's')
7131- saved_errno = EILSEQ;
7132+ errno = EILSEQ;
7133 else
7134- saved_errno = EINVAL;
7135+ errno = EINVAL;
7136 }
7137
7138 if (!(result == resultbuf || result == NULL))
7139@@ -5466,7 +5461,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
7140 free (buf_malloced);
7141 CLEANUP ();
7142
7143- errno = saved_errno;
7144 return NULL;
7145 }
7146
7147@@ -5602,16 +5596,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
7148 NULL, &tmpdst_len);
7149 if (tmpdst == NULL)
7150 {
7151- int saved_errno = errno;
7152 if (!(result == resultbuf || result == NULL))
7153 free (result);
7154 if (buf_malloced != NULL)
7155 free (buf_malloced);
7156 CLEANUP ();
7157- errno = saved_errno;
7158 return NULL;
7159 }
7160- ENSURE_ALLOCATION (xsum (length, tmpdst_len));
7161+ ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
7162+ { free (tmpdst); goto out_of_memory; });
7163 DCHAR_CPY (result + length, tmpdst, tmpdst_len);
7164 free (tmpdst);
7165 count = tmpdst_len;
7166--- a/gnulib/lib/vasnprintf.h
7167+++ b/gnulib/lib/vasnprintf.h
7168@@ -1,18 +1,18 @@
7169 /* vsprintf with automatic memory allocation.
7170 Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc.
7171
7172- This program is free software; you can redistribute it and/or modify
7173- it under the terms of the GNU General Public License as published by
7174- the Free Software Foundation; either version 3, or (at your option)
7175- any later version.
7176+ This file is free software: you can redistribute it and/or modify
7177+ it under the terms of the GNU Lesser General Public License as
7178+ published by the Free Software Foundation; either version 2.1 of the
7179+ License, or (at your option) any later version.
7180
7181- This program is distributed in the hope that it will be useful,
7182+ This file is distributed in the hope that it will be useful,
7183 but WITHOUT ANY WARRANTY; without even the implied warranty of
7184 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7185- GNU General Public License for more details.
7186+ GNU Lesser General Public License for more details.
7187
7188- You should have received a copy of the GNU General Public License along
7189- with this program; if not, see <https://www.gnu.org/licenses/>. */
7190+ You should have received a copy of the GNU Lesser General Public License
7191+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7192
7193 #ifndef _VASNPRINTF_H
7194 #define _VASNPRINTF_H
7195--- a/gnulib/lib/vasprintf.c
7196+++ b/gnulib/lib/vasprintf.c
7197@@ -1,18 +1,18 @@
7198 /* Formatted output to strings.
7199 Copyright (C) 1999, 2002, 2006-2021 Free Software Foundation, Inc.
7200
7201- This program is free software; you can redistribute it and/or modify
7202- it under the terms of the GNU General Public License as published by
7203- the Free Software Foundation; either version 3, or (at your option)
7204- any later version.
7205+ This file is free software: you can redistribute it and/or modify
7206+ it under the terms of the GNU Lesser General Public License as
7207+ published by the Free Software Foundation; either version 2.1 of the
7208+ License, or (at your option) any later version.
7209
7210- This program is distributed in the hope that it will be useful,
7211+ This file is distributed in the hope that it will be useful,
7212 but WITHOUT ANY WARRANTY; without even the implied warranty of
7213 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7214- GNU General Public License for more details.
7215+ GNU Lesser General Public License for more details.
7216
7217- You should have received a copy of the GNU General Public License along
7218- with this program; if not, see <https://www.gnu.org/licenses/>. */
7219+ You should have received a copy of the GNU Lesser General Public License
7220+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7221
7222 #include <config.h>
7223
7224--- a/gnulib/lib/verify.h
7225+++ b/gnulib/lib/verify.h
7226@@ -2,17 +2,17 @@
7227
7228 Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
7229
7230- This program is free software: you can redistribute it and/or modify
7231- it under the terms of the GNU General Public License as published by
7232- the Free Software Foundation; either version 3 of the License, or
7233- (at your option) any later version.
7234+ This file is free software: you can redistribute it and/or modify
7235+ it under the terms of the GNU Lesser General Public License as
7236+ published by the Free Software Foundation; either version 2.1 of the
7237+ License, or (at your option) any later version.
7238
7239- This program is distributed in the hope that it will be useful,
7240+ This file is distributed in the hope that it will be useful,
7241 but WITHOUT ANY WARRANTY; without even the implied warranty of
7242 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7243- GNU General Public License for more details.
7244+ GNU Lesser General Public License for more details.
7245
7246- You should have received a copy of the GNU General Public License
7247+ You should have received a copy of the GNU Lesser General Public License
7248 along with this program. If not, see <https://www.gnu.org/licenses/>. */
7249
7250 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
7251--- a/gnulib/lib/warn-on-use.h
7252+++ b/gnulib/lib/warn-on-use.h
7253@@ -2,16 +2,16 @@
7254 Copyright (C) 2010-2021 Free Software Foundation, Inc.
7255
7256 This program is free software: you can redistribute it and/or modify it
7257- under the terms of the GNU General Public License as published
7258- by the Free Software Foundation; either version 3 of the License, or
7259+ under the terms of the GNU Lesser General Public License as published
7260+ by the Free Software Foundation; either version 2 of the License, or
7261 (at your option) any later version.
7262
7263 This program is distributed in the hope that it will be useful,
7264 but WITHOUT ANY WARRANTY; without even the implied warranty of
7265 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7266- General Public License for more details.
7267+ Lesser General Public License for more details.
7268
7269- You should have received a copy of the GNU General Public License
7270+ You should have received a copy of the GNU Lesser General Public License
7271 along with this program. If not, see <https://www.gnu.org/licenses/>. */
7272
7273 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
7274--- a/gnulib/lib/wchar.in.h
7275+++ b/gnulib/lib/wchar.in.h
7276@@ -2,18 +2,18 @@
7277
7278 Copyright (C) 2007-2021 Free Software Foundation, Inc.
7279
7280- This program is free software; you can redistribute it and/or modify
7281- it under the terms of the GNU General Public License as published by
7282- the Free Software Foundation; either version 3, or (at your option)
7283- any later version.
7284+ This file is free software: you can redistribute it and/or modify
7285+ it under the terms of the GNU Lesser General Public License as
7286+ published by the Free Software Foundation; either version 2.1 of the
7287+ License, or (at your option) any later version.
7288
7289- This program is distributed in the hope that it will be useful,
7290+ This file is distributed in the hope that it will be useful,
7291 but WITHOUT ANY WARRANTY; without even the implied warranty of
7292 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7293- GNU General Public License for more details.
7294+ GNU Lesser General Public License for more details.
7295
7296- You should have received a copy of the GNU General Public License
7297- along with this program; if not, see <https://www.gnu.org/licenses/>. */
7298+ You should have received a copy of the GNU Lesser General Public License
7299+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7300
7301 /* Written by Eric Blake. */
7302
7303@@ -111,7 +111,7 @@
7304 /* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
7305 <stddef.h>. This is too small: ISO C 99 section 7.24.1.(2) says that
7306 wint_t must be "unchanged by default argument promotions". Override it. */
7307-# if @GNULIB_OVERRIDES_WINT_T@
7308+# if @GNULIBHEADERS_OVERRIDE_WINT_T@
7309 # if !GNULIB_defined_wint_t
7310 # if @HAVE_CRTDEFS_H@
7311 # include <crtdefs.h>
7312--- a/gnulib/lib/wcrtomb.c
7313+++ b/gnulib/lib/wcrtomb.c
7314@@ -2,17 +2,17 @@
7315 Copyright (C) 2008-2021 Free Software Foundation, Inc.
7316 Written by Bruno Haible <bruno@clisp.org>, 2008.
7317
7318- This program is free software: you can redistribute it and/or modify
7319- it under the terms of the GNU General Public License as published by
7320- the Free Software Foundation; either version 3 of the License, or
7321- (at your option) any later version.
7322+ This file is free software: you can redistribute it and/or modify
7323+ it under the terms of the GNU Lesser General Public License as
7324+ published by the Free Software Foundation; either version 2.1 of the
7325+ License, or (at your option) any later version.
7326
7327- This program is distributed in the hope that it will be useful,
7328+ This file is distributed in the hope that it will be useful,
7329 but WITHOUT ANY WARRANTY; without even the implied warranty of
7330 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7331- GNU General Public License for more details.
7332+ GNU Lesser General Public License for more details.
7333
7334- You should have received a copy of the GNU General Public License
7335+ You should have received a copy of the GNU Lesser General Public License
7336 along with this program. If not, see <https://www.gnu.org/licenses/>. */
7337
7338 #include <config.h>
7339--- a/gnulib/lib/wctype-h.c
7340+++ b/gnulib/lib/wctype-h.c
7341@@ -1,4 +1,23 @@
7342+/* Inline functions for <wctype.h>.
7343+
7344+ Copyright (C) 2012-2021 Free Software Foundation, Inc.
7345+
7346+ This file is free software: you can redistribute it and/or modify
7347+ it under the terms of the GNU Lesser General Public License as
7348+ published by the Free Software Foundation; either version 2.1 of the
7349+ License, or (at your option) any later version.
7350+
7351+ This file is distributed in the hope that it will be useful,
7352+ but WITHOUT ANY WARRANTY; without even the implied warranty of
7353+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7354+ GNU Lesser General Public License for more details.
7355+
7356+ You should have received a copy of the GNU Lesser General Public License
7357+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7358+
7359 /* Normally this would be wctype.c, but that name's already taken. */
7360+
7361 #include <config.h>
7362+
7363 #define _GL_WCTYPE_INLINE _GL_EXTERN_INLINE
7364 #include "wctype.h"
7365--- a/gnulib/lib/wctype.in.h
7366+++ b/gnulib/lib/wctype.in.h
7367@@ -2,18 +2,18 @@
7368
7369 Copyright (C) 2006-2021 Free Software Foundation, Inc.
7370
7371- This program is free software; you can redistribute it and/or modify
7372- it under the terms of the GNU General Public License as published by
7373- the Free Software Foundation; either version 3, or (at your option)
7374- any later version.
7375+ This file is free software: you can redistribute it and/or modify
7376+ it under the terms of the GNU Lesser General Public License as
7377+ published by the Free Software Foundation; either version 2.1 of the
7378+ License, or (at your option) any later version.
7379
7380- This program is distributed in the hope that it will be useful,
7381+ This file is distributed in the hope that it will be useful,
7382 but WITHOUT ANY WARRANTY; without even the implied warranty of
7383 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7384- GNU General Public License for more details.
7385+ GNU Lesser General Public License for more details.
7386
7387- You should have received a copy of the GNU General Public License
7388- along with this program; if not, see <https://www.gnu.org/licenses/>. */
7389+ You should have received a copy of the GNU Lesser General Public License
7390+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7391
7392 /* Written by Bruno Haible and Paul Eggert. */
7393
7394@@ -103,7 +103,7 @@ _GL_INLINE_HEADER_BEGIN
7395 /* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
7396 <stddef.h>. This is too small: ISO C 99 section 7.24.1.(2) says that
7397 wint_t must be "unchanged by default argument promotions". Override it. */
7398-# if @GNULIB_OVERRIDES_WINT_T@
7399+# if @GNULIBHEADERS_OVERRIDE_WINT_T@
7400 # if !GNULIB_defined_wint_t
7401 # if @HAVE_CRTDEFS_H@
7402 # include <crtdefs.h>
7403@@ -132,7 +132,7 @@ typedef unsigned int rpl_wint_t;
7404 same way, or not at all. */
7405 # if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@
7406
7407-# if @GNULIB_OVERRIDES_WINT_T@ /* implies @REPLACE_ISWCNTRL@ */
7408+# if @GNULIBHEADERS_OVERRIDE_WINT_T@ /* implies @REPLACE_ISWCNTRL@ */
7409
7410 _GL_WCTYPE_INLINE int
7411 rpl_iswalnum (wint_t wc)
7412@@ -496,7 +496,7 @@ _GL_FUNCDECL_RPL (iswxdigit, int, (wint_
7413
7414 # endif
7415
7416-# if defined __MINGW32__ && !@GNULIB_OVERRIDES_WINT_T@
7417+# if defined __MINGW32__ && !@GNULIBHEADERS_OVERRIDE_WINT_T@
7418
7419 /* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t.
7420 The functions towlower and towupper are implemented in the MSVCRT library
7421@@ -529,7 +529,7 @@ rpl_towupper (wint_t wc)
7422 # define towupper rpl_towupper
7423 # endif
7424
7425-# endif /* __MINGW32__ && !@GNULIB_OVERRIDES_WINT_T@ */
7426+# endif /* __MINGW32__ && !@GNULIBHEADERS_OVERRIDE_WINT_T@ */
7427
7428 # define GNULIB_defined_wctype_functions 1
7429 #endif
7430@@ -646,7 +646,7 @@ _GL_WARN_ON_USE (wctype, "wctype is unpo
7431 The argument WC must be either a wchar_t value or WEOF.
7432 The argument DESC must have been returned by the wctype() function. */
7433 #if @GNULIB_ISWCTYPE@
7434-# if @GNULIB_OVERRIDES_WINT_T@
7435+# if @GNULIBHEADERS_OVERRIDE_WINT_T@
7436 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
7437 # undef iswctype
7438 # define iswctype rpl_iswctype
7439--- a/gnulib/lib/wcwidth.c
7440+++ b/gnulib/lib/wcwidth.c
7441@@ -1,17 +1,17 @@
7442 /* Determine the number of screen columns needed for a character.
7443 Copyright (C) 2006-2007, 2010-2021 Free Software Foundation, Inc.
7444
7445- This program is free software: you can redistribute it and/or modify
7446- it under the terms of the GNU General Public License as published by
7447- the Free Software Foundation; either version 3 of the License, or
7448- (at your option) any later version.
7449+ This file is free software: you can redistribute it and/or modify
7450+ it under the terms of the GNU Lesser General Public License as
7451+ published by the Free Software Foundation; either version 2.1 of the
7452+ License, or (at your option) any later version.
7453
7454- This program is distributed in the hope that it will be useful,
7455+ This file is distributed in the hope that it will be useful,
7456 but WITHOUT ANY WARRANTY; without even the implied warranty of
7457 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7458- GNU General Public License for more details.
7459+ GNU Lesser General Public License for more details.
7460
7461- You should have received a copy of the GNU General Public License
7462+ You should have received a copy of the GNU Lesser General Public License
7463 along with this program. If not, see <https://www.gnu.org/licenses/>. */
7464
7465 #include <config.h>
7466--- a/gnulib/lib/windows-initguard.h
7467+++ b/gnulib/lib/windows-initguard.h
7468@@ -1,18 +1,18 @@
7469 /* Init guards, somewhat like spinlocks (native Windows implementation).
7470 Copyright (C) 2005-2021 Free Software Foundation, Inc.
7471
7472- This program is free software; you can redistribute it and/or modify
7473- it under the terms of the GNU General Public License as published by
7474- the Free Software Foundation; either version 3, or (at your option)
7475- any later version.
7476+ This file is free software: you can redistribute it and/or modify
7477+ it under the terms of the GNU Lesser General Public License as
7478+ published by the Free Software Foundation; either version 2.1 of the
7479+ License, or (at your option) any later version.
7480
7481- This program is distributed in the hope that it will be useful,
7482+ This file is distributed in the hope that it will be useful,
7483 but WITHOUT ANY WARRANTY; without even the implied warranty of
7484 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7485- GNU General Public License for more details.
7486+ GNU Lesser General Public License for more details.
7487
7488- You should have received a copy of the GNU General Public License
7489- along with this program; if not, see <https://www.gnu.org/licenses/>. */
7490+ You should have received a copy of the GNU Lesser General Public License
7491+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7492
7493 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
7494 Based on GCC's gthr-win32.h. */
7495--- a/gnulib/lib/windows-mutex.c
7496+++ b/gnulib/lib/windows-mutex.c
7497@@ -1,18 +1,18 @@
7498 /* Plain mutexes (native Windows implementation).
7499 Copyright (C) 2005-2021 Free Software Foundation, Inc.
7500
7501- This program is free software; you can redistribute it and/or modify
7502- it under the terms of the GNU General Public License as published by
7503- the Free Software Foundation; either version 3, or (at your option)
7504- any later version.
7505+ This file is free software: you can redistribute it and/or modify
7506+ it under the terms of the GNU Lesser General Public License as
7507+ published by the Free Software Foundation; either version 2.1 of the
7508+ License, or (at your option) any later version.
7509
7510- This program is distributed in the hope that it will be useful,
7511+ This file is distributed in the hope that it will be useful,
7512 but WITHOUT ANY WARRANTY; without even the implied warranty of
7513 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7514- GNU General Public License for more details.
7515+ GNU Lesser General Public License for more details.
7516
7517- You should have received a copy of the GNU General Public License
7518- along with this program; if not, see <https://www.gnu.org/licenses/>. */
7519+ You should have received a copy of the GNU Lesser General Public License
7520+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7521
7522 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
7523 Based on GCC's gthr-win32.h. */
7524--- a/gnulib/lib/windows-mutex.h
7525+++ b/gnulib/lib/windows-mutex.h
7526@@ -1,18 +1,18 @@
7527 /* Plain mutexes (native Windows implementation).
7528 Copyright (C) 2005-2021 Free Software Foundation, Inc.
7529
7530- This program is free software; you can redistribute it and/or modify
7531- it under the terms of the GNU General Public License as published by
7532- the Free Software Foundation; either version 3, or (at your option)
7533- any later version.
7534+ This file is free software: you can redistribute it and/or modify
7535+ it under the terms of the GNU Lesser General Public License as
7536+ published by the Free Software Foundation; either version 2.1 of the
7537+ License, or (at your option) any later version.
7538
7539- This program is distributed in the hope that it will be useful,
7540+ This file is distributed in the hope that it will be useful,
7541 but WITHOUT ANY WARRANTY; without even the implied warranty of
7542 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7543- GNU General Public License for more details.
7544+ GNU Lesser General Public License for more details.
7545
7546- You should have received a copy of the GNU General Public License
7547- along with this program; if not, see <https://www.gnu.org/licenses/>. */
7548+ You should have received a copy of the GNU Lesser General Public License
7549+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7550
7551 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
7552 Based on GCC's gthr-win32.h. */
7553--- a/gnulib/lib/windows-once.c
7554+++ b/gnulib/lib/windows-once.c
7555@@ -1,18 +1,18 @@
7556 /* Once-only control (native Windows implementation).
7557 Copyright (C) 2005-2021 Free Software Foundation, Inc.
7558
7559- This program is free software; you can redistribute it and/or modify
7560- it under the terms of the GNU General Public License as published by
7561- the Free Software Foundation; either version 3, or (at your option)
7562- any later version.
7563+ This file is free software: you can redistribute it and/or modify
7564+ it under the terms of the GNU Lesser General Public License as
7565+ published by the Free Software Foundation; either version 2.1 of the
7566+ License, or (at your option) any later version.
7567
7568- This program is distributed in the hope that it will be useful,
7569+ This file is distributed in the hope that it will be useful,
7570 but WITHOUT ANY WARRANTY; without even the implied warranty of
7571 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7572- GNU General Public License for more details.
7573+ GNU Lesser General Public License for more details.
7574
7575- You should have received a copy of the GNU General Public License
7576- along with this program; if not, see <https://www.gnu.org/licenses/>. */
7577+ You should have received a copy of the GNU Lesser General Public License
7578+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7579
7580 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
7581 Based on GCC's gthr-win32.h. */
7582--- a/gnulib/lib/windows-once.h
7583+++ b/gnulib/lib/windows-once.h
7584@@ -1,18 +1,18 @@
7585 /* Once-only control (native Windows implementation).
7586 Copyright (C) 2005-2021 Free Software Foundation, Inc.
7587
7588- This program is free software; you can redistribute it and/or modify
7589- it under the terms of the GNU General Public License as published by
7590- the Free Software Foundation; either version 3, or (at your option)
7591- any later version.
7592+ This file is free software: you can redistribute it and/or modify
7593+ it under the terms of the GNU Lesser General Public License as
7594+ published by the Free Software Foundation; either version 2.1 of the
7595+ License, or (at your option) any later version.
7596
7597- This program is distributed in the hope that it will be useful,
7598+ This file is distributed in the hope that it will be useful,
7599 but WITHOUT ANY WARRANTY; without even the implied warranty of
7600 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7601- GNU General Public License for more details.
7602+ GNU Lesser General Public License for more details.
7603
7604- You should have received a copy of the GNU General Public License
7605- along with this program; if not, see <https://www.gnu.org/licenses/>. */
7606+ You should have received a copy of the GNU Lesser General Public License
7607+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7608
7609 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
7610 Based on GCC's gthr-win32.h. */
7611--- a/gnulib/lib/windows-recmutex.c
7612+++ b/gnulib/lib/windows-recmutex.c
7613@@ -1,18 +1,18 @@
7614 /* Plain recursive mutexes (native Windows implementation).
7615 Copyright (C) 2005-2021 Free Software Foundation, Inc.
7616
7617- This program is free software; you can redistribute it and/or modify
7618- it under the terms of the GNU General Public License as published by
7619- the Free Software Foundation; either version 3, or (at your option)
7620- any later version.
7621+ This file is free software: you can redistribute it and/or modify
7622+ it under the terms of the GNU Lesser General Public License as
7623+ published by the Free Software Foundation; either version 2.1 of the
7624+ License, or (at your option) any later version.
7625
7626- This program is distributed in the hope that it will be useful,
7627+ This file is distributed in the hope that it will be useful,
7628 but WITHOUT ANY WARRANTY; without even the implied warranty of
7629 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7630- GNU General Public License for more details.
7631+ GNU Lesser General Public License for more details.
7632
7633- You should have received a copy of the GNU General Public License
7634- along with this program; if not, see <https://www.gnu.org/licenses/>. */
7635+ You should have received a copy of the GNU Lesser General Public License
7636+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7637
7638 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
7639 Based on GCC's gthr-win32.h. */
7640--- a/gnulib/lib/windows-recmutex.h
7641+++ b/gnulib/lib/windows-recmutex.h
7642@@ -1,18 +1,18 @@
7643 /* Plain recursive mutexes (native Windows implementation).
7644 Copyright (C) 2005-2021 Free Software Foundation, Inc.
7645
7646- This program is free software; you can redistribute it and/or modify
7647- it under the terms of the GNU General Public License as published by
7648- the Free Software Foundation; either version 3, or (at your option)
7649- any later version.
7650+ This file is free software: you can redistribute it and/or modify
7651+ it under the terms of the GNU Lesser General Public License as
7652+ published by the Free Software Foundation; either version 2.1 of the
7653+ License, or (at your option) any later version.
7654
7655- This program is distributed in the hope that it will be useful,
7656+ This file is distributed in the hope that it will be useful,
7657 but WITHOUT ANY WARRANTY; without even the implied warranty of
7658 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7659- GNU General Public License for more details.
7660+ GNU Lesser General Public License for more details.
7661
7662- You should have received a copy of the GNU General Public License
7663- along with this program; if not, see <https://www.gnu.org/licenses/>. */
7664+ You should have received a copy of the GNU Lesser General Public License
7665+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7666
7667 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
7668 Based on GCC's gthr-win32.h. */
7669--- a/gnulib/lib/windows-rwlock.c
7670+++ b/gnulib/lib/windows-rwlock.c
7671@@ -1,18 +1,18 @@
7672 /* Read-write locks (native Windows implementation).
7673 Copyright (C) 2005-2021 Free Software Foundation, Inc.
7674
7675- This program is free software; you can redistribute it and/or modify
7676- it under the terms of the GNU General Public License as published by
7677- the Free Software Foundation; either version 3, or (at your option)
7678- any later version.
7679+ This file is free software: you can redistribute it and/or modify
7680+ it under the terms of the GNU Lesser General Public License as
7681+ published by the Free Software Foundation; either version 2.1 of the
7682+ License, or (at your option) any later version.
7683
7684- This program is distributed in the hope that it will be useful,
7685+ This file is distributed in the hope that it will be useful,
7686 but WITHOUT ANY WARRANTY; without even the implied warranty of
7687 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7688- GNU General Public License for more details.
7689+ GNU Lesser General Public License for more details.
7690
7691- You should have received a copy of the GNU General Public License
7692- along with this program; if not, see <https://www.gnu.org/licenses/>. */
7693+ You should have received a copy of the GNU Lesser General Public License
7694+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7695
7696 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
7697 Based on GCC's gthr-win32.h. */
7698--- a/gnulib/lib/windows-rwlock.h
7699+++ b/gnulib/lib/windows-rwlock.h
7700@@ -1,18 +1,18 @@
7701 /* Read-write locks (native Windows implementation).
7702 Copyright (C) 2005-2021 Free Software Foundation, Inc.
7703
7704- This program is free software; you can redistribute it and/or modify
7705- it under the terms of the GNU General Public License as published by
7706- the Free Software Foundation; either version 3, or (at your option)
7707- any later version.
7708+ This file is free software: you can redistribute it and/or modify
7709+ it under the terms of the GNU Lesser General Public License as
7710+ published by the Free Software Foundation; either version 2.1 of the
7711+ License, or (at your option) any later version.
7712
7713- This program is distributed in the hope that it will be useful,
7714+ This file is distributed in the hope that it will be useful,
7715 but WITHOUT ANY WARRANTY; without even the implied warranty of
7716 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7717- GNU General Public License for more details.
7718+ GNU Lesser General Public License for more details.
7719
7720- You should have received a copy of the GNU General Public License
7721- along with this program; if not, see <https://www.gnu.org/licenses/>. */
7722+ You should have received a copy of the GNU Lesser General Public License
7723+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
7724
7725 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
7726 Based on GCC's gthr-win32.h. */
7727--- a/gnulib/lib/xalloc-oversized.h
7728+++ b/gnulib/lib/xalloc-oversized.h
7729@@ -2,17 +2,17 @@
7730
7731 Copyright (C) 1990-2000, 2003-2004, 2006-2021 Free Software Foundation, Inc.
7732
7733- This program is free software: you can redistribute it and/or modify
7734- it under the terms of the GNU General Public License as published by
7735- the Free Software Foundation; either version 3 of the License, or
7736- (at your option) any later version.
7737+ This file is free software: you can redistribute it and/or modify
7738+ it under the terms of the GNU Lesser General Public License as
7739+ published by the Free Software Foundation; either version 2.1 of the
7740+ License, or (at your option) any later version.
7741
7742- This program is distributed in the hope that it will be useful,
7743+ This file is distributed in the hope that it will be useful,
7744 but WITHOUT ANY WARRANTY; without even the implied warranty of
7745 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7746- GNU General Public License for more details.
7747+ GNU Lesser General Public License for more details.
7748
7749- You should have received a copy of the GNU General Public License
7750+ You should have received a copy of the GNU Lesser General Public License
7751 along with this program. If not, see <https://www.gnu.org/licenses/>. */
7752
7753 #ifndef XALLOC_OVERSIZED_H_
7754@@ -21,34 +21,39 @@
7755 #include <stddef.h>
7756 #include <stdint.h>
7757
7758-/* True if N * S would overflow in a size_t calculation,
7759- or would generate a value larger than PTRDIFF_MAX.
7760+/* True if N * S does not fit into both ptrdiff_t and size_t.
7761+ N and S should be nonnegative and free of side effects.
7762 This expands to a constant expression if N and S are both constants.
7763- By gnulib convention, SIZE_MAX represents overflow in size
7764+ By gnulib convention, SIZE_MAX represents overflow in size_t
7765 calculations, so the conservative size_t-based dividend to use here
7766 is SIZE_MAX - 1. */
7767 #define __xalloc_oversized(n, s) \
7768- ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) < (n))
7769-
7770-#if PTRDIFF_MAX < SIZE_MAX
7771-typedef ptrdiff_t __xalloc_count_type;
7772-#else
7773-typedef size_t __xalloc_count_type;
7774-#endif
7775-
7776-/* Return 1 if an array of N objects, each of size S, cannot exist
7777- reliably due to size or ptrdiff_t arithmetic overflow. S must be
7778- positive and N must be nonnegative. This is a macro, not a
7779- function, so that it works correctly even when SIZE_MAX < N. */
7780-
7781-#if 7 <= __GNUC__ && !defined __clang__
7782+ ((s) != 0 \
7783+ && ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) \
7784+ < (n)))
7785+
7786+/* Return 1 if and only if an array of N objects, each of size S,
7787+ cannot exist reliably because its total size in bytes would exceed
7788+ MIN (PTRDIFF_MAX, SIZE_MAX - 1).
7789+
7790+ N and S should be nonnegative and free of side effects.
7791+
7792+ Warning: (xalloc_oversized (N, S) ? NULL : malloc (N * S)) can
7793+ misbehave if N and S are both narrower than ptrdiff_t and size_t,
7794+ and can be rewritten as (xalloc_oversized (N, S) ? NULL
7795+ : malloc (N * (size_t) S)).
7796+
7797+ This is a macro, not a function, so that it works even if an
7798+ argument exceeds MAX (PTRDIFF_MAX, SIZE_MAX). */
7799+#if 7 <= __GNUC__ && !defined __clang__ && PTRDIFF_MAX < SIZE_MAX
7800 # define xalloc_oversized(n, s) \
7801- __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
7802-#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__
7803+ __builtin_mul_overflow_p (n, s, (ptrdiff_t) 1)
7804+#elif (5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ \
7805+ && PTRDIFF_MAX < SIZE_MAX)
7806 # define xalloc_oversized(n, s) \
7807 (__builtin_constant_p (n) && __builtin_constant_p (s) \
7808 ? __xalloc_oversized (n, s) \
7809- : ({ __xalloc_count_type __xalloc_count; \
7810+ : ({ ptrdiff_t __xalloc_count; \
7811 __builtin_mul_overflow (n, s, &__xalloc_count); }))
7812
7813 /* Other compilers use integer division; this may be slower but is
7814--- a/gnulib/lib/xalloc.h
7815+++ b/gnulib/lib/xalloc.h
7816@@ -21,7 +21,10 @@
7817 #include <stddef.h>
7818 #include <stdint.h>
7819
7820-#include "xalloc-oversized.h"
7821+#if GNULIB_XALLOC
7822+# include "idx.h"
7823+# include "intprops.h"
7824+#endif
7825
7826 #ifndef _GL_INLINE_HEADER_BEGIN
7827 #error "Please include config.h first."
7828@@ -50,17 +53,26 @@ extern "C" {
7829
7830 #if GNULIB_XALLOC
7831
7832-void *xmalloc (size_t s)
7833- _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
7834-void *xzalloc (size_t s)
7835- _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
7836+void *xmalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
7837+void *ximalloc (idx_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
7838+void *xzalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
7839+void *xizalloc (idx_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
7840 void *xcalloc (size_t n, size_t s)
7841- _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
7842-void *xrealloc (void *p, size_t s)
7843- _GL_ATTRIBUTE_ALLOC_SIZE ((2));
7844-void *x2realloc (void *p, size_t *pn);
7845-void *xmemdup (void const *p, size_t s)
7846- _GL_ATTRIBUTE_ALLOC_SIZE ((2));
7847+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
7848+void *xicalloc (idx_t n, idx_t s)
7849+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
7850+void *xrealloc (void *p, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2));
7851+void *xirealloc (void *p, idx_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2));
7852+void *xreallocarray (void *p, size_t n, size_t s)
7853+ _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
7854+void *xireallocarray (void *p, idx_t n, idx_t s)
7855+ _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
7856+void *x2realloc (void *p, size_t *ps); /* superseded by xpalloc */
7857+void *x2nrealloc (void *p, size_t *pn, size_t s); /* superseded by xpalloc */
7858+void *xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s);
7859+void *xmemdup (void const *p, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2));
7860+void *ximemdup (void const *p, idx_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2));
7861+char *ximemdup0 (void const *p, idx_t s) _GL_ATTRIBUTE_MALLOC;
7862 char *xstrdup (char const *str)
7863 _GL_ATTRIBUTE_MALLOC;
7864
7865@@ -98,11 +110,10 @@ XALLOC_INLINE void *xnmalloc (size_t n,
7866 XALLOC_INLINE void *
7867 xnmalloc (size_t n, size_t s)
7868 {
7869- if (xalloc_oversized (n, s))
7870- xalloc_die ();
7871- return xmalloc (n * s);
7872+ return xreallocarray (NULL, n, s);
7873 }
7874
7875+/* FIXME: Deprecate this in favor of xreallocarray? */
7876 /* Change the size of an allocated block of memory P to an array of N
7877 objects each of S bytes, with error checking. S must be nonzero. */
7878
7879@@ -111,100 +122,7 @@ XALLOC_INLINE void *xnrealloc (void *p,
7880 XALLOC_INLINE void *
7881 xnrealloc (void *p, size_t n, size_t s)
7882 {
7883- if (xalloc_oversized (n, s))
7884- xalloc_die ();
7885- return xrealloc (p, n * s);
7886-}
7887-
7888-/* If P is null, allocate a block of at least *PN such objects;
7889- otherwise, reallocate P so that it contains more than *PN objects
7890- each of S bytes. S must be nonzero. Set *PN to the new number of
7891- objects, and return the pointer to the new block. *PN is never set
7892- to zero, and the returned pointer is never null.
7893-
7894- Repeated reallocations are guaranteed to make progress, either by
7895- allocating an initial block with a nonzero size, or by allocating a
7896- larger block.
7897-
7898- In the following implementation, nonzero sizes are increased by a
7899- factor of approximately 1.5 so that repeated reallocations have
7900- O(N) overall cost rather than O(N**2) cost, but the
7901- specification for this function does not guarantee that rate.
7902-
7903- Here is an example of use:
7904-
7905- int *p = NULL;
7906- size_t used = 0;
7907- size_t allocated = 0;
7908-
7909- void
7910- append_int (int value)
7911- {
7912- if (used == allocated)
7913- p = x2nrealloc (p, &allocated, sizeof *p);
7914- p[used++] = value;
7915- }
7916-
7917- This causes x2nrealloc to allocate a block of some nonzero size the
7918- first time it is called.
7919-
7920- To have finer-grained control over the initial size, set *PN to a
7921- nonzero value before calling this function with P == NULL. For
7922- example:
7923-
7924- int *p = NULL;
7925- size_t used = 0;
7926- size_t allocated = 0;
7927- size_t allocated1 = 1000;
7928-
7929- void
7930- append_int (int value)
7931- {
7932- if (used == allocated)
7933- {
7934- p = x2nrealloc (p, &allocated1, sizeof *p);
7935- allocated = allocated1;
7936- }
7937- p[used++] = value;
7938- }
7939-
7940- */
7941-
7942-XALLOC_INLINE void *
7943-x2nrealloc (void *p, size_t *pn, size_t s)
7944-{
7945- size_t n = *pn;
7946-
7947- if (! p)
7948- {
7949- if (! n)
7950- {
7951- /* The approximate size to use for initial small allocation
7952- requests, when the invoking code specifies an old size of
7953- zero. This is the largest "small" request for the GNU C
7954- library malloc. */
7955- enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
7956-
7957- n = DEFAULT_MXFAST / s;
7958- n += !n;
7959- }
7960- if (xalloc_oversized (n, s))
7961- xalloc_die ();
7962- }
7963- else
7964- {
7965- /* Set N = floor (1.5 * N) + 1 so that progress is made even if N == 0.
7966- Check for overflow, so that N * S stays in both ptrdiff_t and
7967- size_t range. The check may be slightly conservative, but an
7968- exact check isn't worth the trouble. */
7969- if ((PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX) / 3 * 2 / s
7970- <= n)
7971- xalloc_die ();
7972- n += n / 2 + 1;
7973- }
7974-
7975- *pn = n;
7976- return xrealloc (p, n * s);
7977+ return xreallocarray (p, n, s);
7978 }
7979
7980 /* Return a pointer to a new buffer of N bytes. This is like xmalloc,
7981@@ -239,9 +157,16 @@ xrealloc (T *p, size_t s)
7982 }
7983
7984 template <typename T> inline T *
7985+xreallocarray (T *p, size_t n, size_t s)
7986+{
7987+ return (T *) xreallocarray ((void *) p, n, s);
7988+}
7989+
7990+/* FIXME: Deprecate this in favor of xreallocarray? */
7991+template <typename T> inline T *
7992 xnrealloc (T *p, size_t n, size_t s)
7993 {
7994- return (T *) xnrealloc ((void *) p, n, s);
7995+ return xreallocarray (p, n, s);
7996 }
7997
7998 template <typename T> inline T *
7999--- a/gnulib/lib/xmalloc.c
8000+++ b/gnulib/lib/xmalloc.c
8001@@ -21,80 +21,250 @@
8002
8003 #include "xalloc.h"
8004
8005+#include "ialloc.h"
8006+#include "intprops.h"
8007+#include "minmax.h"
8008+
8009 #include <stdlib.h>
8010 #include <string.h>
8011
8012-/* 1 if calloc, malloc and realloc are known to be compatible with GNU.
8013- This matters if we are not also using the calloc-gnu, malloc-gnu
8014- and realloc-gnu modules, which define HAVE_CALLOC_GNU,
8015- HAVE_MALLOC_GNU and HAVE_REALLOC_GNU and support the GNU API even
8016- on non-GNU platforms. */
8017-#if defined HAVE_CALLOC_GNU || (defined __GLIBC__ && !defined __UCLIBC__)
8018-enum { HAVE_GNU_CALLOC = 1 };
8019-#else
8020-enum { HAVE_GNU_CALLOC = 0 };
8021-#endif
8022-#if defined HAVE_MALLOC_GNU || (defined __GLIBC__ && !defined __UCLIBC__)
8023-enum { HAVE_GNU_MALLOC = 1 };
8024-#else
8025-enum { HAVE_GNU_MALLOC = 0 };
8026-#endif
8027-#if defined HAVE_REALLOC_GNU || (defined __GLIBC__ && !defined __UCLIBC__)
8028-enum { HAVE_GNU_REALLOC = 1 };
8029-#else
8030-enum { HAVE_GNU_REALLOC = 0 };
8031-#endif
8032+static void * _GL_ATTRIBUTE_PURE
8033+nonnull (void *p)
8034+{
8035+ if (!p)
8036+ xalloc_die ();
8037+ return p;
8038+}
8039
8040-/* Allocate N bytes of memory dynamically, with error checking. */
8041+/* Allocate S bytes of memory dynamically, with error checking. */
8042
8043 void *
8044-xmalloc (size_t n)
8045+xmalloc (size_t s)
8046 {
8047- void *p = malloc (n);
8048- if (!p && (HAVE_GNU_MALLOC || n))
8049- xalloc_die ();
8050- return p;
8051+ return nonnull (malloc (s));
8052+}
8053+
8054+void *
8055+ximalloc (idx_t s)
8056+{
8057+ return nonnull (imalloc (s));
8058 }
8059
8060-/* Change the size of an allocated block of memory P to N bytes,
8061+/* Change the size of an allocated block of memory P to S bytes,
8062 with error checking. */
8063
8064 void *
8065-xrealloc (void *p, size_t n)
8066+xrealloc (void *p, size_t s)
8067 {
8068- if (!HAVE_GNU_REALLOC && !n && p)
8069- {
8070- /* The GNU and C99 realloc behaviors disagree here. Act like GNU. */
8071- free (p);
8072- return NULL;
8073- }
8074+ void *r = realloc (p, s);
8075+ if (!r && (!p || s))
8076+ xalloc_die ();
8077+ return r;
8078+}
8079+
8080+void *
8081+xirealloc (void *p, idx_t s)
8082+{
8083+ return nonnull (irealloc (p, s));
8084+}
8085+
8086+/* Change the size of an allocated block of memory P to an array of N
8087+ objects each of S bytes, with error checking. */
8088
8089- void *r = realloc (p, n);
8090- if (!r && (n || (HAVE_GNU_REALLOC && !p)))
8091+void *
8092+xreallocarray (void *p, size_t n, size_t s)
8093+{
8094+ void *r = reallocarray (p, n, s);
8095+ if (!r && (!p || (n && s)))
8096 xalloc_die ();
8097 return r;
8098 }
8099
8100-/* If P is null, allocate a block of at least *PN bytes; otherwise,
8101- reallocate P so that it contains more than *PN bytes. *PN must be
8102- nonzero unless P is null. Set *PN to the new block's size, and
8103- return the pointer to the new block. *PN is never set to zero, and
8104+void *
8105+xireallocarray (void *p, idx_t n, idx_t s)
8106+{
8107+ return nonnull (ireallocarray (p, n, s));
8108+}
8109+
8110+/* If P is null, allocate a block of at least *PS bytes; otherwise,
8111+ reallocate P so that it contains more than *PS bytes. *PS must be
8112+ nonzero unless P is null. Set *PS to the new block's size, and
8113+ return the pointer to the new block. *PS is never set to zero, and
8114 the returned pointer is never null. */
8115
8116 void *
8117-x2realloc (void *p, size_t *pn)
8118+x2realloc (void *p, size_t *ps)
8119+{
8120+ return x2nrealloc (p, ps, 1);
8121+}
8122+
8123+/* If P is null, allocate a block of at least *PN such objects;
8124+ otherwise, reallocate P so that it contains more than *PN objects
8125+ each of S bytes. S must be nonzero. Set *PN to the new number of
8126+ objects, and return the pointer to the new block. *PN is never set
8127+ to zero, and the returned pointer is never null.
8128+
8129+ Repeated reallocations are guaranteed to make progress, either by
8130+ allocating an initial block with a nonzero size, or by allocating a
8131+ larger block.
8132+
8133+ In the following implementation, nonzero sizes are increased by a
8134+ factor of approximately 1.5 so that repeated reallocations have
8135+ O(N) overall cost rather than O(N**2) cost, but the
8136+ specification for this function does not guarantee that rate.
8137+
8138+ Here is an example of use:
8139+
8140+ int *p = NULL;
8141+ size_t used = 0;
8142+ size_t allocated = 0;
8143+
8144+ void
8145+ append_int (int value)
8146+ {
8147+ if (used == allocated)
8148+ p = x2nrealloc (p, &allocated, sizeof *p);
8149+ p[used++] = value;
8150+ }
8151+
8152+ This causes x2nrealloc to allocate a block of some nonzero size the
8153+ first time it is called.
8154+
8155+ To have finer-grained control over the initial size, set *PN to a
8156+ nonzero value before calling this function with P == NULL. For
8157+ example:
8158+
8159+ int *p = NULL;
8160+ size_t used = 0;
8161+ size_t allocated = 0;
8162+ size_t allocated1 = 1000;
8163+
8164+ void
8165+ append_int (int value)
8166+ {
8167+ if (used == allocated)
8168+ {
8169+ p = x2nrealloc (p, &allocated1, sizeof *p);
8170+ allocated = allocated1;
8171+ }
8172+ p[used++] = value;
8173+ }
8174+
8175+ */
8176+
8177+void *
8178+x2nrealloc (void *p, size_t *pn, size_t s)
8179 {
8180- return x2nrealloc (p, pn, 1);
8181+ size_t n = *pn;
8182+
8183+ if (! p)
8184+ {
8185+ if (! n)
8186+ {
8187+ /* The approximate size to use for initial small allocation
8188+ requests, when the invoking code specifies an old size of
8189+ zero. This is the largest "small" request for the GNU C
8190+ library malloc. */
8191+ enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
8192+
8193+ n = DEFAULT_MXFAST / s;
8194+ n += !n;
8195+ }
8196+ }
8197+ else
8198+ {
8199+ /* Set N = floor (1.5 * N) + 1 to make progress even if N == 0. */
8200+ if (INT_ADD_WRAPV (n, (n >> 1) + 1, &n))
8201+ xalloc_die ();
8202+ }
8203+
8204+ p = xreallocarray (p, n, s);
8205+ *pn = n;
8206+ return p;
8207 }
8208
8209-/* Allocate N bytes of zeroed memory dynamically, with error checking.
8210+/* Grow PA, which points to an array of *PN items, and return the
8211+ location of the reallocated array, updating *PN to reflect its
8212+ new size. The new array will contain at least N_INCR_MIN more
8213+ items, but will not contain more than N_MAX items total.
8214+ S is the size of each item, in bytes.
8215+
8216+ S and N_INCR_MIN must be positive. *PN must be
8217+ nonnegative. If N_MAX is -1, it is treated as if it were
8218+ infinity.
8219+
8220+ If PA is null, then allocate a new array instead of reallocating
8221+ the old one.
8222+
8223+ Thus, to grow an array A without saving its old contents, do
8224+ { free (A); A = xpalloc (NULL, &AITEMS, ...); }. */
8225+
8226+void *
8227+xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
8228+{
8229+ idx_t n0 = *pn;
8230+
8231+ /* The approximate size to use for initial small allocation
8232+ requests. This is the largest "small" request for the GNU C
8233+ library malloc. */
8234+ enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
8235+
8236+ /* If the array is tiny, grow it to about (but no greater than)
8237+ DEFAULT_MXFAST bytes. Otherwise, grow it by about 50%.
8238+ Adjust the growth according to three constraints: N_INCR_MIN,
8239+ N_MAX, and what the C language can represent safely. */
8240+
8241+ idx_t n;
8242+ if (INT_ADD_WRAPV (n0, n0 >> 1, &n))
8243+ n = IDX_MAX;
8244+ if (0 <= n_max && n_max < n)
8245+ n = n_max;
8246+
8247+ /* NBYTES is of a type suitable for holding the count of bytes in an object.
8248+ This is typically idx_t, but it should be size_t on (theoretical?)
8249+ platforms where SIZE_MAX < IDX_MAX so xpalloc does not pass
8250+ values greater than SIZE_MAX to xrealloc. */
8251+#if IDX_MAX <= SIZE_MAX
8252+ idx_t nbytes;
8253+#else
8254+ size_t nbytes;
8255+#endif
8256+ idx_t adjusted_nbytes
8257+ = (INT_MULTIPLY_WRAPV (n, s, &nbytes)
8258+ ? MIN (IDX_MAX, SIZE_MAX)
8259+ : nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0);
8260+ if (adjusted_nbytes)
8261+ {
8262+ n = adjusted_nbytes / s;
8263+ nbytes = adjusted_nbytes - adjusted_nbytes % s;
8264+ }
8265+
8266+ if (! pa)
8267+ *pn = 0;
8268+ if (n - n0 < n_incr_min
8269+ && (INT_ADD_WRAPV (n0, n_incr_min, &n)
8270+ || (0 <= n_max && n_max < n)
8271+ || INT_MULTIPLY_WRAPV (n, s, &nbytes)))
8272+ xalloc_die ();
8273+ pa = xrealloc (pa, nbytes);
8274+ *pn = n;
8275+ return pa;
8276+}
8277+
8278+/* Allocate S bytes of zeroed memory dynamically, with error checking.
8279 There's no need for xnzalloc (N, S), since it would be equivalent
8280 to xcalloc (N, S). */
8281
8282 void *
8283-xzalloc (size_t n)
8284+xzalloc (size_t s)
8285+{
8286+ return xcalloc (s, 1);
8287+}
8288+
8289+void *
8290+xizalloc (idx_t s)
8291 {
8292- return xcalloc (n, 1);
8293+ return xicalloc (s, 1);
8294 }
8295
8296 /* Allocate zeroed memory for N elements of S bytes, with error
8297@@ -103,15 +273,13 @@ xzalloc (size_t n)
8298 void *
8299 xcalloc (size_t n, size_t s)
8300 {
8301- void *p;
8302- /* Test for overflow, since objects with size greater than
8303- PTRDIFF_MAX cause pointer subtraction to go awry. Omit size-zero
8304- tests if HAVE_GNU_CALLOC, since GNU calloc never returns NULL if
8305- successful. */
8306- if (xalloc_oversized (n, s)
8307- || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0)))
8308- xalloc_die ();
8309- return p;
8310+ return nonnull (calloc (n, s));
8311+}
8312+
8313+void *
8314+xicalloc (idx_t n, idx_t s)
8315+{
8316+ return nonnull (icalloc (n, s));
8317 }
8318
8319 /* Clone an object P of size S, with error checking. There's no need
8320@@ -124,6 +292,23 @@ xmemdup (void const *p, size_t s)
8321 return memcpy (xmalloc (s), p, s);
8322 }
8323
8324+void *
8325+ximemdup (void const *p, idx_t s)
8326+{
8327+ return memcpy (ximalloc (s), p, s);
8328+}
8329+
8330+/* Clone an object P of size S, with error checking. Append
8331+ a terminating NUL byte. */
8332+
8333+char *
8334+ximemdup0 (void const *p, idx_t s)
8335+{
8336+ char *result = ximalloc (s + 1);
8337+ result[s] = 0;
8338+ return memcpy (result, p, s);
8339+}
8340+
8341 /* Clone STRING. */
8342
8343 char *
8344--- a/gnulib/lib/xsize.c
8345+++ b/gnulib/lib/xsize.c
8346@@ -1,3 +1,21 @@
8347+/* Checked size_t computations.
8348+
8349+ Copyright (C) 2012-2021 Free Software Foundation, Inc.
8350+
8351+ This file is free software: you can redistribute it and/or modify
8352+ it under the terms of the GNU Lesser General Public License as
8353+ published by the Free Software Foundation; either version 2.1 of the
8354+ License, or (at your option) any later version.
8355+
8356+ This file is distributed in the hope that it will be useful,
8357+ but WITHOUT ANY WARRANTY; without even the implied warranty of
8358+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8359+ GNU Lesser General Public License for more details.
8360+
8361+ You should have received a copy of the GNU Lesser General Public License
8362+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
8363+
8364 #include <config.h>
8365+
8366 #define XSIZE_INLINE _GL_EXTERN_INLINE
8367 #include "xsize.h"
8368--- a/gnulib/lib/xsize.h
8369+++ b/gnulib/lib/xsize.h
8370@@ -2,18 +2,18 @@
8371
8372 Copyright (C) 2003, 2008-2021 Free Software Foundation, Inc.
8373
8374- This program is free software; you can redistribute it and/or modify
8375- it under the terms of the GNU General Public License as published by
8376- the Free Software Foundation; either version 3, or (at your option)
8377- any later version.
8378+ This file is free software: you can redistribute it and/or modify
8379+ it under the terms of the GNU Lesser General Public License as
8380+ published by the Free Software Foundation; either version 2.1 of the
8381+ License, or (at your option) any later version.
8382
8383- This program is distributed in the hope that it will be useful,
8384+ This file is distributed in the hope that it will be useful,
8385 but WITHOUT ANY WARRANTY; without even the implied warranty of
8386 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8387- GNU General Public License for more details.
8388+ GNU Lesser General Public License for more details.
8389
8390- You should have received a copy of the GNU General Public License
8391- along with this program; if not, see <https://www.gnu.org/licenses/>. */
8392+ You should have received a copy of the GNU Lesser General Public License
8393+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
8394
8395 #ifndef _XSIZE_H
8396 #define _XSIZE_H
8397--- /dev/null
8398+++ b/gnulib/m4/calloc.m4
8399@@ -0,0 +1,82 @@
8400+# calloc.m4 serial 27
8401+
8402+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
8403+# This file is free software; the Free Software Foundation
8404+# gives unlimited permission to copy and/or distribute it,
8405+# with or without modifications, as long as this notice is preserved.
8406+
8407+# Written by Jim Meyering.
8408+
8409+# Determine whether calloc (N, S) returns non-NULL when N*S is zero,
8410+# and returns NULL when N*S overflows.
8411+# If so, define HAVE_CALLOC. Otherwise, define calloc to rpl_calloc
8412+# and arrange to use a calloc wrapper function that does work in that case.
8413+
8414+# _AC_FUNC_CALLOC_IF([IF-WORKS], [IF-NOT])
8415+# -------------------------------------
8416+# If calloc is compatible with GNU calloc, run IF-WORKS, otherwise, IF-NOT.
8417+AC_DEFUN([_AC_FUNC_CALLOC_IF],
8418+[
8419+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
8420+ AC_CACHE_CHECK([whether calloc (0, n) and calloc (n, 0) return nonnull],
8421+ [ac_cv_func_calloc_0_nonnull],
8422+ [if test $cross_compiling != yes; then
8423+ ac_cv_func_calloc_0_nonnull=yes
8424+ AC_RUN_IFELSE(
8425+ [AC_LANG_PROGRAM(
8426+ [AC_INCLUDES_DEFAULT],
8427+ [[int result = 0;
8428+ char * volatile p = calloc (0, 0);
8429+ if (!p)
8430+ result |= 1;
8431+ free (p);
8432+ return result;
8433+ ]])],
8434+ [],
8435+ [ac_cv_func_calloc_0_nonnull=no])
8436+ else
8437+ case "$host_os" in
8438+ # Guess yes on glibc systems.
8439+ *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
8440+ # Guess yes on musl systems.
8441+ *-musl*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
8442+ # Guess yes on native Windows.
8443+ mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
8444+ # If we don't know, obey --enable-cross-guesses.
8445+ *) ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
8446+ esac
8447+ fi
8448+ ])
8449+ AS_CASE([$ac_cv_func_calloc_0_nonnull], [*yes], [$1], [$2])
8450+])
8451+
8452+
8453+# gl_FUNC_CALLOC_GNU
8454+# ------------------
8455+# Replace calloc if it is not compatible with GNU libc.
8456+AC_DEFUN([gl_FUNC_CALLOC_GNU],
8457+[
8458+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
8459+ AC_REQUIRE([gl_FUNC_CALLOC_POSIX])
8460+ if test $REPLACE_CALLOC = 0; then
8461+ _AC_FUNC_CALLOC_IF([], [REPLACE_CALLOC=1])
8462+ fi
8463+])# gl_FUNC_CALLOC_GNU
8464+
8465+# gl_FUNC_CALLOC_POSIX
8466+# --------------------
8467+# Test whether 'calloc' is POSIX compliant (sets errno to ENOMEM when it
8468+# fails, and doesn't mess up with ptrdiff_t or size_t overflow),
8469+# and replace calloc if it is not.
8470+AC_DEFUN([gl_FUNC_CALLOC_POSIX],
8471+[
8472+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
8473+ AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
8474+ if test $REPLACE_MALLOC = 1; then
8475+ REPLACE_CALLOC=1
8476+ fi
8477+ dnl Although in theory we should also test for size_t overflow,
8478+ dnl in practice testing for ptrdiff_t overflow suffices
8479+ dnl since PTRDIFF_MAX <= SIZE_MAX on all known Gnulib porting targets.
8480+ dnl A separate size_t test would slow down 'configure'.
8481+])
8482--- a/gnulib/m4/fcntl_h.m4
8483+++ b/gnulib/m4/fcntl_h.m4
8484@@ -1,4 +1,4 @@
8485-# serial 17
8486+# serial 20
8487 # Configure fcntl.h.
8488 dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc.
8489 dnl This file is free software; the Free Software Foundation
8490@@ -7,7 +7,7 @@ dnl with or without modifications, as lo
8491
8492 dnl Written by Paul Eggert.
8493
8494-AC_DEFUN([gl_FCNTL_H],
8495+AC_DEFUN_ONCE([gl_FCNTL_H],
8496 [
8497 AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
8498 AC_REQUIRE([gl_FCNTL_O_FLAGS])
8499@@ -26,25 +26,40 @@ AC_DEFUN([gl_FCNTL_H],
8500 ]], [fcntl openat])
8501 ])
8502
8503+# gl_FCNTL_MODULE_INDICATOR([modulename])
8504+# sets the shell variable that indicates the presence of the given module
8505+# to a C preprocessor expression that will evaluate to 1.
8506+# This macro invocation must not occur in macros that are AC_REQUIREd.
8507 AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
8508 [
8509- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
8510- AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
8511+ dnl Ensure to expand the default settings once only.
8512+ gl_FCNTL_H_REQUIRE_DEFAULTS
8513 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
8514 dnl Define it also as a C macro, for the benefit of the unit tests.
8515 gl_MODULE_INDICATOR_FOR_TESTS([$1])
8516 ])
8517
8518+# Initializes the default values for AC_SUBSTed shell variables.
8519+# This macro must not be AC_REQUIREd. It must only be invoked, and only
8520+# outside of macros or in macros that are not AC_REQUIREd.
8521+AC_DEFUN([gl_FCNTL_H_REQUIRE_DEFAULTS],
8522+[
8523+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAULTS], [
8524+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CREAT])
8525+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCNTL])
8526+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NONBLOCKING])
8527+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPEN])
8528+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENAT])
8529+ dnl Support Microsoft deprecated alias function names by default.
8530+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CREAT], [1])
8531+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_OPEN], [1])
8532+ ])
8533+ m4_require(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAULTS])
8534+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
8535+])
8536+
8537 AC_DEFUN([gl_FCNTL_H_DEFAULTS],
8538 [
8539- GNULIB_CREAT=0; AC_SUBST([GNULIB_CREAT])
8540- GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
8541- GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING])
8542- GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
8543- GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT])
8544- dnl Support Microsoft deprecated alias function names by default.
8545- GNULIB_MDA_CREAT=1; AC_SUBST([GNULIB_MDA_CREAT])
8546- GNULIB_MDA_OPEN=1; AC_SUBST([GNULIB_MDA_OPEN])
8547 dnl Assume proper GNU behavior unless another module says otherwise.
8548 HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
8549 HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
8550--- /dev/null
8551+++ b/gnulib/m4/free.m4
8552@@ -0,0 +1,52 @@
8553+# free.m4 serial 6
8554+# Copyright (C) 2003-2005, 2009-2021 Free Software Foundation, Inc.
8555+# This file is free software; the Free Software Foundation
8556+# gives unlimited permission to copy and/or distribute it,
8557+# with or without modifications, as long as this notice is preserved.
8558+
8559+# Written by Paul Eggert and Bruno Haible.
8560+
8561+AC_DEFUN([gl_FUNC_FREE],
8562+[
8563+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
8564+
8565+ dnl In the next release of POSIX, free must preserve errno.
8566+ dnl https://www.austingroupbugs.net/view.php?id=385
8567+ dnl https://sourceware.org/bugzilla/show_bug.cgi?id=17924
8568+ dnl So far, we know of three platforms that do this:
8569+ dnl * glibc >= 2.33, thanks to the fix for this bug:
8570+ dnl <https://sourceware.org/bugzilla/show_bug.cgi?id=17924>
8571+ dnl * OpenBSD >= 4.5, thanks to this commit:
8572+ dnl <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib/malloc.c.diff?r1=1.100&r2=1.101&f=h>
8573+ dnl * Solaris, because its malloc() implementation is based on brk(),
8574+ dnl not mmap(); hence its free() implementation makes no system calls.
8575+ dnl For other platforms, you can only be sure if they state it in their
8576+ dnl documentation, or by code inspection of the free() implementation in libc.
8577+ AC_CACHE_CHECK([whether free is known to preserve errno],
8578+ [gl_cv_func_free_preserves_errno],
8579+ [AC_COMPILE_IFELSE(
8580+ [AC_LANG_PROGRAM(
8581+ [[#include <stdlib.h>
8582+ ]],
8583+ [[#if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
8584+ #elif defined __OpenBSD__
8585+ #elif defined __sun
8586+ #else
8587+ #error "'free' is not known to preserve errno"
8588+ #endif
8589+ ]])],
8590+ [gl_cv_func_free_preserves_errno=yes],
8591+ [gl_cv_func_free_preserves_errno=no])
8592+ ])
8593+
8594+ case $gl_cv_func_free_preserves_errno in
8595+ *yes)
8596+ AC_DEFINE([HAVE_FREE_POSIX], [1],
8597+ [Define if the 'free' function is guaranteed to preserve errno.])
8598+ ;;
8599+ *) REPLACE_FREE=1 ;;
8600+ esac
8601+])
8602+
8603+# Prerequisites of lib/free.c.
8604+AC_DEFUN([gl_PREREQ_FREE], [:])
8605--- a/gnulib/m4/fstat.m4
8606+++ b/gnulib/m4/fstat.m4
8607@@ -1,4 +1,4 @@
8608-# fstat.m4 serial 7
8609+# fstat.m4 serial 8
8610 dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
8611 dnl This file is free software; the Free Software Foundation
8612 dnl gives unlimited permission to copy and/or distribute it,
8613@@ -34,7 +34,7 @@ AC_DEFUN([gl_FUNC_FSTAT],
8614
8615 # Prerequisites of lib/fstat.c and lib/stat-w32.c.
8616 AC_DEFUN([gl_PREREQ_FSTAT], [
8617- AC_REQUIRE([gl_HEADER_SYS_STAT_H])
8618+ AC_REQUIRE([gl_SYS_STAT_H])
8619 AC_REQUIRE([gl_PREREQ_STAT_W32])
8620 :
8621 ])
8622--- a/gnulib/m4/gnulib-common.m4
8623+++ b/gnulib/m4/gnulib-common.m4
8624@@ -1,4 +1,4 @@
8625-# gnulib-common.m4 serial 63
8626+# gnulib-common.m4 serial 66
8627 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
8628 dnl This file is free software; the Free Software Foundation
8629 dnl gives unlimited permission to copy and/or distribute it,
8630@@ -357,6 +357,16 @@ AC_DEFUN([gl_COMMON_BODY], [
8631 export LIBC_FATAL_STDERR_
8632 ])
8633
8634+# gl_MODULE_INDICATOR_INIT_VARIABLE([variablename])
8635+# gl_MODULE_INDICATOR_INIT_VARIABLE([variablename], [initialvalue])
8636+# initializes the shell variable that indicates the presence of the given module
8637+# as a C preprocessor expression.
8638+AC_DEFUN([gl_MODULE_INDICATOR_INIT_VARIABLE],
8639+[
8640+ GL_MODULE_INDICATOR_PREFIX[]_[$1]=m4_if([$2], , [0], [$2])
8641+ AC_SUBST(GL_MODULE_INDICATOR_PREFIX[]_[$1])
8642+])
8643+
8644 # gl_MODULE_INDICATOR_CONDITION
8645 # expands to a C preprocessor expression that evaluates to 1 or 0, depending
8646 # whether a gnulib module that has been requested shall be considered present
8647@@ -369,9 +379,9 @@ m4_define([gl_MODULE_INDICATOR_CONDITION
8648 AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
8649 [
8650 gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
8651- [GNULIB_[]m4_translit([[$1]],
8652- [abcdefghijklmnopqrstuvwxyz./-],
8653- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
8654+ [GL_MODULE_INDICATOR_PREFIX[]_GNULIB_[]m4_translit([[$1]],
8655+ [abcdefghijklmnopqrstuvwxyz./-],
8656+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
8657 [gl_MODULE_INDICATOR_CONDITION])
8658 ])
8659
8660@@ -656,6 +666,72 @@ AC_DEFUN([gl_CACHE_VAL_SILENT],
8661 ])
8662 ])
8663
8664+# gl_CC_ALLOW_WARNINGS
8665+# sets and substitutes a variable GL_CFLAG_ALLOW_WARNINGS, to a $(CC) option
8666+# that reverts a preceding '-Werror' option, if available.
8667+# This is expected to be '-Wno-error' on gcc, clang (except clang/MSVC), xlclang
8668+# and empty otherwise.
8669+AC_DEFUN([gl_CC_ALLOW_WARNINGS],
8670+[
8671+ AC_REQUIRE([AC_PROG_CC])
8672+ AC_CACHE_CHECK([for C compiler option to allow warnings],
8673+ [gl_cv_cc_wallow],
8674+ [rm -f conftest*
8675+ echo 'int dummy;' > conftest.c
8676+ AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err]) >/dev/null
8677+ AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err]) >/dev/null
8678+ dnl Test the number of error output lines, because AIX xlc accepts the
8679+ dnl option '-Wno-error', just to produce a warning
8680+ dnl "Option -Wno-error was incorrectly specified. The option will be ignored."
8681+ dnl afterwards.
8682+ if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
8683+ gl_cv_cc_wallow='-Wno-error'
8684+ else
8685+ gl_cv_cc_wallow=none
8686+ fi
8687+ rm -f conftest*
8688+ ])
8689+ case "$gl_cv_cc_wallow" in
8690+ none) GL_CFLAG_ALLOW_WARNINGS='' ;;
8691+ *) GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
8692+ esac
8693+ AC_SUBST([GL_CFLAG_ALLOW_WARNINGS])
8694+])
8695+
8696+# gl_CXX_ALLOW_WARNINGS
8697+# sets and substitutes a variable GL_CXXFLAG_ALLOW_WARNINGS, to a $(CC) option
8698+# that reverts a preceding '-Werror' option, if available.
8699+AC_DEFUN([gl_CXX_ALLOW_WARNINGS],
8700+[
8701+ dnl Requires AC_PROG_CXX or gl_PROG_ANSI_CXX.
8702+ if test -n "$CXX" && test "$CXX" != no; then
8703+ AC_CACHE_CHECK([for C++ compiler option to allow warnings],
8704+ [gl_cv_cxx_wallow],
8705+ [rm -f conftest*
8706+ echo 'int dummy;' > conftest.cc
8707+ AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>conftest1.err]) >/dev/null
8708+ AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conftest.cc 2>conftest2.err]) >/dev/null
8709+ dnl Test the number of error output lines, because AIX xlC accepts the
8710+ dnl option '-Wno-error', just to produce a warning
8711+ dnl "Option -Wno-error was incorrectly specified. The option will be ignored."
8712+ dnl afterwards.
8713+ if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
8714+ gl_cv_cxx_wallow='-Wno-error'
8715+ else
8716+ gl_cv_cxx_wallow=none
8717+ fi
8718+ rm -f conftest*
8719+ ])
8720+ case "$gl_cv_cxx_wallow" in
8721+ none) GL_CXXFLAG_ALLOW_WARNINGS='' ;;
8722+ *) GL_CXXFLAG_ALLOW_WARNINGS="$gl_cv_cxx_wallow" ;;
8723+ esac
8724+ else
8725+ GL_CXXFLAG_ALLOW_WARNINGS=''
8726+ fi
8727+ AC_SUBST([GL_CXXFLAG_ALLOW_WARNINGS])
8728+])
8729+
8730 dnl Expands to some code for use in .c programs that, on native Windows, defines
8731 dnl the Microsoft deprecated alias function names to the underscore-prefixed
8732 dnl actual function names. With this macro, these function names are available
8733--- a/gnulib/m4/gnulib-comp.m4
8734+++ b/gnulib/m4/gnulib-comp.m4
8735@@ -51,6 +51,8 @@ AC_DEFUN([gl_EARLY],
8736 # Code from module btowc:
8737 # Code from module builtin-expect:
8738 # Code from module c99:
8739+ # Code from module calloc-gnu:
8740+ # Code from module calloc-posix:
8741 # Code from module cloexec:
8742 # Code from module close:
8743 # Code from module double-slash-root:
8744@@ -66,6 +68,7 @@ AC_DEFUN([gl_EARLY],
8745 # Code from module fd-hook:
8746 # Code from module filename:
8747 # Code from module float:
8748+ # Code from module free-posix:
8749 # Code from module fstat:
8750 # Code from module getdtablesize:
8751 # Code from module getopt-gnu:
8752@@ -74,7 +77,9 @@ AC_DEFUN([gl_EARLY],
8753 # Code from module gettext-h:
8754 # Code from module hard-locale:
8755 # Code from module havelib:
8756+ # Code from module ialloc:
8757 # Code from module iconv:
8758+ # Code from module idx:
8759 # Code from module include_next:
8760 # Code from module intprops:
8761 # Code from module inttypes-incomplete:
8762@@ -84,12 +89,14 @@ AC_DEFUN([gl_EARLY],
8763 # Code from module langinfo:
8764 # Code from module largefile:
8765 AC_REQUIRE([AC_SYS_LARGEFILE])
8766+ AC_REQUIRE([gl_YEAR2038_EARLY])
8767 # Code from module libc-config:
8768 # Code from module limits-h:
8769 # Code from module localcharset:
8770 # Code from module locale:
8771 # Code from module localeconv:
8772 # Code from module lock:
8773+ # Code from module malloc-gnu:
8774 # Code from module malloc-posix:
8775 # Code from module malloca:
8776 # Code from module mbchar:
8777@@ -107,6 +114,7 @@ AC_DEFUN([gl_EARLY],
8778 # Code from module memchr:
8779 # Code from module mempcpy:
8780 # Code from module memrchr:
8781+ # Code from module minmax:
8782 # Code from module msvc-inval:
8783 # Code from module msvc-nothrow:
8784 # Code from module multiarch:
8785@@ -114,6 +122,9 @@ AC_DEFUN([gl_EARLY],
8786 # Code from module nocrash:
8787 # Code from module open:
8788 # Code from module pathmax:
8789+ # Code from module realloc-gnu:
8790+ # Code from module realloc-posix:
8791+ # Code from module reallocarray:
8792 # Code from module regex:
8793 # Code from module setlocale-null:
8794 # Code from module size_max:
8795@@ -189,6 +200,8 @@ AC_DEFUN([gl_INIT],
8796 m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
8797 m4_pushdef([gl_LIBSOURCES_LIST], [])
8798 m4_pushdef([gl_LIBSOURCES_DIR], [])
8799+ m4_pushdef([GL_MACRO_PREFIX], [gl])
8800+ m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
8801 gl_COMMON
8802 gl_source_base='gnulib/lib'
8803 gl_FUNC_ALLOCA
8804@@ -196,6 +209,15 @@ AC_DEFUN([gl_INIT],
8805 if test -n "$ARGZ_H"; then
8806 AC_LIBOBJ([argz])
8807 fi
8808+ gl_FUNC_CALLOC_GNU
8809+ if test $REPLACE_CALLOC = 1; then
8810+ AC_LIBOBJ([calloc])
8811+ fi
8812+ gl_FUNC_CALLOC_POSIX
8813+ if test $REPLACE_CALLOC = 1; then
8814+ AC_LIBOBJ([calloc])
8815+ fi
8816+ gl_STDLIB_MODULE_INDICATOR([calloc-posix])
8817 gl_DOUBLE_SLASH_ROOT
8818 gl_HEADER_ERRNO_H
8819 gl_ERROR
8820@@ -208,6 +230,7 @@ AC_DEFUN([gl_INIT],
8821 AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
8822 AC_REQUIRE([gl_EXTERN_INLINE])
8823 gl_FCNTL_H
8824+ gl_FCNTL_H_REQUIRE_DEFAULTS
8825 gl_FLOAT_H
8826 if test $REPLACE_FLOAT_LDBL = 1; then
8827 AC_LIBOBJ([float])
8828@@ -223,10 +246,10 @@ AC_DEFUN([gl_INIT],
8829 if test $REPLACE_GETOPT = 1; then
8830 AC_LIBOBJ([getopt])
8831 AC_LIBOBJ([getopt1])
8832- dnl Arrange for unistd.h to include getopt.h.
8833- GNULIB_GL_UNISTD_H_GETOPT=1
8834+ dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1.
8835+ gl_UNISTD_H_REQUIRE_DEFAULTS
8836+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1])
8837 fi
8838- AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
8839 gl_UNISTD_MODULE_INDICATOR([getopt-posix])
8840 gl_FUNC_GETPROGNAME
8841 AC_SUBST([LIBINTL])
8842@@ -236,6 +259,7 @@ AC_DEFUN([gl_INIT],
8843 m4_ifdef([gl_ICONV_MODULE_INDICATOR],
8844 [gl_ICONV_MODULE_INDICATOR([iconv])])
8845 gl_INTTYPES_INCOMPLETE
8846+ gl_INTTYPES_H_REQUIRE_DEFAULTS
8847 gl_FUNC_ISWBLANK
8848 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
8849 :
8850@@ -265,6 +289,15 @@ AC_DEFUN([gl_INIT],
8851 gl_WCTYPE_MODULE_INDICATOR([iswxdigit])
8852 AC_REQUIRE([gl_LARGEFILE])
8853 gl_LIMITS_H
8854+ gl_FUNC_MALLOC_GNU
8855+ if test $REPLACE_MALLOC = 1; then
8856+ AC_LIBOBJ([malloc])
8857+ fi
8858+ AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
8859+ if test $REPLACE_MALLOC = 1; then
8860+ AC_LIBOBJ([malloc])
8861+ fi
8862+ gl_STDLIB_MODULE_INDICATOR([malloc-posix])
8863 gl_MALLOCA
8864 gl_MBCHAR
8865 gl_MBITER
8866@@ -305,6 +338,7 @@ AC_DEFUN([gl_INIT],
8867 gl_PREREQ_MEMRCHR
8868 fi
8869 gl_STRING_MODULE_INDICATOR([memrchr])
8870+ gl_MINMAX
8871 gl_MULTIARCH
8872 gl_FUNC_OPEN
8873 if test $REPLACE_OPEN = 1; then
8874@@ -312,6 +346,22 @@ AC_DEFUN([gl_INIT],
8875 gl_PREREQ_OPEN
8876 fi
8877 gl_FCNTL_MODULE_INDICATOR([open])
8878+ gl_FUNC_REALLOC_GNU
8879+ if test $REPLACE_REALLOC = 1; then
8880+ AC_LIBOBJ([realloc])
8881+ fi
8882+ gl_FUNC_REALLOC_POSIX
8883+ if test $REPLACE_REALLOC = 1; then
8884+ AC_LIBOBJ([realloc])
8885+ fi
8886+ gl_STDLIB_MODULE_INDICATOR([realloc-posix])
8887+ gl_FUNC_REALLOCARRAY
8888+ if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
8889+ AC_LIBOBJ([reallocarray])
8890+ gl_PREREQ_REALLOCARRAY
8891+ fi
8892+ gl_MODULE_INDICATOR([reallocarray])
8893+ gl_STDLIB_MODULE_INDICATOR([reallocarray])
8894 gl_REGEX
8895 if test $ac_use_included_regex = yes; then
8896 AC_LIBOBJ([regex])
8897@@ -321,9 +371,35 @@ AC_DEFUN([gl_INIT],
8898 gl_STDARG_H
8899 AM_STDBOOL_H
8900 gl_STDDEF_H
8901+ gl_STDDEF_H_REQUIRE_DEFAULTS
8902 gl_STDINT_H
8903 gl_STDIO_H
8904+ gl_STDIO_H_REQUIRE_DEFAULTS
8905+ dnl No need to create extra modules for these functions. Everyone who uses
8906+ dnl <stdio.h> likely needs them.
8907+ gl_STDIO_MODULE_INDICATOR([fscanf])
8908+ gl_MODULE_INDICATOR([fscanf])
8909+ gl_STDIO_MODULE_INDICATOR([scanf])
8910+ gl_MODULE_INDICATOR([scanf])
8911+ gl_STDIO_MODULE_INDICATOR([fgetc])
8912+ gl_STDIO_MODULE_INDICATOR([getc])
8913+ gl_STDIO_MODULE_INDICATOR([getchar])
8914+ gl_STDIO_MODULE_INDICATOR([fgets])
8915+ gl_STDIO_MODULE_INDICATOR([fread])
8916+ dnl No need to create extra modules for these functions. Everyone who uses
8917+ dnl <stdio.h> likely needs them.
8918+ gl_STDIO_MODULE_INDICATOR([fprintf])
8919+ gl_STDIO_MODULE_INDICATOR([printf])
8920+ gl_STDIO_MODULE_INDICATOR([vfprintf])
8921+ gl_STDIO_MODULE_INDICATOR([vprintf])
8922+ gl_STDIO_MODULE_INDICATOR([fputc])
8923+ gl_STDIO_MODULE_INDICATOR([putc])
8924+ gl_STDIO_MODULE_INDICATOR([putchar])
8925+ gl_STDIO_MODULE_INDICATOR([fputs])
8926+ gl_STDIO_MODULE_INDICATOR([puts])
8927+ gl_STDIO_MODULE_INDICATOR([fwrite])
8928 gl_STDLIB_H
8929+ gl_STDLIB_H_REQUIRE_DEFAULTS
8930 gl_STRCASE
8931 if test $HAVE_STRCASECMP = 0; then
8932 AC_LIBOBJ([strcasecmp])
8933@@ -356,8 +432,10 @@ AC_DEFUN([gl_INIT],
8934 fi
8935 gl_MODULE_INDICATOR([strerror])
8936 gl_STRING_MODULE_INDICATOR([strerror])
8937- gl_HEADER_STRING_H
8938- gl_HEADER_STRINGS_H
8939+ gl_STRING_H
8940+ gl_STRING_H_REQUIRE_DEFAULTS
8941+ gl_STRINGS_H
8942+ gl_STRINGS_H_REQUIRE_DEFAULTS
8943 gl_FUNC_STRNLEN
8944 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
8945 AC_LIBOBJ([strnlen])
8946@@ -365,10 +443,27 @@ AC_DEFUN([gl_INIT],
8947 fi
8948 gl_STRING_MODULE_INDICATOR([strnlen])
8949 gl_SYS_TYPES_H
8950+ gl_SYS_TYPES_H_REQUIRE_DEFAULTS
8951 AC_PROG_MKDIR_P
8952 gl_UNISTD_H
8953- gl_LIBUNISTRING_LIBHEADER([0.9.4], [unitypes.h])
8954- gl_LIBUNISTRING_LIBHEADER([0.9.4], [uniwidth.h])
8955+ gl_UNISTD_H_REQUIRE_DEFAULTS
8956+ gl_LIBUNISTRING_LIBHEADER([0.9.11], [unitypes.h])
8957+ AH_VERBATIM([unitypes_restrict], [
8958+ /* This definition is a duplicate of the one in unitypes.h.
8959+ It is here so that we can cope with an older version of unitypes.h
8960+ that does not contain this definition and that is pre-installed among
8961+ the public header files. */
8962+ # if defined __restrict \
8963+ || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
8964+ || __clang_major__ >= 3
8965+ # define _UC_RESTRICT __restrict
8966+ # elif 199901L <= __STDC_VERSION__ || defined restrict
8967+ # define _UC_RESTRICT restrict
8968+ # else
8969+ # define _UC_RESTRICT
8970+ # endif
8971+ ])
8972+ gl_LIBUNISTRING_LIBHEADER([0.9.11], [uniwidth.h])
8973 gl_LIBUNISTRING_MODULE([0.9.8], [uniwidth/width])
8974 gl_FUNC_VASPRINTF
8975 gl_STDIO_MODULE_INDICATOR([vasprintf])
8976@@ -376,7 +471,9 @@ AC_DEFUN([gl_INIT],
8977 [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
8978 AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
8979 gl_WCHAR_H
8980+ gl_WCHAR_H_REQUIRE_DEFAULTS
8981 gl_WCTYPE_H
8982+ gl_WCTYPE_H_REQUIRE_DEFAULTS
8983 gl_FUNC_WCWIDTH
8984 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
8985 AC_LIBOBJ([wcwidth])
8986@@ -395,17 +492,16 @@ AC_DEFUN([gl_INIT],
8987 gl_gnulib_enabled_dynarray=false
8988 gl_gnulib_enabled_fcntl=false
8989 gl_gnulib_enabled_43fe87a341d9b4b93c47c3ad819a5239=false
8990+ gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955=false
8991 gl_gnulib_enabled_fstat=false
8992 gl_gnulib_enabled_getdtablesize=false
8993 gl_gnulib_enabled_30838f5439487421042f2225bed3af76=false
8994- gl_gnulib_enabled_intprops=false
8995 gl_gnulib_enabled_langinfo=false
8996 gl_gnulib_enabled_21ee726a3540c09237a8e70c0baf7467=false
8997 gl_gnulib_enabled_localcharset=false
8998 gl_gnulib_enabled_locale=false
8999 gl_gnulib_enabled_localeconv=false
9000 gl_gnulib_enabled_lock=false
9001- gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=false
9002 gl_gnulib_enabled_mbtowc=false
9003 gl_gnulib_enabled_mempcpy=false
9004 gl_gnulib_enabled_f691f076f650964c9f5598c3ee487616=false
9005@@ -506,8 +602,9 @@ AC_DEFUN([gl_INIT],
9006 func_gl_gnulib_m4code_dynarray ()
9007 {
9008 if ! $gl_gnulib_enabled_dynarray; then
9009+ AC_PROG_MKDIR_P
9010 gl_gnulib_enabled_dynarray=true
9011- func_gl_gnulib_m4code_intprops
9012+ func_gl_gnulib_m4code_37f71b604aa9c54446783d80f42fe547
9013 func_gl_gnulib_m4code_21ee726a3540c09237a8e70c0baf7467
9014 fi
9015 }
9016@@ -540,6 +637,18 @@ AC_DEFUN([gl_INIT],
9017 gl_gnulib_enabled_43fe87a341d9b4b93c47c3ad819a5239=true
9018 fi
9019 }
9020+ func_gl_gnulib_m4code_ef07dc4b3077c11ea9cef586db4e5955 ()
9021+ {
9022+ if ! $gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955; then
9023+ gl_FUNC_FREE
9024+ if test $REPLACE_FREE = 1; then
9025+ AC_LIBOBJ([free])
9026+ gl_PREREQ_FREE
9027+ fi
9028+ gl_STDLIB_MODULE_INDICATOR([free-posix])
9029+ gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955=true
9030+ fi
9031+ }
9032 func_gl_gnulib_m4code_fstat ()
9033 {
9034 if ! $gl_gnulib_enabled_fstat; then
9035@@ -595,16 +704,11 @@ AC_DEFUN([gl_INIT],
9036 func_gl_gnulib_m4code_e7e881d32ca02f1c997b13c737c64bbd
9037 fi
9038 }
9039- func_gl_gnulib_m4code_intprops ()
9040- {
9041- if ! $gl_gnulib_enabled_intprops; then
9042- gl_gnulib_enabled_intprops=true
9043- fi
9044- }
9045 func_gl_gnulib_m4code_langinfo ()
9046 {
9047 if ! $gl_gnulib_enabled_langinfo; then
9048 gl_LANGINFO_H
9049+ gl_LANGINFO_H_REQUIRE_DEFAULTS
9050 gl_gnulib_enabled_langinfo=true
9051 fi
9052 }
9053@@ -629,6 +733,7 @@ AC_DEFUN([gl_INIT],
9054 {
9055 if ! $gl_gnulib_enabled_locale; then
9056 gl_LOCALE_H
9057+ gl_LOCALE_H_REQUIRE_DEFAULTS
9058 gl_gnulib_enabled_locale=true
9059 fi
9060 }
9061@@ -666,18 +771,6 @@ AC_DEFUN([gl_INIT],
9062 fi
9063 fi
9064 }
9065- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866 ()
9066- {
9067- if ! $gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866; then
9068- gl_FUNC_MALLOC_POSIX
9069- if test $REPLACE_MALLOC = 1; then
9070- AC_LIBOBJ([malloc])
9071- fi
9072- gl_STDLIB_MODULE_INDICATOR([malloc-posix])
9073- gl_MODULE_INDICATOR([malloc-posix])
9074- gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=true
9075- fi
9076- }
9077 func_gl_gnulib_m4code_mbtowc ()
9078 {
9079 if ! $gl_gnulib_enabled_mbtowc; then
9080@@ -803,7 +896,6 @@ AC_DEFUN([gl_INIT],
9081 gl_STAT_TIME
9082 gl_STAT_BIRTHTIME
9083 gl_gnulib_enabled_0137e3d3638b33e5819d132d0b23165c=true
9084- func_gl_gnulib_m4code_intprops
9085 func_gl_gnulib_m4code_time
9086 fi
9087 }
9088@@ -870,7 +962,8 @@ AC_DEFUN([gl_INIT],
9089 func_gl_gnulib_m4code_sys_stat ()
9090 {
9091 if ! $gl_gnulib_enabled_sys_stat; then
9092- gl_HEADER_SYS_STAT_H
9093+ gl_SYS_STAT_H
9094+ gl_SYS_STAT_H_REQUIRE_DEFAULTS
9095 AC_PROG_MKDIR_P
9096 gl_gnulib_enabled_sys_stat=true
9097 func_gl_gnulib_m4code_time
9098@@ -886,7 +979,8 @@ AC_DEFUN([gl_INIT],
9099 func_gl_gnulib_m4code_time ()
9100 {
9101 if ! $gl_gnulib_enabled_time; then
9102- gl_HEADER_TIME_H
9103+ gl_TIME_H
9104+ gl_TIME_H_REQUIRE_DEFAULTS
9105 gl_gnulib_enabled_time=true
9106 fi
9107 }
9108@@ -897,6 +991,7 @@ AC_DEFUN([gl_INIT],
9109 gl_FUNC_VASNPRINTF
9110 gl_gnulib_enabled_vasnprintf=true
9111 func_gl_gnulib_m4code_attribute
9112+ func_gl_gnulib_m4code_ef07dc4b3077c11ea9cef586db4e5955
9113 func_gl_gnulib_m4code_xsize
9114 fi
9115 }
9116@@ -1002,6 +1097,9 @@ AC_DEFUN([gl_INIT],
9117 if test $REPLACE_OPEN = 1; then
9118 func_gl_gnulib_m4code_stat
9119 fi
9120+ if test $REPLACE_REALLOC = 1; then
9121+ func_gl_gnulib_m4code_ef07dc4b3077c11ea9cef586db4e5955
9122+ fi
9123 if test $ac_use_included_regex = yes; then
9124 func_gl_gnulib_m4code_attribute
9125 fi
9126@@ -1015,9 +1113,6 @@ AC_DEFUN([gl_INIT],
9127 func_gl_gnulib_m4code_dynarray
9128 fi
9129 if test $ac_use_included_regex = yes; then
9130- func_gl_gnulib_m4code_intprops
9131- fi
9132- if test $ac_use_included_regex = yes; then
9133 func_gl_gnulib_m4code_langinfo
9134 fi
9135 if test $ac_use_included_regex = yes; then
9136@@ -1032,12 +1127,6 @@ AC_DEFUN([gl_INIT],
9137 if test $ac_use_included_regex = yes; then
9138 func_gl_gnulib_m4code_wcrtomb
9139 fi
9140- if test $REPLACE_STRDUP = 1; then
9141- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
9142- fi
9143- if test $REPLACE_STRERROR = 1; then
9144- func_gl_gnulib_m4code_intprops
9145- fi
9146 if test $REPLACE_STRERROR = 1; then
9147 func_gl_gnulib_m4code_dbb57f49352be8fb86869629a254fb72
9148 fi
9149@@ -1057,17 +1146,16 @@ AC_DEFUN([gl_INIT],
9150 AM_CONDITIONAL([gl_GNULIB_ENABLED_dynarray], [$gl_gnulib_enabled_dynarray])
9151 AM_CONDITIONAL([gl_GNULIB_ENABLED_fcntl], [$gl_gnulib_enabled_fcntl])
9152 AM_CONDITIONAL([gl_GNULIB_ENABLED_43fe87a341d9b4b93c47c3ad819a5239], [$gl_gnulib_enabled_43fe87a341d9b4b93c47c3ad819a5239])
9153+ AM_CONDITIONAL([gl_GNULIB_ENABLED_ef07dc4b3077c11ea9cef586db4e5955], [$gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955])
9154 AM_CONDITIONAL([gl_GNULIB_ENABLED_fstat], [$gl_gnulib_enabled_fstat])
9155 AM_CONDITIONAL([gl_GNULIB_ENABLED_getdtablesize], [$gl_gnulib_enabled_getdtablesize])
9156 AM_CONDITIONAL([gl_GNULIB_ENABLED_30838f5439487421042f2225bed3af76], [$gl_gnulib_enabled_30838f5439487421042f2225bed3af76])
9157- AM_CONDITIONAL([gl_GNULIB_ENABLED_intprops], [$gl_gnulib_enabled_intprops])
9158 AM_CONDITIONAL([gl_GNULIB_ENABLED_langinfo], [$gl_gnulib_enabled_langinfo])
9159 AM_CONDITIONAL([gl_GNULIB_ENABLED_21ee726a3540c09237a8e70c0baf7467], [$gl_gnulib_enabled_21ee726a3540c09237a8e70c0baf7467])
9160 AM_CONDITIONAL([gl_GNULIB_ENABLED_localcharset], [$gl_gnulib_enabled_localcharset])
9161 AM_CONDITIONAL([gl_GNULIB_ENABLED_locale], [$gl_gnulib_enabled_locale])
9162 AM_CONDITIONAL([gl_GNULIB_ENABLED_localeconv], [$gl_gnulib_enabled_localeconv])
9163 AM_CONDITIONAL([gl_GNULIB_ENABLED_lock], [$gl_gnulib_enabled_lock])
9164- AM_CONDITIONAL([gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866], [$gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866])
9165 AM_CONDITIONAL([gl_GNULIB_ENABLED_mbtowc], [$gl_gnulib_enabled_mbtowc])
9166 AM_CONDITIONAL([gl_GNULIB_ENABLED_mempcpy], [$gl_gnulib_enabled_mempcpy])
9167 AM_CONDITIONAL([gl_GNULIB_ENABLED_f691f076f650964c9f5598c3ee487616], [$gl_gnulib_enabled_f691f076f650964c9f5598c3ee487616])
9168@@ -1105,6 +1193,8 @@ AC_DEFUN([gl_INIT],
9169 m4_if(m4_sysval, [0], [],
9170 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
9171 ])
9172+ m4_popdef([GL_MODULE_INDICATOR_PREFIX])
9173+ m4_popdef([GL_MACRO_PREFIX])
9174 m4_popdef([gl_LIBSOURCES_DIR])
9175 m4_popdef([gl_LIBSOURCES_LIST])
9176 m4_popdef([AC_LIBSOURCES])
9177@@ -1131,6 +1221,8 @@ AC_DEFUN([gl_INIT],
9178 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
9179 m4_pushdef([gltests_LIBSOURCES_LIST], [])
9180 m4_pushdef([gltests_LIBSOURCES_DIR], [])
9181+ m4_pushdef([GL_MACRO_PREFIX], [gltests])
9182+ m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
9183 gl_COMMON
9184 gl_source_base='tests'
9185 changequote(,)dnl
9186@@ -1152,6 +1244,8 @@ changequote([, ])dnl
9187 m4_if(m4_sysval, [0], [],
9188 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
9189 ])
9190+ m4_popdef([GL_MODULE_INDICATOR_PREFIX])
9191+ m4_popdef([GL_MACRO_PREFIX])
9192 m4_popdef([gltests_LIBSOURCES_DIR])
9193 m4_popdef([gltests_LIBSOURCES_LIST])
9194 m4_popdef([AC_LIBSOURCES])
9195@@ -1247,6 +1341,7 @@ AC_DEFUN([gl_FILE_LIST], [
9196 lib/basename-lgpl.h
9197 lib/btowc.c
9198 lib/c++defs.h
9199+ lib/calloc.c
9200 lib/cdefs.h
9201 lib/cloexec.c
9202 lib/cloexec.h
9203@@ -1266,6 +1361,7 @@ AC_DEFUN([gl_FILE_LIST], [
9204 lib/float+.h
9205 lib/float.c
9206 lib/float.in.h
9207+ lib/free.c
9208 lib/fstat.c
9209 lib/getdtablesize.c
9210 lib/getopt-cdefs.in.h
9211@@ -1285,6 +1381,9 @@ AC_DEFUN([gl_FILE_LIST], [
9212 lib/glthread/threadlib.c
9213 lib/hard-locale.c
9214 lib/hard-locale.h
9215+ lib/ialloc.c
9216+ lib/ialloc.h
9217+ lib/idx.h
9218 lib/intprops.h
9219 lib/inttypes.in.h
9220 lib/iswblank.c
9221@@ -1335,6 +1434,7 @@ AC_DEFUN([gl_FILE_LIST], [
9222 lib/memchr.valgrind
9223 lib/mempcpy.c
9224 lib/memrchr.c
9225+ lib/minmax.h
9226 lib/msvc-inval.c
9227 lib/msvc-inval.h
9228 lib/msvc-nothrow.c
9229@@ -1347,6 +1447,8 @@ AC_DEFUN([gl_FILE_LIST], [
9230 lib/printf-args.h
9231 lib/printf-parse.c
9232 lib/printf-parse.h
9233+ lib/realloc.c
9234+ lib/reallocarray.c
9235 lib/regcomp.c
9236 lib/regex.c
9237 lib/regex.h
9238@@ -1427,6 +1529,7 @@ AC_DEFUN([gl_FILE_LIST], [
9239 m4/argz.m4
9240 m4/btowc.m4
9241 m4/builtin-expect.m4
9242+ m4/calloc.m4
9243 m4/close.m4
9244 m4/codeset.m4
9245 m4/double-slash-root.m4
9246@@ -1441,6 +1544,7 @@ AC_DEFUN([gl_FILE_LIST], [
9247 m4/fcntl.m4
9248 m4/fcntl_h.m4
9249 m4/float_h.m4
9250+ m4/free.m4
9251 m4/fstat.m4
9252 m4/getdtablesize.m4
9253 m4/getopt.m4
9254@@ -1483,6 +1587,7 @@ AC_DEFUN([gl_FILE_LIST], [
9255 m4/memchr.m4
9256 m4/mempcpy.m4
9257 m4/memrchr.m4
9258+ m4/minmax.m4
9259 m4/mmap-anon.m4
9260 m4/mode_t.m4
9261 m4/msvc-inval.m4
9262@@ -1498,6 +1603,8 @@ AC_DEFUN([gl_FILE_LIST], [
9263 m4/pid_t.m4
9264 m4/printf.m4
9265 m4/pthread_rwlock_rdlock.m4
9266+ m4/realloc.m4
9267+ m4/reallocarray.m4
9268 m4/regex.m4
9269 m4/setlocale_null.m4
9270 m4/size_max.m4
9271@@ -1540,5 +1647,6 @@ AC_DEFUN([gl_FILE_LIST], [
9272 m4/wint_t.m4
9273 m4/xalloc.m4
9274 m4/xsize.m4
9275+ m4/year2038.m4
9276 m4/zzgnulib.m4
9277 ])
9278--- a/gnulib/m4/inttypes.m4
9279+++ b/gnulib/m4/inttypes.m4
9280@@ -1,4 +1,4 @@
9281-# inttypes.m4 serial 32
9282+# inttypes.m4 serial 35
9283 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
9284 dnl This file is free software; the Free Software Foundation
9285 dnl gives unlimited permission to copy and/or distribute it,
9286@@ -7,7 +7,7 @@ dnl with or without modifications, as lo
9287 dnl From Derek Price, Bruno Haible.
9288 dnl Test whether <inttypes.h> is supported or must be substituted.
9289
9290-AC_DEFUN([gl_INTTYPES_H],
9291+AC_DEFUN_ONCE([gl_INTTYPES_H],
9292 [
9293 AC_REQUIRE([gl_INTTYPES_INCOMPLETE])
9294 gl_INTTYPES_PRI_SCN
9295@@ -136,19 +136,34 @@ AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_IN
9296 AC_SUBST([$1])
9297 ])
9298
9299+# gl_INTTYPES_MODULE_INDICATOR([modulename])
9300+# sets the shell variable that indicates the presence of the given module
9301+# to a C preprocessor expression that will evaluate to 1.
9302+# This macro invocation must not occur in macros that are AC_REQUIREd.
9303 AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR],
9304 [
9305- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
9306- AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
9307+ dnl Ensure to expand the default settings once only.
9308+ gl_INTTYPES_H_REQUIRE_DEFAULTS
9309 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
9310 ])
9311
9312+# Initializes the default values for AC_SUBSTed shell variables.
9313+# This macro must not be AC_REQUIREd. It must only be invoked, and only
9314+# outside of macros or in macros that are not AC_REQUIREd.
9315+AC_DEFUN([gl_INTTYPES_H_REQUIRE_DEFAULTS],
9316+[
9317+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_INTTYPES_H_MODULE_INDICATOR_DEFAULTS], [
9318+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_IMAXABS])
9319+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_IMAXDIV])
9320+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOIMAX])
9321+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOUMAX])
9322+ ])
9323+ m4_require(GL_MODULE_INDICATOR_PREFIX[_INTTYPES_H_MODULE_INDICATOR_DEFAULTS])
9324+ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
9325+])
9326+
9327 AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
9328 [
9329- GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS])
9330- GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV])
9331- GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX])
9332- GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX])
9333 dnl Assume proper GNU behavior unless another module says otherwise.
9334 HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS])
9335 HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV])
9336--- a/gnulib/m4/iswdigit.m4
9337+++ b/gnulib/m4/iswdigit.m4
9338@@ -1,4 +1,4 @@
9339-# iswdigit.m4 serial 2
9340+# iswdigit.m4 serial 3
9341 dnl Copyright (C) 2020-2021 Free Software Foundation, Inc.
9342 dnl This file is free software; the Free Software Foundation
9343 dnl gives unlimited permission to copy and/or distribute it,
9344@@ -81,12 +81,12 @@ main (int argc, char *argv[])
9345 }
9346 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
9347 {
9348- /* This fails on FreeBSD 12, NetBSD 8.0, MSVC 14. */
9349+ /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
9350 /* U+0663 ARABIC-INDIC DIGIT THREE */
9351 is = for_character ("\331\243", 2);
9352 if (!(is == 0))
9353 result |= 4;
9354- /* This fails on FreeBSD 12, NetBSD 8.0, MSVC 14. */
9355+ /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
9356 /* U+FF11 FULLWIDTH DIGIT ONE */
9357 is = for_character ("\357\274\221", 3);
9358 if (!(is == 0))
9359--- a/gnulib/m4/iswxdigit.m4
9360+++ b/gnulib/m4/iswxdigit.m4
9361@@ -1,4 +1,4 @@
9362-# iswxdigit.m4 serial 2
9363+# iswxdigit.m4 serial 3
9364 dnl Copyright (C) 2020-2021 Free Software Foundation, Inc.
9365 dnl This file is free software; the Free Software Foundation
9366 dnl gives unlimited permission to copy and/or distribute it,
9367@@ -72,7 +72,7 @@ main (int argc, char *argv[])
9368 }
9369 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
9370 {
9371- /* This fails on FreeBSD 12. */
9372+ /* This fails on FreeBSD 13.0. */
9373 /* U+0663 ARABIC-INDIC DIGIT THREE */
9374 is = for_character ("\331\243", 2);
9375 if (!(is == 0))
9376--- a/gnulib/m4/langinfo_h.m4
9377+++ b/gnulib/m4/langinfo_h.m4
9378@@ -1,10 +1,10 @@
9379-# langinfo_h.m4 serial 9
9380+# langinfo_h.m4 serial 12
9381 dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
9382 dnl This file is free software; the Free Software Foundation
9383 dnl gives unlimited permission to copy and/or distribute it,
9384 dnl with or without modifications, as long as this notice is preserved.
9385
9386-AC_DEFUN([gl_LANGINFO_H],
9387+AC_DEFUN_ONCE([gl_LANGINFO_H],
9388 [
9389 AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
9390
9391@@ -104,18 +104,33 @@ int a = YESEXPR;
9392 ]], [nl_langinfo])
9393 ])
9394
9395+# gl_LANGINFO_MODULE_INDICATOR([modulename])
9396+# sets the shell variable that indicates the presence of the given module
9397+# to a C preprocessor expression that will evaluate to 1.
9398+# This macro invocation must not occur in macros that are AC_REQUIREd.
9399 AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR],
9400 [
9401- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
9402- AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
9403+ dnl Ensure to expand the default settings once only.
9404+ gl_LANGINFO_H_REQUIRE_DEFAULTS
9405 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
9406 dnl Define it also as a C macro, for the benefit of the unit tests.
9407 gl_MODULE_INDICATOR_FOR_TESTS([$1])
9408 ])
9409
9410+# Initializes the default values for AC_SUBSTed shell variables.
9411+# This macro must not be AC_REQUIREd. It must only be invoked, and only
9412+# outside of macros or in macros that are not AC_REQUIREd.
9413+AC_DEFUN([gl_LANGINFO_H_REQUIRE_DEFAULTS],
9414+[
9415+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_LANGINFO_H_MODULE_INDICATOR_DEFAULTS], [
9416+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NL_LANGINFO])
9417+ ])
9418+ m4_require(GL_MODULE_INDICATOR_PREFIX[_LANGINFO_H_MODULE_INDICATOR_DEFAULTS])
9419+ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
9420+])
9421+
9422 AC_DEFUN([gl_LANGINFO_H_DEFAULTS],
9423 [
9424- GNULIB_NL_LANGINFO=0; AC_SUBST([GNULIB_NL_LANGINFO])
9425 dnl Assume proper GNU behavior unless another module says otherwise.
9426 HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO])
9427 REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO])
9428--- a/gnulib/m4/largefile.m4
9429+++ b/gnulib/m4/largefile.m4
9430@@ -22,7 +22,8 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
9431 esac
9432 ])
9433
9434-# The following implementation works around a problem in autoconf <= 2.69;
9435+# Work around a problem in Autoconf through at least 2.71 on glibc 2.34+
9436+# with _TIME_BITS. Also, work around a problem in autoconf <= 2.69:
9437 # AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
9438 # or configures them incorrectly in some cases.
9439 m4_version_prereq([2.70], [], [
9440@@ -40,6 +41,7 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUD
9441 && LARGE_OFF_T % 2147483647 == 1)
9442 ? 1 : -1]];[]dnl
9443 ])
9444+])# m4_version_prereq 2.70
9445
9446
9447 # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
9448@@ -54,7 +56,8 @@ m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE
9449 [AC_LANG_PROGRAM([$5], [$6])],
9450 [$3=no; break])
9451 m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
9452- [AC_LANG_PROGRAM([#define $1 $2
9453+ [AC_LANG_PROGRAM([#undef $1
9454+#define $1 $2
9455 $5], [$6])],
9456 [$3=$2; break])
9457 $3=unknown
9458@@ -80,9 +83,8 @@ rm -rf conftest*[]dnl
9459 AC_DEFUN([AC_SYS_LARGEFILE],
9460 [AC_ARG_ENABLE(largefile,
9461 [ --disable-largefile omit support for large files])
9462-if test "$enable_largefile" != no; then
9463-
9464- AC_CACHE_CHECK([for special C compiler options needed for large files],
9465+AS_IF([test "$enable_largefile" != no],
9466+ [AC_CACHE_CHECK([for special C compiler options needed for large files],
9467 ac_cv_sys_largefile_CC,
9468 [ac_cv_sys_largefile_CC=no
9469 if test "$GCC" != yes; then
9470@@ -107,15 +109,15 @@ if test "$enable_largefile" != no; then
9471 ac_cv_sys_file_offset_bits,
9472 [Number of bits in a file offset, on hosts where this is settable.],
9473 [_AC_SYS_LARGEFILE_TEST_INCLUDES])
9474- if test $ac_cv_sys_file_offset_bits = unknown; then
9475- _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
9476- ac_cv_sys_large_files,
9477- [Define for large files, on AIX-style hosts.],
9478- [_AC_SYS_LARGEFILE_TEST_INCLUDES])
9479- fi
9480-fi
9481+ AS_CASE([$ac_cv_sys_file_offset_bits],
9482+ [unknown],
9483+ [_AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1],
9484+ [ac_cv_sys_large_files],
9485+ [Define for large files, on AIX-style hosts.],
9486+ [_AC_SYS_LARGEFILE_TEST_INCLUDES])],
9487+ [64],
9488+ [gl_YEAR2038_BODY([])])])
9489 ])# AC_SYS_LARGEFILE
9490-])# m4_version_prereq 2.70
9491
9492 # Enable large files on systems where this is implemented by Gnulib, not by the
9493 # system headers.
9494--- a/gnulib/m4/locale_h.m4
9495+++ b/gnulib/m4/locale_h.m4
9496@@ -1,13 +1,13 @@
9497-# locale_h.m4 serial 25
9498+# locale_h.m4 serial 28
9499 dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
9500 dnl This file is free software; the Free Software Foundation
9501 dnl gives unlimited permission to copy and/or distribute it,
9502 dnl with or without modifications, as long as this notice is preserved.
9503
9504-AC_DEFUN([gl_LOCALE_H],
9505+AC_DEFUN_ONCE([gl_LOCALE_H],
9506 [
9507- dnl Use AC_REQUIRE here, so that the default behavior below is expanded
9508- dnl once only, before all statements that occur in other macros.
9509+ dnl Ensure to expand the default settings once only, before all statements
9510+ dnl that occur in other macros.
9511 AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
9512
9513 dnl Persuade glibc <locale.h> to define locale_t and the int_p_*, int_n_*
9514@@ -129,22 +129,37 @@ AC_DEFUN([gl_LOCALE_T],
9515 AC_SUBST([HAVE_XLOCALE_H])
9516 ])
9517
9518+# gl_LOCALE_MODULE_INDICATOR([modulename])
9519+# sets the shell variable that indicates the presence of the given module
9520+# to a C preprocessor expression that will evaluate to 1.
9521+# This macro invocation must not occur in macros that are AC_REQUIREd.
9522 AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
9523 [
9524- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
9525- AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
9526+ dnl Ensure to expand the default settings once only.
9527+ gl_LOCALE_H_REQUIRE_DEFAULTS
9528 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
9529 dnl Define it also as a C macro, for the benefit of the unit tests.
9530 gl_MODULE_INDICATOR_FOR_TESTS([$1])
9531 ])
9532
9533+# Initializes the default values for AC_SUBSTed shell variables.
9534+# This macro must not be AC_REQUIREd. It must only be invoked, and only
9535+# outside of macros or in macros that are not AC_REQUIREd.
9536+AC_DEFUN([gl_LOCALE_H_REQUIRE_DEFAULTS],
9537+[
9538+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_LOCALE_H_MODULE_INDICATOR_DEFAULTS], [
9539+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALECONV])
9540+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETLOCALE])
9541+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETLOCALE_NULL])
9542+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUPLOCALE])
9543+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALENAME])
9544+ ])
9545+ m4_require(GL_MODULE_INDICATOR_PREFIX[_LOCALE_H_MODULE_INDICATOR_DEFAULTS])
9546+ AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
9547+])
9548+
9549 AC_DEFUN([gl_LOCALE_H_DEFAULTS],
9550 [
9551- GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV])
9552- GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE])
9553- GNULIB_SETLOCALE_NULL=0; AC_SUBST([GNULIB_SETLOCALE_NULL])
9554- GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE])
9555- GNULIB_LOCALENAME=0; AC_SUBST([GNULIB_LOCALENAME])
9556 dnl Assume proper GNU behavior unless another module says otherwise.
9557 HAVE_NEWLOCALE=1; AC_SUBST([HAVE_NEWLOCALE])
9558 HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE])
9559--- a/gnulib/m4/malloc.m4
9560+++ b/gnulib/m4/malloc.m4
9561@@ -1,21 +1,21 @@
9562-# malloc.m4 serial 22
9563+# malloc.m4 serial 27
9564 dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
9565 dnl This file is free software; the Free Software Foundation
9566 dnl gives unlimited permission to copy and/or distribute it,
9567 dnl with or without modifications, as long as this notice is preserved.
9568
9569 # This is adapted with modifications from upstream Autoconf here:
9570-# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
9571+# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n949
9572 AC_DEFUN([_AC_FUNC_MALLOC_IF],
9573 [
9574 AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
9575- AC_CACHE_CHECK([for GNU libc compatible malloc],
9576+ AC_CACHE_CHECK([whether malloc (0) returns nonnull],
9577 [ac_cv_func_malloc_0_nonnull],
9578 [AC_RUN_IFELSE(
9579 [AC_LANG_PROGRAM(
9580 [[#include <stdlib.h>
9581 ]],
9582- [[char *p = malloc (0);
9583+ [[void *p = malloc (0);
9584 int result = !p;
9585 free (p);
9586 return result;]])
9587@@ -24,75 +24,151 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
9588 [ac_cv_func_malloc_0_nonnull=no],
9589 [case "$host_os" in
9590 # Guess yes on platforms where we know the result.
9591- *-gnu* | gnu* | *-musl* | freebsd* | midnightbsd* | netbsd* | openbsd* \
9592- | hpux* | solaris* | cygwin* | mingw*)
9593+ *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
9594+ | gnu* | *-musl* | midnightbsd* \
9595+ | hpux* | solaris* | cygwin* | mingw* | msys* )
9596 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
9597 # If we don't know, obey --enable-cross-guesses.
9598 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
9599 esac
9600 ])
9601 ])
9602- case "$ac_cv_func_malloc_0_nonnull" in
9603- *yes)
9604- $1
9605- ;;
9606- *)
9607- $2
9608- ;;
9609- esac
9610+ AS_CASE([$ac_cv_func_malloc_0_nonnull], [*yes], [$1], [$2])
9611 ])# _AC_FUNC_MALLOC_IF
9612
9613 # gl_FUNC_MALLOC_GNU
9614 # ------------------
9615-# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
9616-# it is not.
9617+# Replace malloc if it is not compatible with GNU libc.
9618 AC_DEFUN([gl_FUNC_MALLOC_GNU],
9619 [
9620 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
9621- dnl _AC_FUNC_MALLOC_IF is defined in Autoconf.
9622- _AC_FUNC_MALLOC_IF(
9623- [AC_DEFINE([HAVE_MALLOC_GNU], [1],
9624- [Define to 1 if your system has a GNU libc compatible 'malloc'
9625- function, and to 0 otherwise.])],
9626- [AC_DEFINE([HAVE_MALLOC_GNU], [0])
9627- REPLACE_MALLOC=1
9628+ AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
9629+ if test $REPLACE_MALLOC = 0; then
9630+ _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=1])
9631+ fi
9632+])
9633+
9634+# gl_FUNC_MALLOC_PTRDIFF
9635+# ----------------------
9636+# Test whether malloc (N) reliably fails when N exceeds PTRDIFF_MAX,
9637+# and replace malloc otherwise.
9638+AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF],
9639+[
9640+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
9641+ AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
9642+ test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1
9643+])
9644+
9645+# Test whether malloc, realloc, calloc refuse to create objects
9646+# larger than what can be expressed in ptrdiff_t.
9647+# Set gl_cv_func_malloc_gnu to yes or no accordingly.
9648+AC_DEFUN([gl_CHECK_MALLOC_PTRDIFF],
9649+[
9650+ AC_CACHE_CHECK([whether malloc is ptrdiff_t safe],
9651+ [gl_cv_malloc_ptrdiff],
9652+ [AC_COMPILE_IFELSE(
9653+ [AC_LANG_PROGRAM(
9654+ [[#include <stdint.h>
9655+ ]],
9656+ [[/* 64-bit ptrdiff_t is so wide that no practical platform
9657+ can exceed it. */
9658+ #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
9659+
9660+ /* On rare machines where size_t fits in ptrdiff_t there
9661+ is no problem. */
9662+ #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
9663+
9664+ /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
9665+ bounds even on 32-bit platforms. We don't know which
9666+ non-glibc systems are safe. */
9667+ #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
9668+
9669+ #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
9670+ return 0;
9671+ #else
9672+ #error "malloc might not be ptrdiff_t safe"
9673+ syntax error
9674+ #endif
9675+ ]])],
9676+ [gl_cv_malloc_ptrdiff=yes],
9677+ [gl_cv_malloc_ptrdiff=no])
9678 ])
9679 ])
9680
9681 # gl_FUNC_MALLOC_POSIX
9682 # --------------------
9683 # Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
9684-# fails), and replace malloc if it is not.
9685+# fails, and doesn't mess up with ptrdiff_t overflow), and replace
9686+# malloc if it is not.
9687 AC_DEFUN([gl_FUNC_MALLOC_POSIX],
9688 [
9689 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
9690+ AC_REQUIRE([gl_FUNC_MALLOC_PTRDIFF])
9691 AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
9692- if test $gl_cv_func_malloc_posix = yes; then
9693+ if test "$gl_cv_func_malloc_posix" = yes; then
9694 AC_DEFINE([HAVE_MALLOC_POSIX], [1],
9695- [Define if the 'malloc' function is POSIX compliant.])
9696+ [Define if malloc, realloc, and calloc set errno on allocation failure.])
9697 else
9698 REPLACE_MALLOC=1
9699 fi
9700 ])
9701
9702-# Test whether malloc, realloc, calloc are POSIX compliant,
9703+# Test whether malloc, realloc, calloc set errno to ENOMEM on failure.
9704 # Set gl_cv_func_malloc_posix to yes or no accordingly.
9705 AC_DEFUN([gl_CHECK_MALLOC_POSIX],
9706 [
9707- AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant],
9708+ AC_REQUIRE([AC_CANONICAL_HOST])
9709+ AC_CACHE_CHECK([whether malloc, realloc, calloc set errno on failure],
9710 [gl_cv_func_malloc_posix],
9711 [
9712 dnl It is too dangerous to try to allocate a large amount of memory:
9713 dnl some systems go to their knees when you do that. So assume that
9714- dnl all Unix implementations of the function are POSIX compliant.
9715- AC_COMPILE_IFELSE(
9716- [AC_LANG_PROGRAM(
9717- [[]],
9718- [[#if defined _WIN32 && ! defined __CYGWIN__
9719- choke me
9720- #endif
9721- ]])],
9722- [gl_cv_func_malloc_posix=yes],
9723- [gl_cv_func_malloc_posix=no])
9724+ dnl all Unix implementations of the function set errno on failure,
9725+ dnl except on those platforms where we have seen 'test-malloc-gnu',
9726+ dnl 'test-realloc-gnu', 'test-calloc-gnu' fail.
9727+ case "$host_os" in
9728+ mingw*)
9729+ gl_cv_func_malloc_posix=no ;;
9730+ irix* | solaris*)
9731+ dnl On IRIX 6.5, the three functions return NULL with errno unset
9732+ dnl when the argument is larger than PTRDIFF_MAX.
9733+ dnl On Solaris 11.3, the three functions return NULL with errno set
9734+ dnl to EAGAIN, not ENOMEM, when the argument is larger than
9735+ dnl PTRDIFF_MAX.
9736+ dnl Here is a test program:
9737+m4_divert_push([KILL])
9738+#include <errno.h>
9739+#include <stdio.h>
9740+#include <stdlib.h>
9741+#define ptrdiff_t long
9742+#ifndef PTRDIFF_MAX
9743+# define PTRDIFF_MAX ((ptrdiff_t) ((1UL << (8 * sizeof (ptrdiff_t) - 1)) - 1))
9744+#endif
9745+
9746+int main ()
9747+{
9748+ void *p;
9749+
9750+ fprintf (stderr, "PTRDIFF_MAX = %lu\n", (unsigned long) PTRDIFF_MAX);
9751+
9752+ errno = 0;
9753+ p = malloc ((unsigned long) PTRDIFF_MAX + 1);
9754+ fprintf (stderr, "p=%p errno=%d\n", p, errno);
9755+
9756+ errno = 0;
9757+ p = calloc (PTRDIFF_MAX / 2 + 1, 2);
9758+ fprintf (stderr, "p=%p errno=%d\n", p, errno);
9759+
9760+ errno = 0;
9761+ p = realloc (NULL, (unsigned long) PTRDIFF_MAX + 1);
9762+ fprintf (stderr, "p=%p errno=%d\n", p, errno);
9763+
9764+ return 0;
9765+}
9766+m4_divert_pop([KILL])
9767+ gl_cv_func_malloc_posix=no ;;
9768+ *)
9769+ gl_cv_func_malloc_posix=yes ;;
9770+ esac
9771 ])
9772 ])
9773--- a/gnulib/m4/mbslen.m4
9774+++ b/gnulib/m4/mbslen.m4
9775@@ -1,4 +1,4 @@
9776-# mbslen.m4 serial 2
9777+# mbslen.m4 serial 3
9778 dnl Copyright (C) 2010-2021 Free Software Foundation, Inc.
9779 dnl This file is free software; the Free Software Foundation
9780 dnl gives unlimited permission to copy and/or distribute it,
9781@@ -6,7 +6,7 @@ dnl with or without modifications, as lo
9782
9783 AC_DEFUN([gl_FUNC_MBSLEN],
9784 [
9785- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
9786+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
9787 AC_CHECK_FUNCS_ONCE([mbslen])
9788 if test $ac_cv_func_mbslen = yes; then
9789 HAVE_MBSLEN=1
9790--- a/gnulib/m4/memchr.m4
9791+++ b/gnulib/m4/memchr.m4
9792@@ -1,4 +1,4 @@
9793-# memchr.m4 serial 17
9794+# memchr.m4 serial 18
9795 dnl Copyright (C) 2002-2004, 2009-2021 Free Software Foundation, Inc.
9796 dnl This file is free software; the Free Software Foundation
9797 dnl gives unlimited permission to copy and/or distribute it,
9798@@ -13,7 +13,7 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
9799 AC_CHECK_HEADERS_ONCE([sys/mman.h])
9800 AC_CHECK_FUNCS_ONCE([mprotect])
9801
9802- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
9803+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
9804 # Detect platform-specific bugs in some versions of glibc:
9805 # memchr should not dereference anything with length 0
9806 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
9807--- a/gnulib/m4/mempcpy.m4
9808+++ b/gnulib/m4/mempcpy.m4
9809@@ -1,4 +1,4 @@
9810-# mempcpy.m4 serial 11
9811+# mempcpy.m4 serial 12
9812 dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software Foundation,
9813 dnl Inc.
9814 dnl This file is free software; the Free Software Foundation
9815@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_MEMPCPY],
9816 dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'.
9817 AC_REQUIRE([AC_C_RESTRICT])
9818
9819- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
9820+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
9821 AC_CHECK_FUNCS([mempcpy])
9822 if test $ac_cv_func_mempcpy = no; then
9823 HAVE_MEMPCPY=0
9824--- a/gnulib/m4/memrchr.m4
9825+++ b/gnulib/m4/memrchr.m4
9826@@ -1,4 +1,4 @@
9827-# memrchr.m4 serial 10
9828+# memrchr.m4 serial 11
9829 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation,
9830 dnl Inc.
9831 dnl This file is free software; the Free Software Foundation
9832@@ -10,7 +10,7 @@ AC_DEFUN([gl_FUNC_MEMRCHR],
9833 dnl Persuade glibc <string.h> to declare memrchr().
9834 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
9835
9836- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
9837+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
9838 AC_CHECK_DECLS_ONCE([memrchr])
9839 if test $ac_cv_have_decl_memrchr = no; then
9840 HAVE_DECL_MEMRCHR=0
9841--- /dev/null
9842+++ b/gnulib/m4/minmax.m4
9843@@ -0,0 +1,44 @@
9844+# minmax.m4 serial 4
9845+dnl Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc.
9846+dnl This file is free software; the Free Software Foundation
9847+dnl gives unlimited permission to copy and/or distribute it,
9848+dnl with or without modifications, as long as this notice is preserved.
9849+
9850+AC_PREREQ([2.53])
9851+
9852+AC_DEFUN([gl_MINMAX],
9853+[
9854+ AC_REQUIRE([gl_PREREQ_MINMAX])
9855+])
9856+
9857+# Prerequisites of lib/minmax.h.
9858+AC_DEFUN([gl_PREREQ_MINMAX],
9859+[
9860+ gl_MINMAX_IN_HEADER([limits.h])
9861+ gl_MINMAX_IN_HEADER([sys/param.h])
9862+])
9863+
9864+dnl gl_MINMAX_IN_HEADER(HEADER)
9865+dnl The parameter has to be a literal header name; it cannot be macro,
9866+dnl nor a shell variable. (Because autoheader collects only AC_DEFINE
9867+dnl invocations with a literal macro name.)
9868+AC_DEFUN([gl_MINMAX_IN_HEADER],
9869+[
9870+ m4_pushdef([header], AS_TR_SH([$1]))
9871+ m4_pushdef([HEADER], AS_TR_CPP([$1]))
9872+ AC_CACHE_CHECK([whether <$1> defines MIN and MAX],
9873+ [gl_cv_minmax_in_]header,
9874+ [AC_COMPILE_IFELSE(
9875+ [AC_LANG_PROGRAM(
9876+ [[#include <$1>
9877+ int x = MIN (42, 17);]],
9878+ [[]])],
9879+ [gl_cv_minmax_in_]header[=yes],
9880+ [gl_cv_minmax_in_]header[=no])])
9881+ if test $gl_cv_minmax_in_[]header = yes; then
9882+ AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1,
9883+ [Define to 1 if <$1> defines the MIN and MAX macros.])
9884+ fi
9885+ m4_popdef([HEADER])
9886+ m4_popdef([header])
9887+])
9888--- a/gnulib/m4/printf.m4
9889+++ b/gnulib/m4/printf.m4
9890@@ -1,4 +1,4 @@
9891-# printf.m4 serial 72
9892+# printf.m4 serial 73
9893 dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc.
9894 dnl This file is free software; the Free Software Foundation
9895 dnl gives unlimited permission to copy and/or distribute it,
9896@@ -537,7 +537,7 @@ int main ()
9897 && strcmp (buf, "-0X6.488P-1 33") != 0
9898 && strcmp (buf, "-0XC.91P-2 33") != 0))
9899 result |= 2;
9900- /* This catches a FreeBSD 6.1 bug: it doesn't round. */
9901+ /* This catches a FreeBSD 13.0 bug: it doesn't round. */
9902 if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
9903 || (strcmp (buf, "0x1.83p+0 33") != 0
9904 && strcmp (buf, "0x3.05p-1 33") != 0
9905@@ -1690,6 +1690,7 @@ dnl
9906 dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
9907 dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . .
9908 dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . .
9909+dnl FreeBSD 13.0 . . . . # . . . . . . . . # . . . . . .
9910 dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . .
9911 dnl Mac OS X 10.13.5 . . . # # . # . . . . . . . . . . # . .
9912 dnl Mac OS X 10.5.8 . . . # # . . . . . . # . . . . . . . .
9913--- /dev/null
9914+++ b/gnulib/m4/realloc.m4
9915@@ -0,0 +1,63 @@
9916+# realloc.m4 serial 24
9917+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
9918+dnl This file is free software; the Free Software Foundation
9919+dnl gives unlimited permission to copy and/or distribute it,
9920+dnl with or without modifications, as long as this notice is preserved.
9921+
9922+# This is adapted with modifications from upstream Autoconf here:
9923+# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n1455
9924+AC_DEFUN([_AC_FUNC_REALLOC_IF],
9925+[
9926+ AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
9927+ AC_CACHE_CHECK([whether realloc (0, 0) returns nonnull],
9928+ [ac_cv_func_realloc_0_nonnull],
9929+ [AC_RUN_IFELSE(
9930+ [AC_LANG_PROGRAM(
9931+ [[#include <stdlib.h>
9932+ ]],
9933+ [[void *p = realloc (0, 0);
9934+ int result = !p;
9935+ free (p);
9936+ return result;]])
9937+ ],
9938+ [ac_cv_func_realloc_0_nonnull=yes],
9939+ [ac_cv_func_realloc_0_nonnull=no],
9940+ [case "$host_os" in
9941+ # Guess yes on platforms where we know the result.
9942+ *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
9943+ | gnu* | *-musl* | midnightbsd* \
9944+ | hpux* | solaris* | cygwin* | mingw* | msys* )
9945+ ac_cv_func_realloc_0_nonnull="guessing yes" ;;
9946+ # If we don't know, obey --enable-cross-guesses.
9947+ *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
9948+ esac
9949+ ])
9950+ ])
9951+ AS_CASE([$ac_cv_func_realloc_0_nonnull], [*yes], [$1], [$2])
9952+])# AC_FUNC_REALLOC
9953+
9954+# gl_FUNC_REALLOC_GNU
9955+# -------------------
9956+# Replace realloc if it is not compatible with GNU libc.
9957+AC_DEFUN([gl_FUNC_REALLOC_GNU],
9958+[
9959+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
9960+ AC_REQUIRE([gl_FUNC_REALLOC_POSIX])
9961+ if test $REPLACE_REALLOC = 0; then
9962+ _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC=1])
9963+ fi
9964+])# gl_FUNC_REALLOC_GNU
9965+
9966+# gl_FUNC_REALLOC_POSIX
9967+# ---------------------
9968+# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it
9969+# fails, and doesn't mess up with ptrdiff_t overflow),
9970+# and replace realloc if it is not.
9971+AC_DEFUN([gl_FUNC_REALLOC_POSIX],
9972+[
9973+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
9974+ AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
9975+ if test $REPLACE_MALLOC = 1; then
9976+ REPLACE_REALLOC=1
9977+ fi
9978+])
9979--- /dev/null
9980+++ b/gnulib/m4/reallocarray.m4
9981@@ -0,0 +1,23 @@
9982+# reallocarray.m4 serial 3
9983+dnl Copyright (C) 2017-2021 Free Software Foundation, Inc.
9984+dnl This file is free software; the Free Software Foundation
9985+dnl gives unlimited permission to copy and/or distribute it,
9986+dnl with or without modifications, as long as this notice is preserved.
9987+
9988+AC_DEFUN([gl_FUNC_REALLOCARRAY],
9989+[
9990+ dnl Persuade glibc <stdlib.h> to declare reallocarray.
9991+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
9992+
9993+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
9994+ AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
9995+ AC_CHECK_FUNCS([reallocarray])
9996+ if test "$ac_cv_func_reallocarray" = no; then
9997+ HAVE_REALLOCARRAY=0
9998+ elif test "$gl_cv_malloc_ptrdiff" = no; then
9999+ REPLACE_REALLOCARRAY=1
10000+ fi
10001+])
10002+
10003+# Prerequisites of lib/reallocarray.c.
10004+AC_DEFUN([gl_PREREQ_REALLOCARRAY], [:])
10005--- a/gnulib/m4/stat.m4
10006+++ b/gnulib/m4/stat.m4
10007@@ -1,4 +1,4 @@
10008-# serial 17
10009+# serial 18
10010
10011 # Copyright (C) 2009-2021 Free Software Foundation, Inc.
10012 #
10013@@ -69,7 +69,7 @@ AC_DEFUN([gl_FUNC_STAT],
10014
10015 # Prerequisites of lib/stat.c and lib/stat-w32.c.
10016 AC_DEFUN([gl_PREREQ_STAT], [
10017- AC_REQUIRE([gl_HEADER_SYS_STAT_H])
10018+ AC_REQUIRE([gl_SYS_STAT_H])
10019 AC_REQUIRE([gl_PREREQ_STAT_W32])
10020 :
10021 ])
10022--- a/gnulib/m4/stddef_h.m4
10023+++ b/gnulib/m4/stddef_h.m4
10024@@ -1,4 +1,4 @@
10025-# stddef_h.m4 serial 9
10026+# stddef_h.m4 serial 11
10027 dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
10028 dnl This file is free software; the Free Software Foundation
10029 dnl gives unlimited permission to copy and/or distribute it,
10030@@ -6,7 +6,7 @@ dnl with or without modifications, as lo
10031
10032 dnl A placeholder for <stddef.h>, for platforms that have issues.
10033
10034-AC_DEFUN([gl_STDDEF_H],
10035+AC_DEFUN_ONCE([gl_STDDEF_H],
10036 [
10037 AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
10038 AC_REQUIRE([gt_TYPE_WCHAR_T])
10039@@ -68,13 +68,28 @@ AC_DEFUN([gl_STDDEF_H],
10040 fi
10041 ])
10042
10043+# gl_STDDEF_MODULE_INDICATOR([modulename])
10044+# sets the shell variable that indicates the presence of the given module
10045+# to a C preprocessor expression that will evaluate to 1.
10046+# This macro invocation must not occur in macros that are AC_REQUIREd.
10047 AC_DEFUN([gl_STDDEF_MODULE_INDICATOR],
10048 [
10049- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
10050- AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
10051+ dnl Ensure to expand the default settings once only.
10052+ gl_STDDEF_H_REQUIRE_DEFAULTS
10053 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
10054 ])
10055
10056+# Initializes the default values for AC_SUBSTed shell variables.
10057+# This macro must not be AC_REQUIREd. It must only be invoked, and only
10058+# outside of macros or in macros that are not AC_REQUIREd.
10059+AC_DEFUN([gl_STDDEF_H_REQUIRE_DEFAULTS],
10060+[
10061+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDDEF_H_MODULE_INDICATOR_DEFAULTS], [
10062+ ])
10063+ m4_require(GL_MODULE_INDICATOR_PREFIX[_STDDEF_H_MODULE_INDICATOR_DEFAULTS])
10064+ AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
10065+])
10066+
10067 AC_DEFUN([gl_STDDEF_H_DEFAULTS],
10068 [
10069 dnl Assume proper GNU behavior unless another module says otherwise.
10070--- a/gnulib/m4/stdint.m4
10071+++ b/gnulib/m4/stdint.m4
10072@@ -1,4 +1,4 @@
10073-# stdint.m4 serial 58
10074+# stdint.m4 serial 60
10075 dnl Copyright (C) 2001-2021 Free Software Foundation, Inc.
10076 dnl This file is free software; the Free Software Foundation
10077 dnl gives unlimited permission to copy and/or distribute it,
10078@@ -170,7 +170,7 @@ struct s {
10079 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
10080 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
10081 ? 1 : -1;
10082- /* Detect bug in FreeBSD 6.0 / ia64. */
10083+ /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */
10084 int check_SIG_ATOMIC:
10085 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
10086 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
10087@@ -527,7 +527,7 @@ AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
10088 dnl requirement that wint_t is "unchanged by default argument promotions".
10089 dnl In this case gnulib's <wchar.h> and <wctype.h> override wint_t.
10090 dnl Set the variable BITSIZEOF_WINT_T accordingly.
10091- if test $GNULIB_OVERRIDES_WINT_T = 1; then
10092+ if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
10093 BITSIZEOF_WINT_T=32
10094 fi
10095 ])
10096--- a/gnulib/m4/stdio_h.m4
10097+++ b/gnulib/m4/stdio_h.m4
10098@@ -1,11 +1,12 @@
10099-# stdio_h.m4 serial 52
10100+# stdio_h.m4 serial 56
10101 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
10102 dnl This file is free software; the Free Software Foundation
10103 dnl gives unlimited permission to copy and/or distribute it,
10104 dnl with or without modifications, as long as this notice is preserved.
10105
10106-AC_DEFUN([gl_STDIO_H],
10107+AC_DEFUN_ONCE([gl_STDIO_H],
10108 [
10109+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
10110 AH_VERBATIM([MINGW_ANSI_STDIO],
10111 [/* Use GNU style printf and scanf. */
10112 #ifndef __USE_MINGW_ANSI_STDIO
10113@@ -13,7 +14,6 @@ AC_DEFUN([gl_STDIO_H],
10114 #endif
10115 ])
10116 AC_DEFINE([__USE_MINGW_ANSI_STDIO])
10117- AC_REQUIRE([gl_STDIO_H_DEFAULTS])
10118 gl_NEXT_HEADERS([stdio.h])
10119
10120 dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
10121@@ -40,17 +40,6 @@ AC_DEFUN([gl_STDIO_H],
10122 attribute "__gnu_printf__" instead of "__printf__"])
10123 fi
10124
10125- dnl No need to create extra modules for these functions. Everyone who uses
10126- dnl <stdio.h> likely needs them.
10127- GNULIB_FSCANF=1
10128- gl_MODULE_INDICATOR([fscanf])
10129- GNULIB_SCANF=1
10130- gl_MODULE_INDICATOR([scanf])
10131- GNULIB_FGETC=1
10132- GNULIB_GETC=1
10133- GNULIB_GETCHAR=1
10134- GNULIB_FGETS=1
10135- GNULIB_FREAD=1
10136 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
10137 dnl "expected source file, required through AC_LIBSOURCES, not found". It is
10138 dnl also an optimization, to avoid performing a configure check whose result
10139@@ -64,18 +53,6 @@ AC_DEFUN([gl_STDIO_H],
10140 fi
10141 ])
10142
10143- dnl No need to create extra modules for these functions. Everyone who uses
10144- dnl <stdio.h> likely needs them.
10145- GNULIB_FPRINTF=1
10146- GNULIB_PRINTF=1
10147- GNULIB_VFPRINTF=1
10148- GNULIB_VPRINTF=1
10149- GNULIB_FPUTC=1
10150- GNULIB_PUTC=1
10151- GNULIB_PUTCHAR=1
10152- GNULIB_FPUTS=1
10153- GNULIB_PUTS=1
10154- GNULIB_FWRITE=1
10155 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c"
10156 dnl "expected source file, required through AC_LIBSOURCES, not found". It is
10157 dnl also an optimization, to avoid performing a configure check whose result
10158@@ -116,77 +93,92 @@ AC_DEFUN([gl_STDIO_H],
10159 fi
10160 ])
10161
10162+# gl_STDIO_MODULE_INDICATOR([modulename])
10163+# sets the shell variable that indicates the presence of the given module
10164+# to a C preprocessor expression that will evaluate to 1.
10165+# This macro invocation must not occur in macros that are AC_REQUIREd.
10166 AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
10167 [
10168- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
10169- AC_REQUIRE([gl_STDIO_H_DEFAULTS])
10170+ dnl Ensure to expand the default settings once only.
10171+ gl_STDIO_H_REQUIRE_DEFAULTS
10172 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
10173 dnl Define it also as a C macro, for the benefit of the unit tests.
10174 gl_MODULE_INDICATOR_FOR_TESTS([$1])
10175 ])
10176
10177+# Initializes the default values for AC_SUBSTed shell variables.
10178+# This macro must not be AC_REQUIREd. It must only be invoked, and only
10179+# outside of macros or in macros that are not AC_REQUIREd.
10180+AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS],
10181+[
10182+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDIO_H_MODULE_INDICATOR_DEFAULTS], [
10183+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DPRINTF])
10184+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCLOSE])
10185+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDOPEN])
10186+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFLUSH])
10187+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETC])
10188+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETS])
10189+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN])
10190+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF])
10191+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF_POSIX])
10192+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPURGE])
10193+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPUTC])
10194+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPUTS])
10195+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREAD])
10196+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREOPEN])
10197+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSCANF])
10198+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSEEK])
10199+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSEEKO])
10200+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELL])
10201+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELLO])
10202+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FWRITE])
10203+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETC])
10204+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCHAR])
10205+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDELIM])
10206+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLINE])
10207+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF])
10208+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF_POSIX])
10209+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PCLOSE])
10210+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PERROR])
10211+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POPEN])
10212+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PRINTF])
10213+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PRINTF_POSIX])
10214+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTC])
10215+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTCHAR])
10216+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTS])
10217+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REMOVE])
10218+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RENAME])
10219+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RENAMEAT])
10220+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SCANF])
10221+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SNPRINTF])
10222+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SPRINTF_POSIX])
10223+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_NONBLOCKING])
10224+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_SIGPIPE])
10225+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TMPFILE])
10226+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VASPRINTF])
10227+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFSCANF])
10228+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSCANF])
10229+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VDPRINTF])
10230+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF])
10231+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF_POSIX])
10232+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF])
10233+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF_POSIX])
10234+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSNPRINTF])
10235+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSPRINTF_POSIX])
10236+ dnl Support Microsoft deprecated alias function names by default.
10237+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FCLOSEALL], [1])
10238+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FDOPEN], [1])
10239+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FILENO], [1])
10240+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETW], [1])
10241+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_PUTW], [1])
10242+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TEMPNAM], [1])
10243+ ])
10244+ m4_require(GL_MODULE_INDICATOR_PREFIX[_STDIO_H_MODULE_INDICATOR_DEFAULTS])
10245+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
10246+])
10247+
10248 AC_DEFUN([gl_STDIO_H_DEFAULTS],
10249 [
10250- GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF])
10251- GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE])
10252- GNULIB_FDOPEN=0; AC_SUBST([GNULIB_FDOPEN])
10253- GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH])
10254- GNULIB_FGETC=0; AC_SUBST([GNULIB_FGETC])
10255- GNULIB_FGETS=0; AC_SUBST([GNULIB_FGETS])
10256- GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN])
10257- GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF])
10258- GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX])
10259- GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE])
10260- GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC])
10261- GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS])
10262- GNULIB_FREAD=0; AC_SUBST([GNULIB_FREAD])
10263- GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN])
10264- GNULIB_FSCANF=0; AC_SUBST([GNULIB_FSCANF])
10265- GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK])
10266- GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO])
10267- GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL])
10268- GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO])
10269- GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE])
10270- GNULIB_GETC=0; AC_SUBST([GNULIB_GETC])
10271- GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR])
10272- GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
10273- GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
10274- GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF])
10275- GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
10276- GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE])
10277- GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR])
10278- GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN])
10279- GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF])
10280- GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX])
10281- GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC])
10282- GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR])
10283- GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS])
10284- GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE])
10285- GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME])
10286- GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT])
10287- GNULIB_SCANF=0; AC_SUBST([GNULIB_SCANF])
10288- GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF])
10289- GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX])
10290- GNULIB_STDIO_H_NONBLOCKING=0; AC_SUBST([GNULIB_STDIO_H_NONBLOCKING])
10291- GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE])
10292- GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE])
10293- GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF])
10294- GNULIB_VFSCANF=0; AC_SUBST([GNULIB_VFSCANF])
10295- GNULIB_VSCANF=0; AC_SUBST([GNULIB_VSCANF])
10296- GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF])
10297- GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF])
10298- GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX])
10299- GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF])
10300- GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX])
10301- GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF])
10302- GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX])
10303- dnl Support Microsoft deprecated alias function names by default.
10304- GNULIB_MDA_FCLOSEALL=1; AC_SUBST([GNULIB_MDA_FCLOSEALL])
10305- GNULIB_MDA_FDOPEN=1; AC_SUBST([GNULIB_MDA_FDOPEN])
10306- GNULIB_MDA_FILENO=1; AC_SUBST([GNULIB_MDA_FILENO])
10307- GNULIB_MDA_GETW=1; AC_SUBST([GNULIB_MDA_GETW])
10308- GNULIB_MDA_PUTW=1; AC_SUBST([GNULIB_MDA_PUTW])
10309- GNULIB_MDA_TEMPNAM=1; AC_SUBST([GNULIB_MDA_TEMPNAM])
10310 dnl Assume proper GNU behavior unless another module says otherwise.
10311 HAVE_DECL_FCLOSEALL=1; AC_SUBST([HAVE_DECL_FCLOSEALL])
10312 HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE])
10313--- a/gnulib/m4/stdlib_h.m4
10314+++ b/gnulib/m4/stdlib_h.m4
10315@@ -1,10 +1,10 @@
10316-# stdlib_h.m4 serial 55
10317+# stdlib_h.m4 serial 63
10318 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
10319 dnl This file is free software; the Free Software Foundation
10320 dnl gives unlimited permission to copy and/or distribute it,
10321 dnl with or without modifications, as long as this notice is preserved.
10322
10323-AC_DEFUN([gl_STDLIB_H],
10324+AC_DEFUN_ONCE([gl_STDLIB_H],
10325 [
10326 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
10327 gl_NEXT_HEADERS([stdlib.h])
10328@@ -28,7 +28,7 @@ AC_DEFUN([gl_STDLIB_H],
10329 posix_memalign posix_openpt ptsname ptsname_r qsort_r
10330 random random_r reallocarray realpath rpmatch secure_getenv setenv
10331 setstate setstate_r srandom srandom_r
10332- strtod strtold strtoll strtoull unlockpt unsetenv])
10333+ strtod strtol strtold strtoll strtoul strtoull unlockpt unsetenv])
10334
10335 AC_REQUIRE([AC_C_RESTRICT])
10336
10337@@ -46,61 +46,78 @@ AC_DEFUN([gl_STDLIB_H],
10338 fi
10339 ])
10340
10341+# gl_STDLIB_MODULE_INDICATOR([modulename])
10342+# sets the shell variable that indicates the presence of the given module
10343+# to a C preprocessor expression that will evaluate to 1.
10344+# This macro invocation must not occur in macros that are AC_REQUIREd.
10345 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
10346 [
10347- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
10348- AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
10349+ dnl Ensure to expand the default settings once only.
10350+ gl_STDLIB_H_REQUIRE_DEFAULTS
10351 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
10352 dnl Define it also as a C macro, for the benefit of the unit tests.
10353 gl_MODULE_INDICATOR_FOR_TESTS([$1])
10354 ])
10355
10356+# Initializes the default values for AC_SUBSTed shell variables.
10357+# This macro must not be AC_REQUIREd. It must only be invoked, and only
10358+# outside of macros or in macros that are not AC_REQUIREd.
10359+AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
10360+[
10361+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS], [
10362+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB__EXIT])
10363+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALIGNED_ALLOC])
10364+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATOLL])
10365+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_POSIX])
10366+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME])
10367+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX])
10368+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG])
10369+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT])
10370+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT])
10371+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX])
10372+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC])
10373+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP])
10374+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMP])
10375+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMPS])
10376+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKSTEMP])
10377+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKSTEMPS])
10378+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POSIX_MEMALIGN])
10379+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POSIX_OPENPT])
10380+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTSNAME])
10381+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTSNAME_R])
10382+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTENV])
10383+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_QSORT_R])
10384+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM])
10385+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R])
10386+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY])
10387+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX])
10388+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH])
10389+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH])
10390+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SECURE_GETENV])
10391+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETENV])
10392+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOD])
10393+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOL])
10394+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLD])
10395+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLL])
10396+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOUL])
10397+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOULL])
10398+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYSTEM_POSIX])
10399+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLOCKPT])
10400+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNSETENV])
10401+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTOMB])
10402+ dnl Support Microsoft deprecated alias function names by default.
10403+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ECVT], [1])
10404+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FCVT], [1])
10405+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GCVT], [1])
10406+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MKTEMP], [1])
10407+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_PUTENV], [1])
10408+ ])
10409+ m4_require(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS])
10410+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
10411+])
10412+
10413 AC_DEFUN([gl_STDLIB_H_DEFAULTS],
10414 [
10415- GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT])
10416- GNULIB_ALIGNED_ALLOC=0; AC_SUBST([GNULIB_ALIGNED_ALLOC])
10417- GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL])
10418- GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
10419- GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
10420- GNULIB_FREE_POSIX=0; AC_SUBST([GNULIB_FREE_POSIX])
10421- GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG])
10422- GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
10423- GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT])
10424- GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
10425- GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC])
10426- GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
10427- GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP])
10428- GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS])
10429- GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
10430- GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS])
10431- GNULIB_POSIX_MEMALIGN=0;AC_SUBST([GNULIB_POSIX_MEMALIGN])
10432- GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT])
10433- GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME])
10434- GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R])
10435- GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
10436- GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R])
10437- GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM])
10438- GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
10439- GNULIB_REALLOCARRAY=0; AC_SUBST([GNULIB_REALLOCARRAY])
10440- GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
10441- GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
10442- GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
10443- GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV])
10444- GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
10445- GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
10446- GNULIB_STRTOLD=0; AC_SUBST([GNULIB_STRTOLD])
10447- GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
10448- GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL])
10449- GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX])
10450- GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT])
10451- GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
10452- GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB])
10453- dnl Support Microsoft deprecated alias function names by default.
10454- GNULIB_MDA_ECVT=1; AC_SUBST([GNULIB_MDA_ECVT])
10455- GNULIB_MDA_FCVT=1; AC_SUBST([GNULIB_MDA_FCVT])
10456- GNULIB_MDA_GCVT=1; AC_SUBST([GNULIB_MDA_GCVT])
10457- GNULIB_MDA_MKTEMP=1; AC_SUBST([GNULIB_MDA_MKTEMP])
10458- GNULIB_MDA_PUTENV=1; AC_SUBST([GNULIB_MDA_PUTENV])
10459 dnl Assume proper GNU behavior unless another module says otherwise.
10460 HAVE__EXIT=1; AC_SUBST([HAVE__EXIT])
10461 HAVE_ALIGNED_ALLOC=1; AC_SUBST([HAVE_ALIGNED_ALLOC])
10462@@ -137,8 +154,10 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
10463 HAVE_SETSTATE=1; AC_SUBST([HAVE_SETSTATE])
10464 HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE])
10465 HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
10466+ HAVE_STRTOL=1; AC_SUBST([HAVE_STRTOL])
10467 HAVE_STRTOLD=1; AC_SUBST([HAVE_STRTOLD])
10468 HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
10469+ HAVE_STRTOUL=1; AC_SUBST([HAVE_STRTOUL])
10470 HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
10471 HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
10472 HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
10473@@ -160,11 +179,16 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
10474 REPLACE_RANDOM=0; AC_SUBST([REPLACE_RANDOM])
10475 REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
10476 REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC])
10477+ REPLACE_REALLOCARRAY=0; AC_SUBST([REPLACE_REALLOCARRAY])
10478 REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
10479 REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
10480 REPLACE_SETSTATE=0; AC_SUBST([REPLACE_SETSTATE])
10481 REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
10482+ REPLACE_STRTOL=0; AC_SUBST([REPLACE_STRTOL])
10483 REPLACE_STRTOLD=0; AC_SUBST([REPLACE_STRTOLD])
10484+ REPLACE_STRTOLL=0; AC_SUBST([REPLACE_STRTOLL])
10485+ REPLACE_STRTOUL=0; AC_SUBST([REPLACE_STRTOUL])
10486+ REPLACE_STRTOULL=0; AC_SUBST([REPLACE_STRTOULL])
10487 REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV])
10488 REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB])
10489 ])
10490--- a/gnulib/m4/stpcpy.m4
10491+++ b/gnulib/m4/stpcpy.m4
10492@@ -1,4 +1,4 @@
10493-# stpcpy.m4 serial 8
10494+# stpcpy.m4 serial 9
10495 dnl Copyright (C) 2002, 2007, 2009-2021 Free Software Foundation, Inc.
10496 dnl This file is free software; the Free Software Foundation
10497 dnl gives unlimited permission to copy and/or distribute it,
10498@@ -12,7 +12,7 @@ AC_DEFUN([gl_FUNC_STPCPY],
10499 dnl The stpcpy() declaration in lib/string.in.h uses 'restrict'.
10500 AC_REQUIRE([AC_C_RESTRICT])
10501
10502- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
10503+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
10504 AC_CHECK_FUNCS([stpcpy])
10505 if test $ac_cv_func_stpcpy = no; then
10506 HAVE_STPCPY=0
10507--- a/gnulib/m4/strcase.m4
10508+++ b/gnulib/m4/strcase.m4
10509@@ -1,4 +1,4 @@
10510-# strcase.m4 serial 11
10511+# strcase.m4 serial 12
10512 dnl Copyright (C) 2002, 2005-2021 Free Software Foundation, Inc.
10513 dnl This file is free software; the Free Software Foundation
10514 dnl gives unlimited permission to copy and/or distribute it,
10515@@ -12,7 +12,7 @@ AC_DEFUN([gl_STRCASE],
10516
10517 AC_DEFUN([gl_FUNC_STRCASECMP],
10518 [
10519- AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
10520+ AC_REQUIRE([gl_STRINGS_H_DEFAULTS])
10521 AC_CHECK_FUNCS([strcasecmp])
10522 if test $ac_cv_func_strcasecmp = no; then
10523 HAVE_STRCASECMP=0
10524@@ -21,7 +21,7 @@ AC_DEFUN([gl_FUNC_STRCASECMP],
10525
10526 AC_DEFUN([gl_FUNC_STRNCASECMP],
10527 [
10528- AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
10529+ AC_REQUIRE([gl_STRINGS_H_DEFAULTS])
10530 AC_CHECK_FUNCS([strncasecmp])
10531 if test $ac_cv_func_strncasecmp = yes; then
10532 HAVE_STRNCASECMP=1
10533--- a/gnulib/m4/strcasestr.m4
10534+++ b/gnulib/m4/strcasestr.m4
10535@@ -1,4 +1,4 @@
10536-# strcasestr.m4 serial 26
10537+# strcasestr.m4 serial 27
10538 dnl Copyright (C) 2005, 2007-2021 Free Software Foundation, Inc.
10539 dnl This file is free software; the Free Software Foundation
10540 dnl gives unlimited permission to copy and/or distribute it,
10541@@ -7,7 +7,7 @@ dnl with or without modifications, as lo
10542 dnl Check that strcasestr is present and works.
10543 AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE],
10544 [
10545- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
10546+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
10547
10548 dnl Persuade glibc <string.h> to declare strcasestr().
10549 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
10550--- a/gnulib/m4/strdup.m4
10551+++ b/gnulib/m4/strdup.m4
10552@@ -1,4 +1,4 @@
10553-# strdup.m4 serial 14
10554+# strdup.m4 serial 15
10555
10556 dnl Copyright (C) 2002-2021 Free Software Foundation, Inc.
10557
10558@@ -8,7 +8,7 @@ dnl with or without modifications, as lo
10559
10560 AC_DEFUN([gl_FUNC_STRDUP],
10561 [
10562- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
10563+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
10564 AC_CHECK_DECLS_ONCE([strdup])
10565 if test $ac_cv_have_decl_strdup = no; then
10566 HAVE_DECL_STRDUP=0
10567@@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_STRDUP],
10568
10569 AC_DEFUN([gl_FUNC_STRDUP_POSIX],
10570 [
10571- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
10572+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
10573 AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
10574 if test $gl_cv_func_malloc_posix != yes; then
10575 REPLACE_STRDUP=1
10576--- a/gnulib/m4/strerror.m4
10577+++ b/gnulib/m4/strerror.m4
10578@@ -1,4 +1,4 @@
10579-# strerror.m4 serial 21
10580+# strerror.m4 serial 22
10581 dnl Copyright (C) 2002, 2007-2021 Free Software Foundation, Inc.
10582 dnl This file is free software; the Free Software Foundation
10583 dnl gives unlimited permission to copy and/or distribute it,
10584@@ -6,7 +6,7 @@ dnl with or without modifications, as lo
10585
10586 AC_DEFUN([gl_FUNC_STRERROR],
10587 [
10588- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
10589+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
10590 AC_REQUIRE([gl_HEADER_ERRNO_H])
10591 AC_REQUIRE([gl_FUNC_STRERROR_0])
10592 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
10593--- a/gnulib/m4/string_h.m4
10594+++ b/gnulib/m4/string_h.m4
10595@@ -5,20 +5,15 @@
10596 # gives unlimited permission to copy and/or distribute it,
10597 # with or without modifications, as long as this notice is preserved.
10598
10599-# serial 29
10600+# serial 32
10601
10602 # Written by Paul Eggert.
10603
10604-AC_DEFUN([gl_HEADER_STRING_H],
10605+AC_DEFUN_ONCE([gl_STRING_H],
10606 [
10607- dnl Use AC_REQUIRE here, so that the default behavior below is expanded
10608- dnl once only, before all statements that occur in other macros.
10609- AC_REQUIRE([gl_HEADER_STRING_H_BODY])
10610-])
10611-
10612-AC_DEFUN([gl_HEADER_STRING_H_BODY],
10613-[
10614- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
10615+ dnl Ensure to expand the default settings once only, before all statements
10616+ dnl that occur in other macros.
10617+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
10618 gl_NEXT_HEADERS([string.h])
10619
10620 dnl Check for declarations of anything we want to poison if the
10621@@ -33,62 +28,77 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
10622 AC_REQUIRE([AC_C_RESTRICT])
10623 ])
10624
10625+# gl_STRING_MODULE_INDICATOR([modulename])
10626+# sets the shell variable that indicates the presence of the given module
10627+# to a C preprocessor expression that will evaluate to 1.
10628+# This macro invocation must not occur in macros that are AC_REQUIREd.
10629 AC_DEFUN([gl_STRING_MODULE_INDICATOR],
10630 [
10631- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
10632- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
10633+ dnl Ensure to expand the default settings once only.
10634+ gl_STRING_H_REQUIRE_DEFAULTS
10635 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
10636 dnl Define it also as a C macro, for the benefit of the unit tests.
10637 gl_MODULE_INDICATOR_FOR_TESTS([$1])
10638 ])
10639
10640-AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
10641+# Initializes the default values for AC_SUBSTed shell variables.
10642+# This macro must not be AC_REQUIREd. It must only be invoked, and only
10643+# outside of macros or in macros that are not AC_REQUIREd.
10644+AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS],
10645+[
10646+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_STRING_H_MODULE_INDICATOR_DEFAULTS], [
10647+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXPLICIT_BZERO])
10648+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFSL])
10649+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFSLL])
10650+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMCHR])
10651+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMMEM])
10652+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMPCPY])
10653+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMRCHR])
10654+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAWMEMCHR])
10655+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPCPY])
10656+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPNCPY])
10657+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCHRNUL])
10658+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRDUP])
10659+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNCAT])
10660+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNDUP])
10661+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNLEN])
10662+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPBRK])
10663+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSEP])
10664+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSTR])
10665+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCASESTR])
10666+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOK_R])
10667+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSLEN])
10668+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNLEN])
10669+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCHR])
10670+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSRCHR])
10671+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSTR])
10672+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCASECMP])
10673+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNCASECMP])
10674+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSPCASECMP])
10675+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCASESTR])
10676+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCSPN])
10677+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSPBRK])
10678+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSPN])
10679+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSEP])
10680+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSTOK_R])
10681+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR])
10682+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR_R])
10683+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERRORNAME_NP])
10684+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGABBREV_NP])
10685+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGDESCR_NP])
10686+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSIGNAL])
10687+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRVERSCMP])
10688+ dnl Support Microsoft deprecated alias function names by default.
10689+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MEMCCPY], [1])
10690+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_STRDUP], [1])
10691+ ])
10692+ m4_require(GL_MODULE_INDICATOR_PREFIX[_STRING_H_MODULE_INDICATOR_DEFAULTS])
10693+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
10694+])
10695+
10696+AC_DEFUN([gl_STRING_H_DEFAULTS],
10697 [
10698- GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO])
10699- GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
10700- GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
10701- GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
10702- GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
10703- GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
10704- GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
10705- GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR])
10706- GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
10707- GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
10708- GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
10709- GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP])
10710- GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT])
10711- GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP])
10712- GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
10713- GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
10714- GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
10715- GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR])
10716- GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
10717- GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
10718- GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
10719- GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN])
10720- GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR])
10721- GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR])
10722- GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR])
10723- GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP])
10724- GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
10725- GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
10726- GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR])
10727- GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN])
10728- GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK])
10729- GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
10730- GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
10731- GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
10732- GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
10733- GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R])
10734- GNULIB_STRERRORNAME_NP=0; AC_SUBST([GNULIB_STRERRORNAME_NP])
10735- GNULIB_SIGABBREV_NP=0; AC_SUBST([GNULIB_SIGABBREV_NP])
10736- GNULIB_SIGDESCR_NP=0; AC_SUBST([GNULIB_SIGDESCR_NP])
10737- GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
10738- GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
10739 HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
10740- dnl Support Microsoft deprecated alias function names by default.
10741- GNULIB_MDA_MEMCCPY=1; AC_SUBST([GNULIB_MDA_MEMCCPY])
10742- GNULIB_MDA_STRDUP=1; AC_SUBST([GNULIB_MDA_STRDUP])
10743 dnl Assume proper GNU behavior unless another module says otherwise.
10744 HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO])
10745 HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
10746--- a/gnulib/m4/strings_h.m4
10747+++ b/gnulib/m4/strings_h.m4
10748@@ -1,21 +1,16 @@
10749 # Configure a replacement for <strings.h>.
10750-# serial 6
10751+# serial 9
10752
10753 # Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
10754 # This file is free software; the Free Software Foundation
10755 # gives unlimited permission to copy and/or distribute it,
10756 # with or without modifications, as long as this notice is preserved.
10757
10758-AC_DEFUN([gl_HEADER_STRINGS_H],
10759+AC_DEFUN_ONCE([gl_STRINGS_H],
10760 [
10761- dnl Use AC_REQUIRE here, so that the default behavior below is expanded
10762- dnl once only, before all statements that occur in other macros.
10763- AC_REQUIRE([gl_HEADER_STRINGS_H_BODY])
10764-])
10765-
10766-AC_DEFUN([gl_HEADER_STRINGS_H_BODY],
10767-[
10768- AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
10769+ dnl Ensure to expand the default settings once only, before all statements
10770+ dnl that occur in other macros.
10771+ AC_REQUIRE([gl_STRINGS_H_DEFAULTS])
10772
10773 gl_CHECK_NEXT_HEADERS([strings.h])
10774 if test $ac_cv_header_strings_h = yes; then
10775@@ -35,16 +30,31 @@ AC_DEFUN([gl_HEADER_STRINGS_H_BODY],
10776 ]], [ffs strcasecmp strncasecmp])
10777 ])
10778
10779+# gl_STRINGS_MODULE_INDICATOR([modulename])
10780+# sets the shell variable that indicates the presence of the given module
10781+# to a C preprocessor expression that will evaluate to 1.
10782+# This macro invocation must not occur in macros that are AC_REQUIREd.
10783 AC_DEFUN([gl_STRINGS_MODULE_INDICATOR],
10784 [
10785- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
10786- AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
10787+ dnl Ensure to expand the default settings once only.
10788+ gl_STRINGS_H_REQUIRE_DEFAULTS
10789 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
10790 ])
10791
10792-AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS],
10793+# Initializes the default values for AC_SUBSTed shell variables.
10794+# This macro must not be AC_REQUIREd. It must only be invoked, and only
10795+# outside of macros or in macros that are not AC_REQUIREd.
10796+AC_DEFUN([gl_STRINGS_H_REQUIRE_DEFAULTS],
10797+[
10798+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_STRINGS_H_MODULE_INDICATOR_DEFAULTS], [
10799+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFS])
10800+ ])
10801+ m4_require(GL_MODULE_INDICATOR_PREFIX[_STRINGS_H_MODULE_INDICATOR_DEFAULTS])
10802+ AC_REQUIRE([gl_STRINGS_H_DEFAULTS])
10803+])
10804+
10805+AC_DEFUN([gl_STRINGS_H_DEFAULTS],
10806 [
10807- GNULIB_FFS=0; AC_SUBST([GNULIB_FFS])
10808 dnl Assume proper GNU behavior unless another module says otherwise.
10809 HAVE_FFS=1; AC_SUBST([HAVE_FFS])
10810 HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP])
10811--- a/gnulib/m4/strndup.m4
10812+++ b/gnulib/m4/strndup.m4
10813@@ -1,4 +1,4 @@
10814-# strndup.m4 serial 22
10815+# strndup.m4 serial 23
10816 dnl Copyright (C) 2002-2003, 2005-2021 Free Software Foundation, Inc.
10817 dnl This file is free software; the Free Software Foundation
10818 dnl gives unlimited permission to copy and/or distribute it,
10819@@ -10,7 +10,7 @@ AC_DEFUN([gl_FUNC_STRNDUP],
10820 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
10821
10822 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
10823- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
10824+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
10825 AC_CHECK_DECLS_ONCE([strndup])
10826 AC_CHECK_FUNCS_ONCE([strndup])
10827 if test $ac_cv_have_decl_strndup = no; then
10828--- a/gnulib/m4/strnlen.m4
10829+++ b/gnulib/m4/strnlen.m4
10830@@ -1,4 +1,4 @@
10831-# strnlen.m4 serial 13
10832+# strnlen.m4 serial 14
10833 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation,
10834 dnl Inc.
10835 dnl This file is free software; the Free Software Foundation
10836@@ -7,7 +7,7 @@ dnl with or without modifications, as lo
10837
10838 AC_DEFUN([gl_FUNC_STRNLEN],
10839 [
10840- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
10841+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
10842
10843 dnl Persuade glibc <string.h> to declare strnlen().
10844 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
10845--- a/gnulib/m4/strstr.m4
10846+++ b/gnulib/m4/strstr.m4
10847@@ -1,4 +1,4 @@
10848-# strstr.m4 serial 22
10849+# strstr.m4 serial 23
10850 dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
10851 dnl This file is free software; the Free Software Foundation
10852 dnl gives unlimited permission to copy and/or distribute it,
10853@@ -7,7 +7,7 @@ dnl with or without modifications, as lo
10854 dnl Check that strstr works.
10855 AC_DEFUN([gl_FUNC_STRSTR_SIMPLE],
10856 [
10857- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
10858+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
10859 AC_REQUIRE([gl_FUNC_MEMCHR])
10860 if test $REPLACE_MEMCHR = 1; then
10861 REPLACE_STRSTR=1
10862--- a/gnulib/m4/sys_socket_h.m4
10863+++ b/gnulib/m4/sys_socket_h.m4
10864@@ -1,4 +1,4 @@
10865-# sys_socket_h.m4 serial 25
10866+# sys_socket_h.m4 serial 28
10867 dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
10868 dnl This file is free software; the Free Software Foundation
10869 dnl gives unlimited permission to copy and/or distribute it,
10870@@ -6,7 +6,7 @@ dnl with or without modifications, as lo
10871
10872 dnl From Simon Josefsson.
10873
10874-AC_DEFUN([gl_HEADER_SYS_SOCKET],
10875+AC_DEFUN_ONCE([gl_SYS_SOCKET_H],
10876 [
10877 AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
10878 AC_REQUIRE([AC_CANONICAL_HOST])
10879@@ -156,32 +156,47 @@ AC_DEFUN([gl_PREREQ_SYS_H_WS2TCPIP],
10880 AC_SUBST([HAVE_WS2TCPIP_H])
10881 ])
10882
10883+# gl_SYS_SOCKET_MODULE_INDICATOR([modulename])
10884+# sets the shell variable that indicates the presence of the given module
10885+# to a C preprocessor expression that will evaluate to 1.
10886+# This macro invocation must not occur in macros that are AC_REQUIREd.
10887 AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
10888 [
10889- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
10890- AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
10891+ dnl Ensure to expand the default settings once only.
10892+ gl_SYS_SOCKET_H_REQUIRE_DEFAULTS
10893 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
10894 dnl Define it also as a C macro, for the benefit of the unit tests.
10895 gl_MODULE_INDICATOR_FOR_TESTS([$1])
10896 ])
10897
10898+# Initializes the default values for AC_SUBSTed shell variables.
10899+# This macro must not be AC_REQUIREd. It must only be invoked, and only
10900+# outside of macros or in macros that are not AC_REQUIREd.
10901+AC_DEFUN([gl_SYS_SOCKET_H_REQUIRE_DEFAULTS],
10902+[
10903+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_SOCKET_H_MODULE_INDICATOR_DEFAULTS], [
10904+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SOCKET])
10905+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CONNECT])
10906+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCEPT])
10907+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_BIND])
10908+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPEERNAME])
10909+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSOCKNAME])
10910+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSOCKOPT])
10911+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LISTEN])
10912+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RECV])
10913+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SEND])
10914+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RECVFROM])
10915+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SENDTO])
10916+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETSOCKOPT])
10917+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SHUTDOWN])
10918+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCEPT4])
10919+ ])
10920+ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_SOCKET_H_MODULE_INDICATOR_DEFAULTS])
10921+ AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
10922+])
10923+
10924 AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
10925 [
10926- GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET])
10927- GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT])
10928- GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT])
10929- GNULIB_BIND=0; AC_SUBST([GNULIB_BIND])
10930- GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME])
10931- GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME])
10932- GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT])
10933- GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN])
10934- GNULIB_RECV=0; AC_SUBST([GNULIB_RECV])
10935- GNULIB_SEND=0; AC_SUBST([GNULIB_SEND])
10936- GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM])
10937- GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO])
10938- GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT])
10939- GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN])
10940- GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4])
10941 HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
10942 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
10943 AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
10944--- a/gnulib/m4/sys_stat_h.m4
10945+++ b/gnulib/m4/sys_stat_h.m4
10946@@ -1,4 +1,4 @@
10947-# sys_stat_h.m4 serial 38 -*- Autoconf -*-
10948+# sys_stat_h.m4 serial 41 -*- Autoconf -*-
10949 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
10950 dnl This file is free software; the Free Software Foundation
10951 dnl gives unlimited permission to copy and/or distribute it,
10952@@ -7,7 +7,7 @@ dnl with or without modifications, as lo
10953 dnl From Eric Blake.
10954 dnl Provide a GNU-like <sys/stat.h>.
10955
10956-AC_DEFUN([gl_HEADER_SYS_STAT_H],
10957+AC_DEFUN_ONCE([gl_SYS_STAT_H],
10958 [
10959 AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
10960
10961@@ -52,38 +52,53 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
10962 AC_REQUIRE([AC_C_RESTRICT])
10963 ])
10964
10965+# gl_SYS_STAT_MODULE_INDICATOR([modulename])
10966+# sets the shell variable that indicates the presence of the given module
10967+# to a C preprocessor expression that will evaluate to 1.
10968+# This macro invocation must not occur in macros that are AC_REQUIREd.
10969 AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
10970 [
10971- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
10972- AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
10973+ dnl Ensure to expand the default settings once only.
10974+ gl_SYS_STAT_H_REQUIRE_DEFAULTS
10975 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
10976 dnl Define it also as a C macro, for the benefit of the unit tests.
10977 gl_MODULE_INDICATOR_FOR_TESTS([$1])
10978 ])
10979
10980+# Initializes the default values for AC_SUBSTed shell variables.
10981+# This macro must not be AC_REQUIREd. It must only be invoked, and only
10982+# outside of macros or in macros that are not AC_REQUIREd.
10983+AC_DEFUN([gl_SYS_STAT_H_REQUIRE_DEFAULTS],
10984+[
10985+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEFAULTS], [
10986+ gl_UNISTD_H_REQUIRE_DEFAULTS dnl for REPLACE_FCHDIR
10987+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHMODAT])
10988+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTAT])
10989+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTATAT])
10990+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FUTIMENS])
10991+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUMASK])
10992+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LCHMOD])
10993+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LSTAT])
10994+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDIR])
10995+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDIRAT])
10996+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKFIFO])
10997+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKFIFOAT])
10998+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKNOD])
10999+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKNODAT])
11000+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STAT])
11001+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UTIMENSAT])
11002+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OVERRIDES_STRUCT_STAT])
11003+ dnl Support Microsoft deprecated alias function names by default.
11004+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CHMOD], [1])
11005+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MKDIR], [1])
11006+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_UMASK], [1])
11007+ ])
11008+ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEFAULTS])
11009+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
11010+])
11011+
11012 AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
11013 [
11014- AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
11015- GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT])
11016- GNULIB_FSTAT=0; AC_SUBST([GNULIB_FSTAT])
11017- GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT])
11018- GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS])
11019- GNULIB_GETUMASK=0; AC_SUBST([GNULIB_GETUMASK])
11020- GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD])
11021- GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT])
11022- GNULIB_MKDIR=0; AC_SUBST([GNULIB_MKDIR])
11023- GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT])
11024- GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO])
11025- GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT])
11026- GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD])
11027- GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT])
11028- GNULIB_STAT=0; AC_SUBST([GNULIB_STAT])
11029- GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT])
11030- GNULIB_OVERRIDES_STRUCT_STAT=0; AC_SUBST([GNULIB_OVERRIDES_STRUCT_STAT])
11031- dnl Support Microsoft deprecated alias function names by default.
11032- GNULIB_MDA_CHMOD=1; AC_SUBST([GNULIB_MDA_CHMOD])
11033- GNULIB_MDA_MKDIR=1; AC_SUBST([GNULIB_MDA_MKDIR])
11034- GNULIB_MDA_UMASK=1; AC_SUBST([GNULIB_MDA_UMASK])
11035 dnl Assume proper GNU behavior unless another module says otherwise.
11036 HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT])
11037 HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT])
11038--- a/gnulib/m4/sys_types_h.m4
11039+++ b/gnulib/m4/sys_types_h.m4
11040@@ -1,4 +1,4 @@
11041-# sys_types_h.m4 serial 11
11042+# sys_types_h.m4 serial 13
11043 dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
11044 dnl This file is free software; the Free Software Foundation
11045 dnl gives unlimited permission to copy and/or distribute it,
11046@@ -6,10 +6,11 @@ dnl with or without modifications, as lo
11047
11048 AC_DEFUN_ONCE([gl_SYS_TYPES_H],
11049 [
11050+ AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
11051+
11052 dnl Use sane struct stat types in OpenVMS 8.2 and later.
11053 AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.])
11054
11055- AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
11056 gl_NEXT_HEADERS([sys/types.h])
11057
11058 dnl Ensure the type pid_t gets defined.
11059@@ -30,6 +31,17 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H],
11060 AC_SUBST([WINDOWS_STAT_INODES])
11061 ])
11062
11063+# Initializes the default values for AC_SUBSTed shell variables.
11064+# This macro must not be AC_REQUIREd. It must only be invoked, and only
11065+# outside of macros or in macros that are not AC_REQUIREd.
11066+AC_DEFUN([gl_SYS_TYPES_H_REQUIRE_DEFAULTS],
11067+[
11068+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS], [
11069+ ])
11070+ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS])
11071+ AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
11072+])
11073+
11074 AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
11075 [
11076 ])
11077--- a/gnulib/m4/time_h.m4
11078+++ b/gnulib/m4/time_h.m4
11079@@ -2,7 +2,7 @@
11080
11081 # Copyright (C) 2000-2001, 2003-2007, 2009-2021 Free Software Foundation, Inc.
11082
11083-# serial 15
11084+# serial 18
11085
11086 # This file is free software; the Free Software Foundation
11087 # gives unlimited permission to copy and/or distribute it,
11088@@ -10,16 +10,11 @@
11089
11090 # Written by Paul Eggert and Jim Meyering.
11091
11092-AC_DEFUN([gl_HEADER_TIME_H],
11093+AC_DEFUN_ONCE([gl_TIME_H],
11094 [
11095- dnl Use AC_REQUIRE here, so that the default behavior below is expanded
11096- dnl once only, before all statements that occur in other macros.
11097- AC_REQUIRE([gl_HEADER_TIME_H_BODY])
11098-])
11099-
11100-AC_DEFUN([gl_HEADER_TIME_H_BODY],
11101-[
11102- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
11103+ dnl Ensure to expand the default settings once only, before all statements
11104+ dnl that occur in other macros.
11105+ AC_REQUIRE([gl_TIME_H_DEFAULTS])
11106
11107 gl_NEXT_HEADERS([time.h])
11108 AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
11109@@ -111,30 +106,45 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC]
11110 AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC])
11111 ])
11112
11113+# gl_TIME_MODULE_INDICATOR([modulename])
11114+# sets the shell variable that indicates the presence of the given module
11115+# to a C preprocessor expression that will evaluate to 1.
11116+# This macro invocation must not occur in macros that are AC_REQUIREd.
11117 AC_DEFUN([gl_TIME_MODULE_INDICATOR],
11118 [
11119- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
11120- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
11121+ dnl Ensure to expand the default settings once only.
11122+ gl_TIME_H_REQUIRE_DEFAULTS
11123 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
11124 dnl Define it also as a C macro, for the benefit of the unit tests.
11125 gl_MODULE_INDICATOR_FOR_TESTS([$1])
11126 ])
11127
11128-AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
11129+# Initializes the default values for AC_SUBSTed shell variables.
11130+# This macro must not be AC_REQUIREd. It must only be invoked, and only
11131+# outside of macros or in macros that are not AC_REQUIREd.
11132+AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS],
11133+[
11134+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULTS], [
11135+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CTIME])
11136+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKTIME])
11137+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALTIME])
11138+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NANOSLEEP])
11139+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRFTIME])
11140+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME])
11141+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM])
11142+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET])
11143+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_R])
11144+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_RZ])
11145+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZSET])
11146+ dnl Support Microsoft deprecated alias function names by default.
11147+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TZSET], [1])
11148+ ])
11149+ m4_require(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULTS])
11150+ AC_REQUIRE([gl_TIME_H_DEFAULTS])
11151+])
11152+
11153+AC_DEFUN([gl_TIME_H_DEFAULTS],
11154 [
11155- GNULIB_CTIME=0; AC_SUBST([GNULIB_CTIME])
11156- GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME])
11157- GNULIB_LOCALTIME=0; AC_SUBST([GNULIB_LOCALTIME])
11158- GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP])
11159- GNULIB_STRFTIME=0; AC_SUBST([GNULIB_STRFTIME])
11160- GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME])
11161- GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM])
11162- GNULIB_TIMESPEC_GET=0; AC_SUBST([GNULIB_TIMESPEC_GET])
11163- GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R])
11164- GNULIB_TIME_RZ=0; AC_SUBST([GNULIB_TIME_RZ])
11165- GNULIB_TZSET=0; AC_SUBST([GNULIB_TZSET])
11166- dnl Support Microsoft deprecated alias function names by default.
11167- GNULIB_MDA_TZSET=1; AC_SUBST([GNULIB_MDA_TZSET])
11168 dnl Assume proper GNU behavior unless another module says otherwise.
11169 HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R])
11170 HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP])
11171--- a/gnulib/m4/unistd_h.m4
11172+++ b/gnulib/m4/unistd_h.m4
11173@@ -1,4 +1,4 @@
11174-# unistd_h.m4 serial 85
11175+# unistd_h.m4 serial 89
11176 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
11177 dnl This file is free software; the Free Software Foundation
11178 dnl gives unlimited permission to copy and/or distribute it,
11179@@ -6,10 +6,10 @@ dnl with or without modifications, as lo
11180
11181 dnl Written by Simon Josefsson, Bruno Haible.
11182
11183-AC_DEFUN([gl_UNISTD_H],
11184+AC_DEFUN_ONCE([gl_UNISTD_H],
11185 [
11186- dnl Use AC_REQUIRE here, so that the default behavior below is expanded
11187- dnl once only, before all statements that occur in other macros.
11188+ dnl Ensure to expand the default settings once only, before all statements
11189+ dnl that occur in other macros.
11190 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
11191
11192 gl_CHECK_NEXT_HEADERS([unistd.h])
11193@@ -59,100 +59,116 @@ AC_DEFUN([gl_UNISTD_H],
11194 fi
11195 ])
11196
11197+# gl_UNISTD_MODULE_INDICATOR([modulename])
11198+# sets the shell variable that indicates the presence of the given module
11199+# to a C preprocessor expression that will evaluate to 1.
11200+# This macro invocation must not occur in macros that are AC_REQUIREd.
11201 AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
11202 [
11203- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
11204- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
11205+ dnl Ensure to expand the default settings once only.
11206+ gl_UNISTD_H_REQUIRE_DEFAULTS
11207 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
11208 dnl Define it also as a C macro, for the benefit of the unit tests.
11209 gl_MODULE_INDICATOR_FOR_TESTS([$1])
11210 ])
11211
11212+# Initializes the default values for AC_SUBSTed shell variables.
11213+# This macro must not be AC_REQUIREd. It must only be invoked, and only
11214+# outside of macros or in macros that are not AC_REQUIREd.
11215+AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS],
11216+[
11217+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAULTS], [
11218+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCESS])
11219+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHDIR])
11220+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHOWN])
11221+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CLOSE])
11222+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COPY_FILE_RANGE])
11223+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP])
11224+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP2])
11225+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP3])
11226+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ENVIRON])
11227+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EUIDACCESS])
11228+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECL])
11229+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLE])
11230+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLP])
11231+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECV])
11232+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVE])
11233+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVP])
11234+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVPE])
11235+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FACCESSAT])
11236+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHDIR])
11237+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHOWNAT])
11238+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDATASYNC])
11239+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSYNC])
11240+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTRUNCATE])
11241+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCWD])
11242+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDOMAINNAME])
11243+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDTABLESIZE])
11244+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETENTROPY])
11245+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETGROUPS])
11246+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETHOSTNAME])
11247+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN])
11248+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN_R])
11249+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETOPT_POSIX])
11250+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAGESIZE])
11251+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS])
11252+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUSERSHELL])
11253+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GROUP_MEMBER])
11254+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISATTY])
11255+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LCHOWN])
11256+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINK])
11257+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINKAT])
11258+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LSEEK])
11259+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE])
11260+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE2])
11261+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PREAD])
11262+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PWRITE])
11263+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READ])
11264+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINK])
11265+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINKAT])
11266+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RMDIR])
11267+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETHOSTNAME])
11268+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SLEEP])
11269+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINK])
11270+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINKAT])
11271+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCATE])
11272+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TTYNAME_R])
11273+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT])
11274+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_NONBLOCKING])
11275+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_SIGPIPE])
11276+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINK])
11277+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINKAT])
11278+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_USLEEP])
11279+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WRITE])
11280+ dnl Support Microsoft deprecated alias function names by default.
11281+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ACCESS], [1])
11282+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CHDIR], [1])
11283+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CLOSE], [1])
11284+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP], [1])
11285+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP2], [1])
11286+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECL], [1])
11287+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLE], [1])
11288+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLP], [1])
11289+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECV], [1])
11290+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVE], [1])
11291+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVP], [1])
11292+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVPE], [1])
11293+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETCWD], [1])
11294+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETPID], [1])
11295+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ISATTY], [1])
11296+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_LSEEK], [1])
11297+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_READ], [1])
11298+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_RMDIR], [1])
11299+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_SWAB], [1])
11300+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_UNLINK], [1])
11301+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_WRITE], [1])
11302+ ])
11303+ m4_require(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAULTS])
11304+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
11305+])
11306+
11307 AC_DEFUN([gl_UNISTD_H_DEFAULTS],
11308 [
11309- GNULIB_ACCESS=0; AC_SUBST([GNULIB_ACCESS])
11310- GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR])
11311- GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
11312- GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
11313- GNULIB_COPY_FILE_RANGE=0; AC_SUBST([GNULIB_COPY_FILE_RANGE])
11314- GNULIB_DUP=0; AC_SUBST([GNULIB_DUP])
11315- GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
11316- GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3])
11317- GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
11318- GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS])
11319- GNULIB_EXECL=0; AC_SUBST([GNULIB_EXECL])
11320- GNULIB_EXECLE=0; AC_SUBST([GNULIB_EXECLE])
11321- GNULIB_EXECLP=0; AC_SUBST([GNULIB_EXECLP])
11322- GNULIB_EXECV=0; AC_SUBST([GNULIB_EXECV])
11323- GNULIB_EXECVE=0; AC_SUBST([GNULIB_EXECVE])
11324- GNULIB_EXECVP=0; AC_SUBST([GNULIB_EXECVP])
11325- GNULIB_EXECVPE=0; AC_SUBST([GNULIB_EXECVPE])
11326- GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT])
11327- GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
11328- GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT])
11329- GNULIB_FDATASYNC=0; AC_SUBST([GNULIB_FDATASYNC])
11330- GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC])
11331- GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
11332- GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
11333- GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME])
11334- GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE])
11335- GNULIB_GETENTROPY=0; AC_SUBST([GNULIB_GETENTROPY])
11336- GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS])
11337- GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
11338- GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
11339- GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
11340- GNULIB_GETOPT_POSIX=0; AC_SUBST([GNULIB_GETOPT_POSIX])
11341- GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
11342- GNULIB_GETPASS=0; AC_SUBST([GNULIB_GETPASS])
11343- GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
11344- GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER])
11345- GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY])
11346- GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN])
11347- GNULIB_LINK=0; AC_SUBST([GNULIB_LINK])
11348- GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT])
11349- GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
11350- GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE])
11351- GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
11352- GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD])
11353- GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE])
11354- GNULIB_READ=0; AC_SUBST([GNULIB_READ])
11355- GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
11356- GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
11357- GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
11358- GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME])
11359- GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
11360- GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK])
11361- GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
11362- GNULIB_TRUNCATE=0; AC_SUBST([GNULIB_TRUNCATE])
11363- GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R])
11364- GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING])
11365- GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
11366- GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK])
11367- GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT])
11368- GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP])
11369- GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
11370- dnl Support Microsoft deprecated alias function names by default.
11371- GNULIB_MDA_ACCESS=1; AC_SUBST([GNULIB_MDA_ACCESS])
11372- GNULIB_MDA_CHDIR=1; AC_SUBST([GNULIB_MDA_CHDIR])
11373- GNULIB_MDA_CLOSE=1; AC_SUBST([GNULIB_MDA_CLOSE])
11374- GNULIB_MDA_DUP=1; AC_SUBST([GNULIB_MDA_DUP])
11375- GNULIB_MDA_DUP2=1; AC_SUBST([GNULIB_MDA_DUP2])
11376- GNULIB_MDA_EXECL=1; AC_SUBST([GNULIB_MDA_EXECL])
11377- GNULIB_MDA_EXECLE=1; AC_SUBST([GNULIB_MDA_EXECLE])
11378- GNULIB_MDA_EXECLP=1; AC_SUBST([GNULIB_MDA_EXECLP])
11379- GNULIB_MDA_EXECV=1; AC_SUBST([GNULIB_MDA_EXECV])
11380- GNULIB_MDA_EXECVE=1; AC_SUBST([GNULIB_MDA_EXECVE])
11381- GNULIB_MDA_EXECVP=1; AC_SUBST([GNULIB_MDA_EXECVP])
11382- GNULIB_MDA_EXECVPE=1; AC_SUBST([GNULIB_MDA_EXECVPE])
11383- GNULIB_MDA_GETCWD=1; AC_SUBST([GNULIB_MDA_GETCWD])
11384- GNULIB_MDA_GETPID=1; AC_SUBST([GNULIB_MDA_GETPID])
11385- GNULIB_MDA_ISATTY=1; AC_SUBST([GNULIB_MDA_ISATTY])
11386- GNULIB_MDA_LSEEK=1; AC_SUBST([GNULIB_MDA_LSEEK])
11387- GNULIB_MDA_READ=1; AC_SUBST([GNULIB_MDA_READ])
11388- GNULIB_MDA_RMDIR=1; AC_SUBST([GNULIB_MDA_RMDIR])
11389- GNULIB_MDA_SWAB=1; AC_SUBST([GNULIB_MDA_SWAB])
11390- GNULIB_MDA_UNLINK=1; AC_SUBST([GNULIB_MDA_UNLINK])
11391- GNULIB_MDA_WRITE=1; AC_SUBST([GNULIB_MDA_WRITE])
11392 dnl Assume proper GNU behavior unless another module says otherwise.
11393 HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN])
11394 HAVE_COPY_FILE_RANGE=1; AC_SUBST([HAVE_COPY_FILE_RANGE])
11395--- a/gnulib/m4/visibility.m4
11396+++ b/gnulib/m4/visibility.m4
11397@@ -1,4 +1,4 @@
11398-# visibility.m4 serial 7
11399+# visibility.m4 serial 8
11400 dnl Copyright (C) 2005, 2008, 2010-2021 Free Software Foundation, Inc.
11401 dnl This file is free software; the Free Software Foundation
11402 dnl gives unlimited permission to copy and/or distribute it,
11403@@ -59,6 +59,10 @@ AC_DEFUN([gl_VISIBILITY],
11404 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
11405 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
11406 void dummyfunc (void);
11407+ int hiddenvar;
11408+ int exportedvar;
11409+ int hiddenfunc (void) { return 51; }
11410+ int exportedfunc (void) { return 1225736919; }
11411 void dummyfunc (void) {}
11412 ]],
11413 [[]])],
11414--- a/gnulib/m4/wchar_h.m4
11415+++ b/gnulib/m4/wchar_h.m4
11416@@ -7,9 +7,9 @@ dnl with or without modifications, as lo
11417
11418 dnl Written by Eric Blake.
11419
11420-# wchar_h.m4 serial 50
11421+# wchar_h.m4 serial 53
11422
11423-AC_DEFUN([gl_WCHAR_H],
11424+AC_DEFUN_ONCE([gl_WCHAR_H],
11425 [
11426 AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
11427 AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
11428@@ -125,60 +125,75 @@ Configuration aborted.])
11429 fi
11430 ])
11431
11432+# gl_WCHAR_MODULE_INDICATOR([modulename])
11433+# sets the shell variable that indicates the presence of the given module
11434+# to a C preprocessor expression that will evaluate to 1.
11435+# This macro invocation must not occur in macros that are AC_REQUIREd.
11436 AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
11437 [
11438- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
11439- AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
11440+ dnl Ensure to expand the default settings once only.
11441+ gl_WCHAR_H_REQUIRE_DEFAULTS
11442 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
11443 dnl Define it also as a C macro, for the benefit of the unit tests.
11444 gl_MODULE_INDICATOR_FOR_TESTS([$1])
11445 ])
11446
11447+# Initializes the default values for AC_SUBSTed shell variables.
11448+# This macro must not be AC_REQUIREd. It must only be invoked, and only
11449+# outside of macros or in macros that are not AC_REQUIREd.
11450+AC_DEFUN([gl_WCHAR_H_REQUIRE_DEFAULTS],
11451+[
11452+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_WCHAR_H_MODULE_INDICATOR_DEFAULTS], [
11453+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_BTOWC])
11454+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTOB])
11455+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSINIT])
11456+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRTOWC])
11457+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRLEN])
11458+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSRTOWCS])
11459+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNRTOWCS])
11460+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCRTOMB])
11461+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSRTOMBS])
11462+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNRTOMBS])
11463+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCWIDTH])
11464+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMCHR])
11465+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMCMP])
11466+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMCPY])
11467+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMMOVE])
11468+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMPCPY])
11469+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMSET])
11470+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSLEN])
11471+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNLEN])
11472+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCPY])
11473+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCPCPY])
11474+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCPY])
11475+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCPNCPY])
11476+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCAT])
11477+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCAT])
11478+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCMP])
11479+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCMP])
11480+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCASECMP])
11481+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCASECMP])
11482+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCOLL])
11483+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSXFRM])
11484+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSDUP])
11485+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCHR])
11486+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSRCHR])
11487+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCSPN])
11488+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSSPN])
11489+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSPBRK])
11490+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSSTR])
11491+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSTOK])
11492+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSWIDTH])
11493+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSFTIME])
11494+ dnl Support Microsoft deprecated alias function names by default.
11495+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_WCSDUP], [1])
11496+ ])
11497+ m4_require(GL_MODULE_INDICATOR_PREFIX[_WCHAR_H_MODULE_INDICATOR_DEFAULTS])
11498+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
11499+])
11500+
11501 AC_DEFUN([gl_WCHAR_H_DEFAULTS],
11502 [
11503- GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC])
11504- GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB])
11505- GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT])
11506- GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC])
11507- GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN])
11508- GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS])
11509- GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
11510- GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB])
11511- GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS])
11512- GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
11513- GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
11514- GNULIB_WMEMCHR=0; AC_SUBST([GNULIB_WMEMCHR])
11515- GNULIB_WMEMCMP=0; AC_SUBST([GNULIB_WMEMCMP])
11516- GNULIB_WMEMCPY=0; AC_SUBST([GNULIB_WMEMCPY])
11517- GNULIB_WMEMMOVE=0; AC_SUBST([GNULIB_WMEMMOVE])
11518- GNULIB_WMEMPCPY=0; AC_SUBST([GNULIB_WMEMPCPY])
11519- GNULIB_WMEMSET=0; AC_SUBST([GNULIB_WMEMSET])
11520- GNULIB_WCSLEN=0; AC_SUBST([GNULIB_WCSLEN])
11521- GNULIB_WCSNLEN=0; AC_SUBST([GNULIB_WCSNLEN])
11522- GNULIB_WCSCPY=0; AC_SUBST([GNULIB_WCSCPY])
11523- GNULIB_WCPCPY=0; AC_SUBST([GNULIB_WCPCPY])
11524- GNULIB_WCSNCPY=0; AC_SUBST([GNULIB_WCSNCPY])
11525- GNULIB_WCPNCPY=0; AC_SUBST([GNULIB_WCPNCPY])
11526- GNULIB_WCSCAT=0; AC_SUBST([GNULIB_WCSCAT])
11527- GNULIB_WCSNCAT=0; AC_SUBST([GNULIB_WCSNCAT])
11528- GNULIB_WCSCMP=0; AC_SUBST([GNULIB_WCSCMP])
11529- GNULIB_WCSNCMP=0; AC_SUBST([GNULIB_WCSNCMP])
11530- GNULIB_WCSCASECMP=0; AC_SUBST([GNULIB_WCSCASECMP])
11531- GNULIB_WCSNCASECMP=0; AC_SUBST([GNULIB_WCSNCASECMP])
11532- GNULIB_WCSCOLL=0; AC_SUBST([GNULIB_WCSCOLL])
11533- GNULIB_WCSXFRM=0; AC_SUBST([GNULIB_WCSXFRM])
11534- GNULIB_WCSDUP=0; AC_SUBST([GNULIB_WCSDUP])
11535- GNULIB_WCSCHR=0; AC_SUBST([GNULIB_WCSCHR])
11536- GNULIB_WCSRCHR=0; AC_SUBST([GNULIB_WCSRCHR])
11537- GNULIB_WCSCSPN=0; AC_SUBST([GNULIB_WCSCSPN])
11538- GNULIB_WCSSPN=0; AC_SUBST([GNULIB_WCSSPN])
11539- GNULIB_WCSPBRK=0; AC_SUBST([GNULIB_WCSPBRK])
11540- GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR])
11541- GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK])
11542- GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH])
11543- GNULIB_WCSFTIME=0; AC_SUBST([GNULIB_WCSFTIME])
11544- dnl Support Microsoft deprecated alias function names by default.
11545- GNULIB_MDA_WCSDUP=1; AC_SUBST([GNULIB_MDA_WCSDUP])
11546 dnl Assume proper GNU behavior unless another module says otherwise.
11547 HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC])
11548 HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT])
11549--- a/gnulib/m4/wctype_h.m4
11550+++ b/gnulib/m4/wctype_h.m4
11551@@ -1,4 +1,4 @@
11552-# wctype_h.m4 serial 26
11553+# wctype_h.m4 serial 30
11554
11555 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
11556
11557@@ -9,7 +9,7 @@ dnl with or without modifications, as lo
11558
11559 dnl Written by Paul Eggert.
11560
11561-AC_DEFUN([gl_WCTYPE_H],
11562+AC_DEFUN_ONCE([gl_WCTYPE_H],
11563 [
11564 AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
11565 AC_REQUIRE([AC_PROG_CC])
11566@@ -62,7 +62,7 @@ AC_DEFUN([gl_WCTYPE_H],
11567 fi
11568 AC_SUBST([HAVE_WCTYPE_H])
11569
11570- if test $GNULIB_OVERRIDES_WINT_T = 1; then
11571+ if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
11572 REPLACE_ISWCNTRL=1
11573 else
11574 case "$gl_cv_func_iswcntrl_works" in
11575@@ -157,24 +157,39 @@ AC_DEFUN([gl_WCTYPE_H],
11576 ])
11577 ])
11578
11579+# gl_WCTYPE_MODULE_INDICATOR([modulename])
11580+# sets the shell variable that indicates the presence of the given module
11581+# to a C preprocessor expression that will evaluate to 1.
11582+# This macro invocation must not occur in macros that are AC_REQUIREd.
11583 AC_DEFUN([gl_WCTYPE_MODULE_INDICATOR],
11584 [
11585- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
11586- AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
11587+ dnl Ensure to expand the default settings once only.
11588+ gl_WCTYPE_H_REQUIRE_DEFAULTS
11589 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
11590 dnl Define it also as a C macro, for the benefit of the unit tests.
11591 gl_MODULE_INDICATOR_FOR_TESTS([$1])
11592 ])
11593
11594+# Initializes the default values for AC_SUBSTed shell variables.
11595+# This macro must not be AC_REQUIREd. It must only be invoked, and only
11596+# outside of macros or in macros that are not AC_REQUIREd.
11597+AC_DEFUN([gl_WCTYPE_H_REQUIRE_DEFAULTS],
11598+[
11599+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_WCTYPE_H_MODULE_INDICATOR_DEFAULTS], [
11600+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWBLANK])
11601+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWDIGIT])
11602+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWXDIGIT])
11603+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTYPE])
11604+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWCTYPE])
11605+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTRANS])
11606+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOWCTRANS])
11607+ ])
11608+ m4_require(GL_MODULE_INDICATOR_PREFIX[_WCTYPE_H_MODULE_INDICATOR_DEFAULTS])
11609+ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
11610+])
11611+
11612 AC_DEFUN([gl_WCTYPE_H_DEFAULTS],
11613 [
11614- GNULIB_ISWBLANK=0; AC_SUBST([GNULIB_ISWBLANK])
11615- GNULIB_ISWDIGIT=0; AC_SUBST([GNULIB_ISWDIGIT])
11616- GNULIB_ISWXDIGIT=0; AC_SUBST([GNULIB_ISWXDIGIT])
11617- GNULIB_WCTYPE=0; AC_SUBST([GNULIB_WCTYPE])
11618- GNULIB_ISWCTYPE=0; AC_SUBST([GNULIB_ISWCTYPE])
11619- GNULIB_WCTRANS=0; AC_SUBST([GNULIB_WCTRANS])
11620- GNULIB_TOWCTRANS=0; AC_SUBST([GNULIB_TOWCTRANS])
11621 dnl Assume proper GNU behavior unless another module says otherwise.
11622 HAVE_ISWBLANK=1; AC_SUBST([HAVE_ISWBLANK])
11623 HAVE_WCTYPE_T=1; AC_SUBST([HAVE_WCTYPE_T])
11624--- a/gnulib/m4/wint_t.m4
11625+++ b/gnulib/m4/wint_t.m4
11626@@ -1,4 +1,4 @@
11627-# wint_t.m4 serial 10
11628+# wint_t.m4 serial 11
11629 dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc.
11630 dnl This file is free software; the Free Software Foundation
11631 dnl gives unlimited permission to copy and/or distribute it,
11632@@ -34,14 +34,14 @@ AC_DEFUN([gt_TYPE_WINT_T],
11633 [gl_cv_type_wint_t_large_enough=yes],
11634 [gl_cv_type_wint_t_large_enough=no])])
11635 if test $gl_cv_type_wint_t_large_enough = no; then
11636- GNULIB_OVERRIDES_WINT_T=1
11637+ GNULIBHEADERS_OVERRIDE_WINT_T=1
11638 else
11639- GNULIB_OVERRIDES_WINT_T=0
11640+ GNULIBHEADERS_OVERRIDE_WINT_T=0
11641 fi
11642 else
11643- GNULIB_OVERRIDES_WINT_T=0
11644+ GNULIBHEADERS_OVERRIDE_WINT_T=0
11645 fi
11646- AC_SUBST([GNULIB_OVERRIDES_WINT_T])
11647+ AC_SUBST([GNULIBHEADERS_OVERRIDE_WINT_T])
11648 ])
11649
11650 dnl Prerequisites of the 'wint_t' override.
11651--- /dev/null
11652+++ b/gnulib/m4/year2038.m4
11653@@ -0,0 +1,112 @@
11654+# year2038.m4 serial 5
11655+dnl Copyright (C) 2017-2021 Free Software Foundation, Inc.
11656+dnl This file is free software; the Free Software Foundation
11657+dnl gives unlimited permission to copy and/or distribute it,
11658+dnl with or without modifications, as long as this notice is preserved.
11659+
11660+dnl Attempt to ensure that 'time_t' is a 64-bit type
11661+dnl and that the functions time(), stat(), etc. return 64-bit times.
11662+
11663+AC_DEFUN([gl_YEAR2038_EARLY],
11664+[
11665+ AC_REQUIRE([AC_CANONICAL_HOST])
11666+ case "$host_os" in
11667+ mingw*)
11668+ AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1],
11669+ [For 64-bit time_t on 32-bit mingw.])
11670+ ;;
11671+ esac
11672+])
11673+
11674+# gl_YEAR2038_TEST_INCLUDES
11675+# -------------------------
11676+AC_DEFUN([gl_YEAR2038_TEST_INCLUDES],
11677+[[
11678+ #include <time.h>
11679+ /* Check that time_t can represent 2**63 - 1 correctly.
11680+ We can't simply define LARGE_TIME_T to be 9223372036854775807,
11681+ since some C++ compilers masquerading as C compilers
11682+ incorrectly reject 9223372036854775807. */
11683+ #define LARGE_TIME_T (((time_t) 1 << 31 << 31) - 1 + ((time_t) 1 << 31 << 31))
11684+ int verify_time_t_range[(LARGE_TIME_T % 2147483629 == 721
11685+ && LARGE_TIME_T % 2147483647 == 1)
11686+ ? 1 : -1];
11687+]])
11688+
11689+# gl_YEAR2038_BODY(REQUIRE-64-BIT)
11690+----------------------------------
11691+AC_DEFUN([gl_YEAR2038_BODY],
11692+[
11693+ AC_ARG_ENABLE([year2038],
11694+ [ --disable-year2038 omit support for timestamps past the year 2038])
11695+ AS_IF([test "$enable_year2038" != no],
11696+ [
11697+ dnl On many systems, time_t is already a 64-bit type.
11698+ dnl On those systems where time_t is still 32-bit, it requires kernel
11699+ dnl and libc support to make it 64-bit. For glibc 2.34 and later on Linux,
11700+ dnl defining _TIME_BITS=64 and _FILE_OFFSET_BITS=64 is needed on x86 and ARM.
11701+ dnl
11702+ dnl On native Windows, the system include files define types __time32_t
11703+ dnl and __time64_t. By default, time_t is an alias of
11704+ dnl - __time32_t on 32-bit mingw,
11705+ dnl - __time64_t on 64-bit mingw and on MSVC (since MSVC 8).
11706+ dnl But when compiling with -D__MINGW_USE_VC2005_COMPAT, time_t is an
11707+ dnl alias of __time64_t.
11708+ dnl And when compiling with -D_USE_32BIT_TIME_T, time_t is an alias of
11709+ dnl __time32_t.
11710+ AC_CACHE_CHECK([for 64-bit time_t], [gl_cv_type_time_t_64],
11711+ [AC_COMPILE_IFELSE(
11712+ [AC_LANG_SOURCE([gl_YEAR2038_TEST_INCLUDES])],
11713+ [gl_cv_type_time_t_64=yes], [gl_cv_type_time_t_64=no])
11714+ ])
11715+ if test "$gl_cv_type_time_t_64" = no; then
11716+ AC_CACHE_CHECK([for 64-bit time_t with _TIME_BITS=64],
11717+ [gl_cv_type_time_t_bits_macro],
11718+ [AC_COMPILE_IFELSE(
11719+ [AC_LANG_SOURCE([[#define _TIME_BITS 64
11720+ #define _FILE_OFFSET_BITS 64
11721+ ]gl_YEAR2038_TEST_INCLUDES])],
11722+ [gl_cv_type_time_t_bits_macro=yes],
11723+ [gl_cv_type_time_t_bits_macro=no])
11724+ ])
11725+ if test "$gl_cv_type_time_t_bits_macro" = yes; then
11726+ AC_DEFINE([_TIME_BITS], [64],
11727+ [Number of bits in a timestamp, on hosts where this is settable.])
11728+ dnl AC_SYS_LARGFILE also defines this; it's OK if we do too.
11729+ AC_DEFINE([_FILE_OFFSET_BITS], [64],
11730+ [Number of bits in a file offset, on hosts where this is settable.])
11731+ gl_cv_type_time_t_64=yes
11732+ fi
11733+ fi
11734+ if test $gl_cv_type_time_t_64 = no; then
11735+ AC_COMPILE_IFELSE(
11736+ [AC_LANG_SOURCE(
11737+ [[#ifdef _USE_32BIT_TIME_T
11738+ int ok;
11739+ #else
11740+ error fail
11741+ #endif
11742+ ]])],
11743+ [AC_MSG_FAILURE([This package requires a 64-bit 'time_t' type. Remove _USE_32BIT_TIME_T from the compiler flags.])],
11744+ [# If not cross-compiling and $1 says we should check,
11745+ # and 'touch' works with a large timestamp, then evidently 64-bit time_t
11746+ # is desired and supported, so fail and ask the builder to fix the
11747+ # problem. Otherwise, just warn the builder.
11748+ m4_ifval([$1],
11749+ [if test $cross_compiling = no \
11750+ && TZ=UTC0 touch -t 210602070628.16 conftest.time 2>/dev/null; then
11751+ rm -f conftest.time
11752+ AC_MSG_FAILURE([This package requires a 64-bit 'time_t' type, which your system appears to support. You might try configuring with 'CPPFLAGS="-m64" LDFLAGS="-m64"'. To build with a 32-bit time_t anyway (not recommended), configure with '--disable-year2038'.])
11753+ fi])
11754+ if test "$gl_warned_about_64_bit_time_t" != yes; then
11755+ AC_MSG_WARN([This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS="-m64" LDFLAGS="-m64"'?])
11756+ gl_warned_about_64_bit_time_t=yes
11757+ fi
11758+ ])
11759+ fi])
11760+])
11761+
11762+AC_DEFUN([gl_YEAR2038],
11763+[
11764+ gl_YEAR2038_BODY([require-64-bit])
11765+])