[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS: Run "gnulib-tool --add-import"
From: |
Gavin D. Smith |
Subject: |
branch master updated: * tp/Texinfo/XS: Run "gnulib-tool --add-import" |
Date: |
Sun, 13 Aug 2023 16:27:48 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 4c413955f4 * tp/Texinfo/XS: Run "gnulib-tool --add-import"
4c413955f4 is described below
commit 4c413955f4b845f02aa47e790fed4ece5e706942
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Aug 13 21:27:39 2023 +0100
* tp/Texinfo/XS: Run "gnulib-tool --add-import"
* tp/Texinfo/XS/Makefile.am
(XSParagraph_la_LDFLAGS, Parsetexi_la_LDFLAGS):
Add $(LTLIBUNISTRING) as recommended by gnulib-tool --add-import.
* tp/Texinfo/XS/parsetexi/labels.c,
* tp/Texinfo/XS/parsetexi/source-marks.c:
include <config.h> before <string.h>.
---
ChangeLog | 11 +
tp/Texinfo/XS/Makefile.am | 4 +-
tp/Texinfo/XS/gnulib/lib/Makefile.am | 93 ++-
tp/Texinfo/XS/gnulib/lib/alignof.h | 5 +
tp/Texinfo/XS/gnulib/lib/attribute.h | 15 +
tp/Texinfo/XS/gnulib/lib/c++defs.h | 6 +
tp/Texinfo/XS/gnulib/lib/c-ctype.h | 4 +-
tp/Texinfo/XS/gnulib/lib/c-strcase.h | 5 +
tp/Texinfo/XS/gnulib/lib/getdelim.c | 4 -
tp/Texinfo/XS/gnulib/lib/iconv.in.h | 5 +
tp/Texinfo/XS/gnulib/lib/inttypes.in.h | 5 +
tp/Texinfo/XS/gnulib/lib/limits.in.h | 17 +
tp/Texinfo/XS/gnulib/lib/localcharset.h | 4 +-
tp/Texinfo/XS/gnulib/lib/malloca.h | 6 +
tp/Texinfo/XS/gnulib/lib/{size_max.h => mbszero.c} | 21 +-
tp/Texinfo/XS/gnulib/lib/obstack.h | 5 +
tp/Texinfo/XS/gnulib/lib/size_max.h | 5 +
tp/Texinfo/XS/gnulib/lib/stddef.in.h | 5 +
tp/Texinfo/XS/gnulib/lib/stdio.in.h | 59 +-
tp/Texinfo/XS/gnulib/lib/stdlib.in.h | 33 +-
tp/Texinfo/XS/gnulib/lib/striconveh.h | 5 +
tp/Texinfo/XS/gnulib/lib/striconveha.c | 10 +
tp/Texinfo/XS/gnulib/lib/striconveha.h | 5 +
tp/Texinfo/XS/gnulib/lib/string.in.h | 6 +
tp/Texinfo/XS/gnulib/lib/sys_types.in.h | 7 +
tp/Texinfo/XS/gnulib/lib/unistd.in.h | 9 +-
tp/Texinfo/XS/gnulib/lib/unistr.in.h | 9 +
tp/Texinfo/XS/gnulib/lib/unistr/u8-check.c | 4 +-
tp/Texinfo/XS/gnulib/lib/unistr/u8-mblen.c | 4 +-
tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtouc-aux.c | 106 ++-
tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtouc.c | 106 ++-
tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtoucr.c | 4 +-
tp/Texinfo/XS/gnulib/lib/unistr/u8-prev.c | 4 +-
tp/Texinfo/XS/gnulib/lib/vasnprintf.c | 108 ++-
tp/Texinfo/XS/gnulib/lib/vasnprintf.h | 5 +
tp/Texinfo/XS/gnulib/lib/verify.h | 16 +-
tp/Texinfo/XS/gnulib/lib/wchar.in.h | 267 ++++++-
tp/Texinfo/XS/gnulib/lib/wctype.in.h | 81 ++-
tp/Texinfo/XS/gnulib/lib/xsize.h | 8 +-
tp/Texinfo/XS/gnulib/m4/exponentd.m4 | 4 +-
tp/Texinfo/XS/gnulib/m4/extern-inline.m4 | 4 +-
tp/Texinfo/XS/gnulib/m4/gnulib-common.m4 | 74 +-
tp/Texinfo/XS/gnulib/m4/gnulib-comp.m4 | 18 +-
tp/Texinfo/XS/gnulib/m4/lib-ld.m4 | 4 +-
tp/Texinfo/XS/gnulib/m4/lib-link.m4 | 2 +-
tp/Texinfo/XS/gnulib/m4/libunistring-base.m4 | 53 +-
tp/Texinfo/XS/gnulib/m4/limits-h.m4 | 22 +-
tp/Texinfo/XS/gnulib/m4/locale-fr.m4 | 300 ++++++++
tp/Texinfo/XS/gnulib/m4/locale-ja.m4 | 149 ++++
tp/Texinfo/XS/gnulib/m4/locale-zh.m4 | 143 ++++
tp/Texinfo/XS/gnulib/m4/mbrtowc.m4 | 792 +++++++++++++++++++++
tp/Texinfo/XS/gnulib/m4/mbstate_t.m4 | 34 +
tp/Texinfo/XS/gnulib/m4/printf.m4 | 197 +++--
tp/Texinfo/XS/gnulib/m4/ssize_t.m4 | 28 +-
tp/Texinfo/XS/gnulib/m4/stdalign.m4 | 38 +-
tp/Texinfo/XS/gnulib/m4/stdio_h.m4 | 21 +-
tp/Texinfo/XS/gnulib/m4/stdlib_h.m4 | 47 +-
tp/Texinfo/XS/gnulib/m4/vasnprintf.m4 | 67 +-
tp/Texinfo/XS/gnulib/m4/wchar_h.m4 | 6 +-
tp/Texinfo/XS/gnulib/m4/wctype_h.m4 | 4 +-
tp/Texinfo/XS/gnulib/m4/wcwidth.m4 | 6 +-
tp/Texinfo/XS/parsetexi/labels.c | 2 +-
tp/Texinfo/XS/parsetexi/source_marks.c | 1 +
63 files changed, 2757 insertions(+), 335 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a85b858a67..3d5f7811e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-08-13 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/XS: Run "gnulib-tool --add-import"
+
+ * tp/Texinfo/XS/Makefile.am
+ (XSParagraph_la_LDFLAGS, Parsetexi_la_LDFLAGS):
+ Add $(LTLIBUNISTRING) as recommended by gnulib-tool --add-import.
+ * tp/Texinfo/XS/parsetexi/labels.c,
+ * tp/Texinfo/XS/parsetexi/source-marks.c:
+ include <config.h> before <string.h>.
+
2023-08-13 Gavin Smith <gavinsmith0123@gmail.com>
* README-hacking: advice on LDADD for new gnulib modules
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index 2eb2df5a3b..e32f7b92e6 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -82,7 +82,7 @@ AM_LDFLAGS = -avoid-version -module $(PERL_CONF_ccdlflags)
AM_LDFLAGS += $(PLATFORM_LDFLAGS)
XSParagraph_la_LIBADD = $(builddir)/gnulib/lib/libgnu.la
-XSParagraph_la_LDFLAGS = $(AM_LDFLAGS) $(LTLIBINTL) $(LTLIBICONV)
+XSParagraph_la_LDFLAGS = $(AM_LDFLAGS) $(LTLIBINTL) $(LTLIBICONV)
$(LTLIBUNISTRING)
@@ -149,7 +149,7 @@ EXTRA_DIST += $(p)/command_data.c
EXTRA_DIST += $(p)/Parsetexi.xs
Parsetexi_la_LIBADD = $(top_builddir)/gnulib/lib/libgnu.la
-Parsetexi_la_LDFLAGS = $(AM_LDFLAGS) $(LTLIBINTL) $(LTLIBICONV)
+Parsetexi_la_LDFLAGS = $(AM_LDFLAGS) $(LTLIBINTL) $(LTLIBICONV)
$(LTLIBUNISTRING)
# To locate include files under out-of-source builds.
Parsetexi_la_CPPFLAGS = -I$(srcdir)/parsetexi $(AM_CPPFLAGS)
diff --git a/tp/Texinfo/XS/gnulib/lib/Makefile.am
b/tp/Texinfo/XS/gnulib/lib/Makefile.am
index 19273e4910..235996afa5 100644
--- a/tp/Texinfo/XS/gnulib/lib/Makefile.am
+++ b/tp/Texinfo/XS/gnulib/lib/Makefile.am
@@ -469,6 +469,12 @@ EXTRA_DIST += malloca.h
## end gnulib module malloca
+## begin gnulib module mbszero
+
+libgnu_la_SOURCES += mbszero.c
+
+## end gnulib module mbszero
+
## begin gnulib module memchr
if GL_COND_OBJ_MEMCHR
@@ -724,8 +730,9 @@ stdio.h: stdio.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_MDA_GETW''@/$(GL_GNULIB_MDA_GETW)/g' \
-e 's/@''GNULIB_MDA_PUTW''@/$(GL_GNULIB_MDA_PUTW)/g' \
-e 's/@''GNULIB_MDA_TEMPNAM''@/$(GL_GNULIB_MDA_TEMPNAM)/g' \
- < $(srcdir)/stdio.in.h | \
- sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
+ < $(srcdir)/stdio.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
-e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
-e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
-e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
@@ -744,6 +751,8 @@ stdio.h: stdio.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
-e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
-e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
-e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
-e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
-e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \
@@ -781,9 +790,10 @@ stdio.h: stdio.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H)
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += stdio.h stdio.h-t
+ < $@-t2 > $@-t3
+ $(AM_V_at)rm -f $@-t1 $@-t2
+ $(AM_V_at)mv $@-t3 $@
+MOSTLYCLEANFILES += stdio.h stdio.h-t1 stdio.h-t2 stdio.h-t3
if GL_COND_OBJ_STDIO_READ
libgnu_la_SOURCES += stdio-read.c
@@ -860,8 +870,9 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's/@''GNULIB_MDA_GCVT''@/$(GL_GNULIB_MDA_GCVT)/g' \
-e 's/@''GNULIB_MDA_MKTEMP''@/$(GL_GNULIB_MDA_MKTEMP)/g' \
-e 's/@''GNULIB_MDA_PUTENV''@/$(GL_GNULIB_MDA_PUTENV)/g' \
- < $(srcdir)/stdlib.in.h | \
- sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+ < $(srcdir)/stdlib.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
-e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
-e
's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
@@ -869,6 +880,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
-e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
-e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+ -e
's|@''HAVE_DECL_PROGRAM_INVOCATION_NAME''@|$(HAVE_DECL_PROGRAM_INVOCATION_NAME)|g'
\
-e 's|@''HAVE_GETPROGNAME''@|$(HAVE_GETPROGNAME)|g' \
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
-e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
@@ -905,6 +917,8 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
-e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
-e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
-e 's|@''REPLACE__EXIT''@|$(REPLACE__EXIT)|g' \
-e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
-e
's|@''REPLACE_CALLOC_FOR_CALLOC_GNU''@|$(REPLACE_CALLOC_FOR_CALLOC_GNU)|g' \
@@ -917,6 +931,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
-e
's|@''REPLACE_MALLOC_FOR_MALLOC_GNU''@|$(REPLACE_MALLOC_FOR_MALLOC_GNU)|g' \
-e
's|@''REPLACE_MALLOC_FOR_MALLOC_POSIX''@|$(REPLACE_MALLOC_FOR_MALLOC_POSIX)|g' \
+ -e 's|@''REPLACE_MB_CUR_MAX''@|$(REPLACE_MB_CUR_MAX)|g' \
-e 's|@''REPLACE_MBSTOWCS''@|$(REPLACE_MBSTOWCS)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
-e 's|@''REPLACE_MKOSTEMP''@|$(REPLACE_MKOSTEMP)|g' \
@@ -948,9 +963,10 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e '/definition of _Noreturn/r $(_NORETURN_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += stdlib.h stdlib.h-t
+ < $@-t2 > $@-t3
+ $(AM_V_at)rm -f $@-t1 $@-t2
+ $(AM_V_at)mv $@-t3 $@
+MOSTLYCLEANFILES += stdlib.h stdlib.h-t1 stdlib.h-t2 stdlib.h-t3
EXTRA_DIST += stdlib.in.h
@@ -1048,8 +1064,9 @@ string.h: string.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_MDA_MEMCCPY''@/$(GL_GNULIB_MDA_MEMCCPY)/g' \
-e 's/@''GNULIB_MDA_STRDUP''@/$(GL_GNULIB_MDA_STRDUP)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
- < $(srcdir)/string.in.h | \
- sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
+ < $(srcdir)/string.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
-e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
@@ -1097,9 +1114,10 @@ string.h: string.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += string.h string.h-t
+ < $@-t1 > $@-t2
+ $(AM_V_at)rm -f $@-t1
+ $(AM_V_at)mv $@-t2 $@
+MOSTLYCLEANFILES += string.h string.h-t1 string.h-t2
EXTRA_DIST += string.in.h
@@ -1215,6 +1233,8 @@ unistd.h: unistd.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_FDATASYNC''@/$(GL_GNULIB_FDATASYNC)/g' \
-e 's/@''GNULIB_FSYNC''@/$(GL_GNULIB_FSYNC)/g' \
-e 's/@''GNULIB_FTRUNCATE''@/$(GL_GNULIB_FTRUNCATE)/g' \
+ < $(srcdir)/unistd.in.h > $@-t1
+ $(AM_V_at)sed \
-e 's/@''GNULIB_GETCWD''@/$(GL_GNULIB_GETCWD)/g' \
-e 's/@''GNULIB_GETDOMAINNAME''@/$(GL_GNULIB_GETDOMAINNAME)/g' \
-e 's/@''GNULIB_GETDTABLESIZE''@/$(GL_GNULIB_GETDTABLESIZE)/g' \
@@ -1276,8 +1296,9 @@ unistd.h: unistd.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_MDA_SWAB''@/$(GL_GNULIB_MDA_SWAB)/g' \
-e 's/@''GNULIB_MDA_UNLINK''@/$(GL_GNULIB_MDA_UNLINK)/g' \
-e 's/@''GNULIB_MDA_WRITE''@/$(GL_GNULIB_MDA_WRITE)/g' \
- < $(srcdir)/unistd.in.h | \
- sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
-e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
-e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
-e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
@@ -1324,8 +1345,9 @@ unistd.h: unistd.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
-e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
-e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
- | \
- sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
+ < $@-t2 > $@-t3
+ $(AM_V_at)sed \
+ -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
-e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
-e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
-e 's|@''REPLACE_COPY_FILE_RANGE''@|$(REPLACE_COPY_FILE_RANGE)|g'
\
@@ -1380,9 +1402,10 @@ unistd.h: unistd.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += unistd.h unistd.h-t
+ < $@-t3 > $@-t4
+ $(AM_V_at)rm -f $@-t1 $@-t2 $@-t3
+ $(AM_V_at)mv $@-t4 $@
+MOSTLYCLEANFILES += unistd.h unistd.h-t1 unistd.h-t2 unistd.h-t3 unistd.h-t4
EXTRA_DIST += unistd.in.h
@@ -1547,6 +1570,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_BTOWC''@/$(GL_GNULIB_BTOWC)/g' \
-e 's/@''GNULIB_WCTOB''@/$(GL_GNULIB_WCTOB)/g' \
-e 's/@''GNULIB_MBSINIT''@/$(GL_GNULIB_MBSINIT)/g' \
+ -e 's/@''GNULIB_MBSZERO''@/$(GL_GNULIB_MBSZERO)/g' \
-e 's/@''GNULIB_MBRTOWC''@/$(GL_GNULIB_MBRTOWC)/g' \
-e 's/@''GNULIB_MBRLEN''@/$(GL_GNULIB_MBRLEN)/g' \
-e 's/@''GNULIB_MBSRTOWCS''@/$(GL_GNULIB_MBSRTOWCS)/g' \
@@ -1587,8 +1611,9 @@ wchar.h: wchar.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_WCSFTIME''@/$(GL_GNULIB_WCSFTIME)/g' \
-e 's/@''GNULIB_MDA_WCSDUP''@/$(GL_GNULIB_MDA_WCSDUP)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
- < $(srcdir)/wchar.in.h | \
- sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+ < $(srcdir)/wchar.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
-e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
-e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
@@ -1631,8 +1656,9 @@ wchar.h: wchar.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
-e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
- | \
- sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
+ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
-e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
-e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
@@ -1647,15 +1673,19 @@ wchar.h: wchar.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
-e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
+ -e 's|@''REPLACE_WCSCMP''@|$(REPLACE_WCSCMP)|g' \
+ -e 's|@''REPLACE_WCSNCMP''@|$(REPLACE_WCSNCMP)|g' \
-e 's|@''REPLACE_WCSSTR''@|$(REPLACE_WCSSTR)|g' \
-e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \
+ -e 's|@''REPLACE_WMEMCMP''@|$(REPLACE_WMEMCMP)|g' \
-e 's|@''REPLACE_WMEMPCPY''@|$(REPLACE_WMEMPCPY)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += wchar.h wchar.h-t
+ < $@-t2 > $@-t3
+ $(AM_V_at)rm -f $@-t1 $@-t2
+ $(AM_V_at)mv $@-t3 $@
+MOSTLYCLEANFILES += wchar.h wchar.h-t1 wchar.h-t2 wchar.h-t3
EXTRA_DIST += wchar.in.h
@@ -1668,7 +1698,7 @@ libgnu_la_SOURCES += wctype-h.c
# We need the following in order to create <wctype.h> when the system
# doesn't have one that works with the given compiler.
-wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H)
$(WARN_ON_USE_H)
+wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H)
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(gl_V_at)$(SED_HEADER_STDOUT) \
-e 's|@''GUARD_PREFIX''@|GL|g' \
-e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
@@ -1695,7 +1725,10 @@ wctype.h: wctype.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(WARN_ON_USE_H
-e 's/@''REPLACE_ISWXDIGIT''@/$(REPLACE_ISWXDIGIT)/g' \
-e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
-e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
+ -e 's/@''REPLACE_WCTRANS''@/$(REPLACE_WCTRANS)/g' \
+ -e 's/@''REPLACE_WCTYPE''@/$(REPLACE_WCTYPE)/g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
$(srcdir)/wctype.in.h > $@-t
$(AM_V_at)mv $@-t $@
diff --git a/tp/Texinfo/XS/gnulib/lib/alignof.h
b/tp/Texinfo/XS/gnulib/lib/alignof.h
index 2ded1c7884..a790972763 100644
--- a/tp/Texinfo/XS/gnulib/lib/alignof.h
+++ b/tp/Texinfo/XS/gnulib/lib/alignof.h
@@ -17,6 +17,11 @@
#ifndef _ALIGNOF_H
#define _ALIGNOF_H
+/* This file uses alignof. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stddef.h>
/* alignof_slot (TYPE)
diff --git a/tp/Texinfo/XS/gnulib/lib/attribute.h
b/tp/Texinfo/XS/gnulib/lib/attribute.h
index 130644d879..9464fde0f3 100644
--- a/tp/Texinfo/XS/gnulib/lib/attribute.h
+++ b/tp/Texinfo/XS/gnulib/lib/attribute.h
@@ -41,6 +41,21 @@
These names begin with 'ATTRIBUTE_' to avoid name clashes. */
+/* This file uses _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_ALWAYS_INLINE,
+ _GL_ATTRIBUTE_ARTIFICIAL, _GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_CONST,
+ _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR,
+ _GL_ATTRIBUTE_WARNING, _GL_ATTRIBUTE_EXTERNALLY_VISIBLE,
+ _GL_ATTRIBUTE_FALLTHROUGH, _GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_LEAF,
+ _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_MAY_ALIAS, _GL_ATTRIBUTE_MAYBE_UNUSED,
+ _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE, _GL_ATTRIBUTE_NONNULL,
+ _GL_ATTRIBUTE_NONSTRING, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED,
+ _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_RETURNS_NONNULL,
+ _GL_ATTRIBUTE_SENTINEL. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
+
/* =============== Attributes for specific kinds of functions ===============
*/
/* Attributes for functions that should not be used. */
diff --git a/tp/Texinfo/XS/gnulib/lib/c++defs.h
b/tp/Texinfo/XS/gnulib/lib/c++defs.h
index 8ad46951ad..458c014de5 100644
--- a/tp/Texinfo/XS/gnulib/lib/c++defs.h
+++ b/tp/Texinfo/XS/gnulib/lib/c++defs.h
@@ -99,6 +99,12 @@
Example:
_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
_GL_ARG_NONNULL ((1)));
+
+ Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front
+ of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's
+ because
+ [[...]] extern "C" <declaration>;
+ is invalid syntax in C++.)
*/
#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
_GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
diff --git a/tp/Texinfo/XS/gnulib/lib/c-ctype.h
b/tp/Texinfo/XS/gnulib/lib/c-ctype.h
index 35ca83d7d4..cb0f4f3ba1 100644
--- a/tp/Texinfo/XS/gnulib/lib/c-ctype.h
+++ b/tp/Texinfo/XS/gnulib/lib/c-ctype.h
@@ -23,9 +23,11 @@
#ifndef C_CTYPE_H
#define C_CTYPE_H
-#ifndef _GL_INLINE_HEADER_BEGIN
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE. */
+#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
+
_GL_INLINE_HEADER_BEGIN
#ifndef C_CTYPE_INLINE
# define C_CTYPE_INLINE _GL_INLINE
diff --git a/tp/Texinfo/XS/gnulib/lib/c-strcase.h
b/tp/Texinfo/XS/gnulib/lib/c-strcase.h
index 9bcca01b27..5dfa96c41f 100644
--- a/tp/Texinfo/XS/gnulib/lib/c-strcase.h
+++ b/tp/Texinfo/XS/gnulib/lib/c-strcase.h
@@ -18,6 +18,11 @@
#ifndef C_STRCASE_H
#define C_STRCASE_H
+/* This file uses _GL_ATTRIBUTE_PURE. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stddef.h>
diff --git a/tp/Texinfo/XS/gnulib/lib/getdelim.c
b/tp/Texinfo/XS/gnulib/lib/getdelim.c
index 79ec3dd12a..e414df648f 100644
--- a/tp/Texinfo/XS/gnulib/lib/getdelim.c
+++ b/tp/Texinfo/XS/gnulib/lib/getdelim.c
@@ -30,10 +30,6 @@
#include <stdlib.h>
#include <errno.h>
-#ifndef SSIZE_MAX
-# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
-#endif
-
#if USE_UNLOCKED_IO
# include "unlocked-io.h"
# define getc_maybe_unlocked(fp) getc(fp)
diff --git a/tp/Texinfo/XS/gnulib/lib/iconv.in.h
b/tp/Texinfo/XS/gnulib/lib/iconv.in.h
index 09943a72cb..56de44ca93 100644
--- a/tp/Texinfo/XS/gnulib/lib/iconv.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/iconv.in.h
@@ -28,6 +28,11 @@
#ifndef _@GUARD_PREFIX@_ICONV_H
#define _@GUARD_PREFIX@_ICONV_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
diff --git a/tp/Texinfo/XS/gnulib/lib/inttypes.in.h
b/tp/Texinfo/XS/gnulib/lib/inttypes.in.h
index 5b7ef12dc7..22643876ab 100644
--- a/tp/Texinfo/XS/gnulib/lib/inttypes.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/inttypes.in.h
@@ -46,6 +46,11 @@
#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
#define INTTYPES_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Include <stdint.h> or the gnulib replacement.
But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
diff --git a/tp/Texinfo/XS/gnulib/lib/limits.in.h
b/tp/Texinfo/XS/gnulib/lib/limits.in.h
index a01b4c6a28..e2e173eb2d 100644
--- a/tp/Texinfo/XS/gnulib/lib/limits.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/limits.in.h
@@ -99,6 +99,11 @@
# endif
#endif
+/* Assume no multibyte character is longer than 16 bytes. */
+#ifndef MB_LEN_MAX
+# define MB_LEN_MAX 16
+#endif
+
/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */
#if (! defined ULLONG_WIDTH \
@@ -129,6 +134,18 @@
# endif
#endif
+/* Macro specified by POSIX. */
+
+/* The maximum ssize_t value. Although it might not be of ssize_t type
+ as it should be, it's too much trouble to fix this minor detail. */
+#ifndef SSIZE_MAX
+# ifdef _WIN64
+# define SSIZE_MAX LLONG_MAX
+# else
+# define SSIZE_MAX LONG_MAX
+# endif
+#endif
+
#endif /* _@GUARD_PREFIX@_LIMITS_H */
#endif /* _@GUARD_PREFIX@_LIMITS_H */
#endif
diff --git a/tp/Texinfo/XS/gnulib/lib/localcharset.h
b/tp/Texinfo/XS/gnulib/lib/localcharset.h
index 29ee8dc04b..25c9bb9c6e 100644
--- a/tp/Texinfo/XS/gnulib/lib/localcharset.h
+++ b/tp/Texinfo/XS/gnulib/lib/localcharset.h
@@ -104,10 +104,8 @@ extern const char * locale_charset (void);
GBK glibc aix osf solaris freebsd darwin cygwin
windows dos
GB18030 glibc hpux solaris freebsd netbsd darwin
SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
- JOHAB glibc solaris windows
+ JOHAB solaris windows
TIS-620 glibc aix hpux osf solaris cygwin zos
- VISCII Y glibc
- TCVN5712-1 glibc
ARMSCII-8 glibc freebsd netbsd darwin
GEORGIAN-PS glibc cygwin
PT154 glibc netbsd cygwin
diff --git a/tp/Texinfo/XS/gnulib/lib/malloca.h
b/tp/Texinfo/XS/gnulib/lib/malloca.h
index 325c727717..f68ddfe010 100644
--- a/tp/Texinfo/XS/gnulib/lib/malloca.h
+++ b/tp/Texinfo/XS/gnulib/lib/malloca.h
@@ -18,6 +18,12 @@
#ifndef _MALLOCA_H
#define _MALLOCA_H
+/* This file uses _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_DEALLOC,
+ _GL_ATTRIBUTE_MALLOC, HAVE_ALLOCA. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <alloca.h>
#include <stddef.h>
#include <stdlib.h>
diff --git a/tp/Texinfo/XS/gnulib/lib/size_max.h
b/tp/Texinfo/XS/gnulib/lib/mbszero.c
similarity index 55%
copy from tp/Texinfo/XS/gnulib/lib/size_max.h
copy to tp/Texinfo/XS/gnulib/lib/mbszero.c
index 48af025055..6da91c6b20 100644
--- a/tp/Texinfo/XS/gnulib/lib/size_max.h
+++ b/tp/Texinfo/XS/gnulib/lib/mbszero.c
@@ -1,6 +1,5 @@
-/* size_max.h -- declare SIZE_MAX through system headers
- Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
- Written by Simon Josefsson.
+/* Put an mbstate_t into an initial conversion state.
+ Copyright (C) 2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -15,16 +14,10 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
-#ifndef GNULIB_SIZE_MAX_H
-#define GNULIB_SIZE_MAX_H
+/* Written by Bruno Haible <bruno@clisp.org>, 2023. */
-/* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */
-# include <limits.h>
-/* Get SIZE_MAX declaration on systems like glibc 2. */
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
-/* On systems where these include files don't define it, SIZE_MAX is defined
- in config.h. */
+#include <config.h>
-#endif /* GNULIB_SIZE_MAX_H */
+#define IN_MBSZERO
+/* Specification and implementation. */
+#include <wchar.h>
diff --git a/tp/Texinfo/XS/gnulib/lib/obstack.h
b/tp/Texinfo/XS/gnulib/lib/obstack.h
index 1e66e4d4c8..cb080c33b5 100644
--- a/tp/Texinfo/XS/gnulib/lib/obstack.h
+++ b/tp/Texinfo/XS/gnulib/lib/obstack.h
@@ -103,6 +103,11 @@
#ifndef _OBSTACK_H
#define _OBSTACK_H 1
+/* This file uses _Noreturn, _GL_ATTRIBUTE_PURE. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#ifndef _OBSTACK_INTERFACE_VERSION
# define _OBSTACK_INTERFACE_VERSION 2
#endif
diff --git a/tp/Texinfo/XS/gnulib/lib/size_max.h
b/tp/Texinfo/XS/gnulib/lib/size_max.h
index 48af025055..2cfd31a59b 100644
--- a/tp/Texinfo/XS/gnulib/lib/size_max.h
+++ b/tp/Texinfo/XS/gnulib/lib/size_max.h
@@ -18,6 +18,11 @@
#ifndef GNULIB_SIZE_MAX_H
#define GNULIB_SIZE_MAX_H
+/* This file uses HAVE_STDINT_H. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */
# include <limits.h>
/* Get SIZE_MAX declaration on systems like glibc 2. */
diff --git a/tp/Texinfo/XS/gnulib/lib/stddef.in.h
b/tp/Texinfo/XS/gnulib/lib/stddef.in.h
index ddbb74cedb..431e819b8b 100644
--- a/tp/Texinfo/XS/gnulib/lib/stddef.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/stddef.in.h
@@ -101,6 +101,11 @@ typedef long max_align_t;
# ifndef _@GUARD_PREFIX@_STDDEF_H
# define _@GUARD_PREFIX@_STDDEF_H
+/* This file uses _Noreturn. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Some platforms lack wchar_t. */
#if !@HAVE_WCHAR_T@
# define wchar_t int
diff --git a/tp/Texinfo/XS/gnulib/lib/stdio.in.h
b/tp/Texinfo/XS/gnulib/lib/stdio.in.h
index 0ed3e7595c..6be12c0525 100644
--- a/tp/Texinfo/XS/gnulib/lib/stdio.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/stdio.in.h
@@ -57,6 +57,12 @@
#ifndef _@GUARD_PREFIX@_STDIO_H
#define _@GUARD_PREFIX@_STDIO_H
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_FORMAT,
+ _GL_ATTRIBUTE_MALLOC, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Get va_list. Needed on many systems, including glibc 2.8. */
#include <stdarg.h>
@@ -127,6 +133,16 @@
# endif
#endif
+/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
+ allocated memory. */
+#ifndef _GL_ATTRIBUTE_MALLOC
+# if __GNUC__ >= 3 || defined __clang__
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+# else
+# define _GL_ATTRIBUTE_MALLOC
+# endif
+#endif
+
/* An __attribute__ __format__ specifier for a function that takes a format
string and arguments, where the format string directives are the ones
standardized by ISO C99 and POSIX.
@@ -209,12 +225,11 @@
#ifndef _PRINTF_NAN_LEN_MAX
# if defined __FreeBSD__ || defined __DragonFly__ \
|| defined __NetBSD__ \
- || defined __OpenBSD__ \
|| (defined __APPLE__ && defined __MACH__)
/* On BSD systems, a NaN value prints as just "nan", without a sign. */
# define _PRINTF_NAN_LEN_MAX 3
-# elif (__GLIBC__ >= 2) || MUSL_LIBC || defined __sun || defined __CYGWIN__
-/* glibc, musl libc, Solaris libc, and Cygwin produce "[-]nan". */
+# elif (__GLIBC__ >= 2) || MUSL_LIBC || defined __OpenBSD__ || defined __sun
|| defined __CYGWIN__
+/* glibc, musl libc, OpenBSD, Solaris libc, and Cygwin produce "[-]nan". */
# define _PRINTF_NAN_LEN_MAX 4
# elif defined _AIX
/* AIX produces "[-]NaNQ". */
@@ -317,7 +332,8 @@ _GL_CXXALIASWARN (fcloseall);
# endif
_GL_FUNCDECL_RPL (fdopen, FILE *,
(int fd, const char *mode)
- _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
# elif defined _WIN32 && !defined __CYGWIN__
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -330,7 +346,8 @@ _GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char
*mode));
/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */
_GL_FUNCDECL_SYS (fdopen, FILE *,
(int fd, const char *mode)
- _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
# endif
@@ -340,7 +357,8 @@ _GL_CXXALIASWARN (fdopen);
/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */
_GL_FUNCDECL_SYS (fdopen, FILE *,
(int fd, const char *mode)
- _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
# if defined GNULIB_POSIXCHECK
# undef fdopen
@@ -451,7 +469,8 @@ _GL_CXXALIASWARN (fileno);
# endif
_GL_FUNCDECL_RPL (fopen, FILE *,
(const char *restrict filename, const char *restrict mode)
- _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
_GL_CXXALIAS_RPL (fopen, FILE *,
(const char *restrict filename, const char *restrict mode));
# else
@@ -998,6 +1017,10 @@ _GL_WARN_ON_USE (gets, "gets is a security hole - use
fgets instead");
_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream));
# else
# if @HAVE_DECL_GETW@
+# if defined __APPLE__ && defined __MACH__
+/* The presence of the declaration depends on _POSIX_C_SOURCE. */
+_GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream));
+# endif
_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream));
# endif
# endif
@@ -1102,13 +1125,15 @@ _GL_WARN_ON_USE (perror, "perror is not always POSIX
compliant - "
# endif
_GL_FUNCDECL_RPL (popen, FILE *,
(const char *cmd, const char *mode)
- _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1));
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
# else
# if !@HAVE_POPEN@ || __GNUC__ >= 11
_GL_FUNCDECL_SYS (popen, FILE *,
(const char *cmd, const char *mode)
- _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1));
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
# endif
@@ -1118,7 +1143,8 @@ _GL_CXXALIASWARN (popen);
/* For -Wmismatched-dealloc: Associate popen with pclose or rpl_pclose. */
_GL_FUNCDECL_SYS (popen, FILE *,
(const char *cmd, const char *mode)
- _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1));
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
# if defined GNULIB_POSIXCHECK
# undef popen
@@ -1241,6 +1267,10 @@ _GL_CXXALIASWARN (puts);
_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream));
# else
# if @HAVE_DECL_PUTW@
+# if defined __APPLE__ && defined __MACH__
+/* The presence of the declaration depends on _POSIX_C_SOURCE. */
+_GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream));
+# endif
_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream));
# endif
# endif
@@ -1452,13 +1482,15 @@ _GL_CXXALIASWARN (tempnam);
# define tmpfile rpl_tmpfile
# endif
_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)
- _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
_GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
# else
# if __GNUC__ >= 11
/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */
_GL_FUNCDECL_SYS (tmpfile, FILE *, (void)
- _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
_GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
# endif
@@ -1469,7 +1501,8 @@ _GL_CXXALIASWARN (tmpfile);
# if @GNULIB_FCLOSE@ && __GNUC__ >= 11 && !defined tmpfile
/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */
_GL_FUNCDECL_SYS (tmpfile, FILE *, (void)
- _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
# if defined GNULIB_POSIXCHECK
# undef tmpfile
diff --git a/tp/Texinfo/XS/gnulib/lib/stdlib.in.h
b/tp/Texinfo/XS/gnulib/lib/stdlib.in.h
index 4ecfc96a6f..1479a2b287 100644
--- a/tp/Texinfo/XS/gnulib/lib/stdlib.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/stdlib.in.h
@@ -37,6 +37,12 @@
#ifndef _@GUARD_PREFIX@_STDLIB_H
#define _@GUARD_PREFIX@_STDLIB_H
+/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+ _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
@@ -67,9 +73,7 @@
# include <random.h>
# endif
-# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@
-# include <stdint.h>
-# endif
+# include <stdint.h>
# if !@HAVE_STRUCT_RANDOM_DATA@
/* Define 'struct random_data'.
@@ -461,7 +465,7 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
# undef getprogname
# define getprogname rpl_getprogname
# endif
-# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME
+# if @HAVE_DECL_PROGRAM_INVOCATION_NAME@
_GL_FUNCDECL_RPL (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE);
# else
_GL_FUNCDECL_RPL (getprogname, const char *, (void));
@@ -469,7 +473,7 @@ _GL_FUNCDECL_RPL (getprogname, const char *, (void));
_GL_CXXALIAS_RPL (getprogname, const char *, (void));
# else
# if !@HAVE_GETPROGNAME@
-# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME
+# if @HAVE_DECL_PROGRAM_INVOCATION_NAME@
_GL_FUNCDECL_SYS (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE);
# else
_GL_FUNCDECL_SYS (getprogname, const char *, (void));
@@ -589,6 +593,21 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant
everywhere - "
# endif
#endif
+/* Return maximum number of bytes of a multibyte character. */
+#if @REPLACE_MB_CUR_MAX@
+# if !GNULIB_defined_MB_CUR_MAX
+static inline
+int gl_MB_CUR_MAX (void)
+{
+ /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */
+ return MB_CUR_MAX + (MB_CUR_MAX == 3);
+}
+# undef MB_CUR_MAX
+# define MB_CUR_MAX gl_MB_CUR_MAX ()
+# define GNULIB_defined_MB_CUR_MAX 1
+# endif
+#endif
+
/* Convert a string to a wide string. */
#if @GNULIB_MBSTOWCS@
# if @REPLACE_MBSTOWCS@
@@ -1039,7 +1058,9 @@ _GL_FUNCDECL_SYS (random, long, (void));
int. */
_GL_CXXALIAS_SYS_CAST (random, long, (void));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (random);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef random
# if HAVE_RAW_DECL_RANDOM
@@ -1064,7 +1085,9 @@ _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
unsigned long seed. */
_GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (srandom);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef srandom
# if HAVE_RAW_DECL_SRANDOM
diff --git a/tp/Texinfo/XS/gnulib/lib/striconveh.h
b/tp/Texinfo/XS/gnulib/lib/striconveh.h
index 7858b03ef6..b109af4ea9 100644
--- a/tp/Texinfo/XS/gnulib/lib/striconveh.h
+++ b/tp/Texinfo/XS/gnulib/lib/striconveh.h
@@ -18,6 +18,11 @@
#ifndef _STRICONVEH_H
#define _STRICONVEH_H
+/* This file uses _GL_ATTRIBUTE_MALLOC, HAVE_ICONV. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stdlib.h>
#if HAVE_ICONV
#include <iconv.h>
diff --git a/tp/Texinfo/XS/gnulib/lib/striconveha.c
b/tp/Texinfo/XS/gnulib/lib/striconveha.c
index ed88c84c19..f388c9f095 100644
--- a/tp/Texinfo/XS/gnulib/lib/striconveha.c
+++ b/tp/Texinfo/XS/gnulib/lib/striconveha.c
@@ -234,6 +234,11 @@ mem_iconveha (const char *src, size_t srclen,
int retval;
size_t len = strlen (to_codeset);
char *to_codeset_suffixed = (char *) malloca (len + 10 + 1);
+ if (to_codeset_suffixed == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
memcpy (to_codeset_suffixed, to_codeset, len);
memcpy (to_codeset_suffixed + len, "//TRANSLIT", 10 + 1);
@@ -336,6 +341,11 @@ str_iconveha (const char *src,
char *result;
size_t len = strlen (to_codeset);
char *to_codeset_suffixed = (char *) malloca (len + 10 + 1);
+ if (to_codeset_suffixed == NULL)
+ {
+ errno = ENOMEM;
+ return NULL;
+ }
memcpy (to_codeset_suffixed, to_codeset, len);
memcpy (to_codeset_suffixed + len, "//TRANSLIT", 10 + 1);
diff --git a/tp/Texinfo/XS/gnulib/lib/striconveha.h
b/tp/Texinfo/XS/gnulib/lib/striconveha.h
index d0b0f4ddb7..a5c307ea2a 100644
--- a/tp/Texinfo/XS/gnulib/lib/striconveha.h
+++ b/tp/Texinfo/XS/gnulib/lib/striconveha.h
@@ -18,6 +18,11 @@
#ifndef _STRICONVEHA_H
#define _STRICONVEHA_H
+/* This file uses _GL_ATTRIBUTE_MALLOC. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stdlib.h>
#include "iconveh.h"
diff --git a/tp/Texinfo/XS/gnulib/lib/string.in.h
b/tp/Texinfo/XS/gnulib/lib/string.in.h
index b6bf432e1f..912d0f7a30 100644
--- a/tp/Texinfo/XS/gnulib/lib/string.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/string.in.h
@@ -44,6 +44,12 @@
#ifndef _@GUARD_PREFIX@_STRING_H
#define _@GUARD_PREFIX@_STRING_H
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+ _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
diff --git a/tp/Texinfo/XS/gnulib/lib/sys_types.in.h
b/tp/Texinfo/XS/gnulib/lib/sys_types.in.h
index 082a6c674d..ea77e140be 100644
--- a/tp/Texinfo/XS/gnulib/lib/sys_types.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/sys_types.in.h
@@ -20,6 +20,13 @@
#endif
@PRAGMA_COLUMNS@
+/* This file uses #include_next of a system file that defines time_t.
+ For the 'year2038' module to work right, <config.h> needs to have been
+ included before. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#if defined _WIN32 && !defined __CYGWIN__ \
&& (defined __need_off_t || defined __need___off64_t \
|| defined __need_ssize_t || defined __need_time_t)
diff --git a/tp/Texinfo/XS/gnulib/lib/unistd.in.h
b/tp/Texinfo/XS/gnulib/lib/unistd.in.h
index 8ba9867894..2ae040a76b 100644
--- a/tp/Texinfo/XS/gnulib/lib/unistd.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/unistd.in.h
@@ -69,6 +69,12 @@
#if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
#define _@GUARD_PREFIX@_UNISTD_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK,
+ HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* NetBSD 5.0 mis-defines NULL. Also get size_t. */
/* But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
@@ -170,9 +176,6 @@
# include <getopt-pfx-core.h>
#endif
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_UNISTD_INLINE
# define _GL_UNISTD_INLINE _GL_INLINE
diff --git a/tp/Texinfo/XS/gnulib/lib/unistr.in.h
b/tp/Texinfo/XS/gnulib/lib/unistr.in.h
index d85ad51717..a4cc69912f 100644
--- a/tp/Texinfo/XS/gnulib/lib/unistr.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/unistr.in.h
@@ -380,6 +380,15 @@ extern uint16_t *
extern uint32_t *
u32_cpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n);
+/* Copy N units from SRC to DEST, returning pointer after last written unit.
*/
+/* Similar to mempcpy(). */
+extern uint8_t *
+ u8_pcpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n);
+extern uint16_t *
+ u16_pcpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n);
+extern uint32_t *
+ u32_pcpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n);
+
/* Copy N units from SRC to DEST, guaranteeing correct behavior for
overlapping memory areas. */
/* Similar to memmove(). */
diff --git a/tp/Texinfo/XS/gnulib/lib/unistr/u8-check.c
b/tp/Texinfo/XS/gnulib/lib/unistr/u8-check.c
index 2f03cd9af0..53217006ea 100644
--- a/tp/Texinfo/XS/gnulib/lib/unistr/u8-check.c
+++ b/tp/Texinfo/XS/gnulib/lib/unistr/u8-check.c
@@ -57,13 +57,13 @@ u8_check (const uint8_t *s, size_t n)
continue;
}
}
- else if (c < 0xf8)
+ else if (c <= 0xf4)
{
if (s + 4 <= s_end
&& (s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
&& (s[3] ^ 0x80) < 0x40
&& (c >= 0xf1 || s[1] >= 0x90)
- && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90)))
+ && (c < 0xf4 || (/* c == 0xf4 && */ s[1] < 0x90)))
{
s += 4;
continue;
diff --git a/tp/Texinfo/XS/gnulib/lib/unistr/u8-mblen.c
b/tp/Texinfo/XS/gnulib/lib/unistr/u8-mblen.c
index a5f88dedef..d989afc437 100644
--- a/tp/Texinfo/XS/gnulib/lib/unistr/u8-mblen.c
+++ b/tp/Texinfo/XS/gnulib/lib/unistr/u8-mblen.c
@@ -47,13 +47,13 @@ u8_mblen (const uint8_t *s, size_t n)
&& (c != 0xed || s[1] < 0xa0))
return 3;
}
- else if (c < 0xf8)
+ else if (c <= 0xf4)
{
if (n >= 4
&& (s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
&& (s[3] ^ 0x80) < 0x40
&& (c >= 0xf1 || s[1] >= 0x90)
- && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90)))
+ && (c < 0xf4 || (/* c == 0xf4 && */ s[1] < 0x90)))
return 4;
}
}
diff --git a/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtouc-aux.c
b/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtouc-aux.c
index a6b7edcfb9..15568c3bc8 100644
--- a/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtouc-aux.c
+++ b/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtouc-aux.c
@@ -52,20 +52,15 @@ u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n)
{
if (n >= 3)
{
- if ((s[1] ^ 0x80) < 0x40)
+ if ((s[1] ^ 0x80) < 0x40
+ && (c >= 0xe1 || s[1] >= 0xa0)
+ && (c != 0xed || s[1] < 0xa0))
{
if ((s[2] ^ 0x80) < 0x40)
{
- if ((c >= 0xe1 || s[1] >= 0xa0)
- && (c != 0xed || s[1] < 0xa0))
- {
- *puc = ((unsigned int) (c & 0x0f) << 12)
- | ((unsigned int) (s[1] ^ 0x80) << 6)
- | (unsigned int) (s[2] ^ 0x80);
- return 3;
- }
- /* invalid multibyte character */
- *puc = 0xfffd;
+ *puc = ((unsigned int) (c & 0x0f) << 12)
+ | ((unsigned int) (s[1] ^ 0x80) << 6)
+ | (unsigned int) (s[2] ^ 0x80);
return 3;
}
/* invalid multibyte character */
@@ -73,38 +68,50 @@ u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n)
return 2;
}
/* invalid multibyte character */
+ *puc = 0xfffd;
+ return 1;
}
else
{
- /* incomplete multibyte character */
*puc = 0xfffd;
- if (n == 1 || (s[1] ^ 0x80) >= 0x40)
- return 1;
+ if (n == 1)
+ {
+ /* incomplete multibyte character */
+ return 1;
+ }
else
- return 2;
+ {
+ if ((s[1] ^ 0x80) < 0x40
+ && (c >= 0xe1 || s[1] >= 0xa0)
+ && (c != 0xed || s[1] < 0xa0))
+ {
+ /* incomplete multibyte character */
+ return 2;
+ }
+ else
+ {
+ /* invalid multibyte character */
+ return 1;
+ }
+ }
}
}
- else if (c < 0xf8)
+ else if (c <= 0xf4)
{
if (n >= 4)
{
- if ((s[1] ^ 0x80) < 0x40)
+ if ((s[1] ^ 0x80) < 0x40
+ && (c >= 0xf1 || s[1] >= 0x90)
+ && (c < 0xf4 || (/* c == 0xf4 && */ s[1] < 0x90)))
{
if ((s[2] ^ 0x80) < 0x40)
{
if ((s[3] ^ 0x80) < 0x40)
{
- if ((c >= 0xf1 || s[1] >= 0x90)
- && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90)))
- {
- *puc = ((unsigned int) (c & 0x07) << 18)
- | ((unsigned int) (s[1] ^ 0x80) << 12)
- | ((unsigned int) (s[2] ^ 0x80) << 6)
- | (unsigned int) (s[3] ^ 0x80);
- return 4;
- }
- /* invalid multibyte character */
- *puc = 0xfffd;
+ *puc = ((unsigned int) (c & 0x07) << 18)
+ | ((unsigned int) (s[1] ^ 0x80) << 12)
+ | ((unsigned int) (s[2] ^ 0x80) << 6)
+ | (unsigned int) (s[3] ^ 0x80);
return 4;
}
/* invalid multibyte character */
@@ -116,17 +123,48 @@ u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n)
return 2;
}
/* invalid multibyte character */
+ *puc = 0xfffd;
+ return 1;
}
else
{
- /* incomplete multibyte character */
*puc = 0xfffd;
- if (n == 1 || (s[1] ^ 0x80) >= 0x40)
- return 1;
- else if (n == 2 || (s[2] ^ 0x80) >= 0x40)
- return 2;
+ if (n == 1)
+ {
+ /* incomplete multibyte character */
+ return 1;
+ }
else
- return 3;
+ {
+ if ((s[1] ^ 0x80) < 0x40
+ && (c >= 0xf1 || s[1] >= 0x90)
+ && (c < 0xf4 || (/* c == 0xf4 && */ s[1] < 0x90)))
+ {
+ if (n == 2)
+ {
+ /* incomplete multibyte character */
+ return 2;
+ }
+ else
+ {
+ if ((s[2] ^ 0x80) < 0x40)
+ {
+ /* incomplete multibyte character */
+ return 3;
+ }
+ else
+ {
+ /* invalid multibyte character */
+ return 2;
+ }
+ }
+ }
+ else
+ {
+ /* invalid multibyte character */
+ return 1;
+ }
+ }
}
}
}
diff --git a/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtouc.c
b/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtouc.c
index e30e5203c1..920ad6f558 100644
--- a/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtouc.c
+++ b/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtouc.c
@@ -62,20 +62,15 @@ u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n)
{
if (n >= 3)
{
- if ((s[1] ^ 0x80) < 0x40)
+ if ((s[1] ^ 0x80) < 0x40
+ && (c >= 0xe1 || s[1] >= 0xa0)
+ && (c != 0xed || s[1] < 0xa0))
{
if ((s[2] ^ 0x80) < 0x40)
{
- if ((c >= 0xe1 || s[1] >= 0xa0)
- && (c != 0xed || s[1] < 0xa0))
- {
- *puc = ((unsigned int) (c & 0x0f) << 12)
- | ((unsigned int) (s[1] ^ 0x80) << 6)
- | (unsigned int) (s[2] ^ 0x80);
- return 3;
- }
- /* invalid multibyte character */
- *puc = 0xfffd;
+ *puc = ((unsigned int) (c & 0x0f) << 12)
+ | ((unsigned int) (s[1] ^ 0x80) << 6)
+ | (unsigned int) (s[2] ^ 0x80);
return 3;
}
/* invalid multibyte character */
@@ -83,38 +78,50 @@ u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n)
return 2;
}
/* invalid multibyte character */
+ *puc = 0xfffd;
+ return 1;
}
else
{
- /* incomplete multibyte character */
*puc = 0xfffd;
- if (n == 1 || (s[1] ^ 0x80) >= 0x40)
- return 1;
+ if (n == 1)
+ {
+ /* incomplete multibyte character */
+ return 1;
+ }
else
- return 2;
+ {
+ if ((s[1] ^ 0x80) < 0x40
+ && (c >= 0xe1 || s[1] >= 0xa0)
+ && (c != 0xed || s[1] < 0xa0))
+ {
+ /* incomplete multibyte character */
+ return 2;
+ }
+ else
+ {
+ /* invalid multibyte character */
+ return 1;
+ }
+ }
}
}
- else if (c < 0xf8)
+ else if (c <= 0xf4)
{
if (n >= 4)
{
- if ((s[1] ^ 0x80) < 0x40)
+ if ((s[1] ^ 0x80) < 0x40
+ && (c >= 0xf1 || s[1] >= 0x90)
+ && (c < 0xf4 || (/* c == 0xf4 && */ s[1] < 0x90)))
{
if ((s[2] ^ 0x80) < 0x40)
{
if ((s[3] ^ 0x80) < 0x40)
{
- if ((c >= 0xf1 || s[1] >= 0x90)
- && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90)))
- {
- *puc = ((unsigned int) (c & 0x07) << 18)
- | ((unsigned int) (s[1] ^ 0x80) << 12)
- | ((unsigned int) (s[2] ^ 0x80) << 6)
- | (unsigned int) (s[3] ^ 0x80);
- return 4;
- }
- /* invalid multibyte character */
- *puc = 0xfffd;
+ *puc = ((unsigned int) (c & 0x07) << 18)
+ | ((unsigned int) (s[1] ^ 0x80) << 12)
+ | ((unsigned int) (s[2] ^ 0x80) << 6)
+ | (unsigned int) (s[3] ^ 0x80);
return 4;
}
/* invalid multibyte character */
@@ -126,17 +133,48 @@ u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n)
return 2;
}
/* invalid multibyte character */
+ *puc = 0xfffd;
+ return 1;
}
else
{
- /* incomplete multibyte character */
*puc = 0xfffd;
- if (n == 1 || (s[1] ^ 0x80) >= 0x40)
- return 1;
- else if (n == 2 || (s[2] ^ 0x80) >= 0x40)
- return 2;
+ if (n == 1)
+ {
+ /* incomplete multibyte character */
+ return 1;
+ }
else
- return 3;
+ {
+ if ((s[1] ^ 0x80) < 0x40
+ && (c >= 0xf1 || s[1] >= 0x90)
+ && (c < 0xf4 || (/* c == 0xf4 && */ s[1] < 0x90)))
+ {
+ if (n == 2)
+ {
+ /* incomplete multibyte character */
+ return 2;
+ }
+ else
+ {
+ if ((s[2] ^ 0x80) < 0x40)
+ {
+ /* incomplete multibyte character */
+ return 3;
+ }
+ else
+ {
+ /* invalid multibyte character */
+ return 2;
+ }
+ }
+ }
+ else
+ {
+ /* invalid multibyte character */
+ return 1;
+ }
+ }
}
}
}
diff --git a/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtoucr.c
b/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtoucr.c
index d09051128f..296062d233 100644
--- a/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtoucr.c
+++ b/tp/Texinfo/XS/gnulib/lib/unistr/u8-mbtoucr.c
@@ -86,13 +86,13 @@ u8_mbtoucr (ucs4_t *puc, const uint8_t *s, size_t n)
return -2;
}
}
- else if (c < 0xf8)
+ else if (c <= 0xf4)
{
if (n >= 2)
{
if ((s[1] ^ 0x80) < 0x40
&& (c >= 0xf1 || s[1] >= 0x90)
- && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90)))
+ && (c < 0xf4 || (/* c == 0xf4 && */ s[1] < 0x90)))
{
if (n >= 3)
{
diff --git a/tp/Texinfo/XS/gnulib/lib/unistr/u8-prev.c
b/tp/Texinfo/XS/gnulib/lib/unistr/u8-prev.c
index 1012486b36..ad8a347c19 100644
--- a/tp/Texinfo/XS/gnulib/lib/unistr/u8-prev.c
+++ b/tp/Texinfo/XS/gnulib/lib/unistr/u8-prev.c
@@ -63,9 +63,9 @@ u8_prev (ucs4_t *puc, const uint8_t *s, const uint8_t *start)
{
uint8_t c_4 = s[-4];
- if (c_4 >= 0xf0 && c_4 < 0xf8
+ if (c_4 >= 0xf0 && c_4 <= 0xf4
&& (c_4 >= 0xf1 || c_3 >= 0x90)
- && (c_4 < 0xf4 || (c_4 == 0xf4 && c_3 < 0x90)))
+ && (c_4 < 0xf4 || (/* c_4 == 0xf4 && */ c_3 <
0x90)))
{
*puc = ((unsigned int) (c_4 & 0x07) << 18)
| ((unsigned int) (c_3 ^ 0x80) << 12)
diff --git a/tp/Texinfo/XS/gnulib/lib/vasnprintf.c
b/tp/Texinfo/XS/gnulib/lib/vasnprintf.c
index 111d898a94..2d9aa977ec 100644
--- a/tp/Texinfo/XS/gnulib/lib/vasnprintf.c
+++ b/tp/Texinfo/XS/gnulib/lib/vasnprintf.c
@@ -83,7 +83,7 @@
#include <stdio.h> /* snprintf(), sprintf() */
#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
#include <string.h> /* memcpy(), strlen() */
-#include <wchar.h> /* mbstate_t, mbrtowc(), mbrlen(), wcrtomb() */
+#include <wchar.h> /* mbstate_t, mbrtowc(), mbrlen(), wcrtomb(),
mbszero() */
#include <errno.h> /* errno */
#include <limits.h> /* CHAR_BIT, INT_WIDTH, LONG_WIDTH */
#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
@@ -103,7 +103,7 @@
#include "attribute.h"
-#if NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE
+#if NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE ||
(NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
# include <math.h>
# include "float+.h"
#endif
@@ -113,7 +113,7 @@
# include "isnand-nolibm.h"
#endif
-#if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE
+#if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE ||
(NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
# include <math.h>
# include "isnanl-nolibm.h"
# include "fpucw.h"
@@ -125,7 +125,7 @@
# include "printf-frexp.h"
#endif
-#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE
+#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE ||
(NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
# include <math.h>
# include "isnanl-nolibm.h"
# include "printf-frexpl.h"
@@ -247,7 +247,7 @@ local_strnlen (const char *string, size_t maxlen)
# endif
#endif
-#if (((!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 ||
USE_MSVC__SNPRINTF) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF ||
!HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS) &&
!WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
+#if (((!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 ||
USE_MSVC__SNPRINTF || NEED_WPRINTF_DIRECTIVE_LC) && WIDE_CHAR_VERSION) ||
((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
NEED_PRINTF_DIRECTIVE_LS) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) &&
HAVE_WCHAR_T
# if HAVE_WCSLEN
# define local_wcslen wcslen
# else
@@ -357,7 +357,7 @@ local_wctomb (char *s, wchar_t wc)
# endif
#endif
-#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE ||
NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE ||
NEED_PRINTF_INFINITE_DOUBLE
+#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE ||
NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE ||
NEED_PRINTF_INFINITE_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
/* Determine the decimal-point character according to the current locale. */
# ifndef decimal_point_char_defined
# define decimal_point_char_defined 1
@@ -927,6 +927,14 @@ divide (mpn_t a, mpn_t b, mpn_t *q)
return roomptr;
}
+/* Avoid pointless GCC warning "argument 1 value '18446744073709551615' exceeds
+ maximum object size 9223372036854775807", triggered by the use of xsum as
+ argument of malloc. */
+# if __GNUC__ >= 7
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Walloc-size-larger-than="
+# endif
+
/* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal
representation.
Destroys the contents of a.
@@ -983,6 +991,10 @@ convert_to_decimal (mpn_t a, size_t extra_zeroes)
return c_ptr;
}
+# if __GNUC__ >= 7
+# pragma GCC diagnostic pop
+# endif
+
# if NEED_PRINTF_LONG_DOUBLE
/* Assuming x is finite and >= 0:
@@ -1177,8 +1189,6 @@ scale10_round_decimal_decoded (int e, mpn_t m, void
*memory, int n)
void *z_memory;
char *digits;
- if (memory == NULL)
- return NULL;
/* x = 2^e * m, hence
y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m)
= round (2^s * 5^n * m). */
@@ -1386,10 +1396,13 @@ scale10_round_decimal_decoded (int e, mpn_t m, void
*memory, int n)
static char *
scale10_round_decimal_long_double (long double x, int n)
{
- int e IF_LINT(= 0);
+ int e;
mpn_t m;
void *memory = decode_long_double (x, &e, &m);
- return scale10_round_decimal_decoded (e, m, memory, n);
+ if (memory != NULL)
+ return scale10_round_decimal_decoded (e, m, memory, n);
+ else
+ return NULL;
}
# endif
@@ -1404,10 +1417,13 @@ scale10_round_decimal_long_double (long double x, int n)
static char *
scale10_round_decimal_double (double x, int n)
{
- int e IF_LINT(= 0);
+ int e;
mpn_t m;
void *memory = decode_double (x, &e, &m);
- return scale10_round_decimal_decoded (e, m, memory, n);
+ if (memory != NULL)
+ return scale10_round_decimal_decoded (e, m, memory, n);
+ else
+ return NULL;
}
# endif
@@ -1641,6 +1657,7 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index,
FCHAR_T conversion,
* 0.30103 /* binary -> decimal */
)
+ 1; /* turn floor into ceil */
+ break;
case TYPE_LONGINT:
tmp_length =
(unsigned int) (sizeof (long int) * CHAR_BIT
@@ -2748,14 +2765,14 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
}
#endif
-#if WIDE_CHAR_VERSION && !DCHAR_IS_TCHAR
+#if WIDE_CHAR_VERSION && (!DCHAR_IS_TCHAR || NEED_WPRINTF_DIRECTIVE_LC)
else if ((dp->conversion == 's'
&& a.arg[dp->arg_index].type == TYPE_WIDE_STRING)
|| (dp->conversion == 'c'
&& a.arg[dp->arg_index].type == TYPE_WIDE_CHAR))
{
/* %ls or %lc in vasnwprintf. See the specification of
- fwprintf. */
+ fwprintf. */
/* It would be silly to use snprintf ("%ls", ...) and then
convert back the result from a char[] to a wchar_t[].
Instead, just copy the argument wchar_t[] to the result. */
@@ -2990,7 +3007,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
wide characters, from the left. */
# if HAVE_MBRTOWC
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
arg_end = arg;
characters = 0;
@@ -3018,7 +3035,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
characters. */
# if HAVE_MBRTOWC
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
arg_end = arg;
characters = 0;
@@ -3062,7 +3079,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
size_t remaining;
# if HAVE_MBRTOWC
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
ENSURE_ALLOCATION (xsum (length, characters));
for (remaining = characters; remaining > 0; remaining--)
@@ -3088,7 +3105,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
{
# if HAVE_MBRTOWC
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
while (arg < arg_end)
{
@@ -3140,7 +3157,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
at most PRECISION bytes, from the left. */
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
arg_end = arg;
characters = 0;
@@ -3173,7 +3190,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
bytes. */
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
arg_end = arg;
characters = 0;
@@ -3213,7 +3230,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
size_t remaining;
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
for (remaining = characters; remaining > 0; )
{
@@ -3282,7 +3299,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
size_t remaining;
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
ENSURE_ALLOCATION (xsum (length, characters));
for (remaining = characters; remaining > 0; )
@@ -3308,7 +3325,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
{
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
while (arg < arg_end)
{
@@ -3413,7 +3430,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
int count;
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
count = local_wcrtomb (cbuf, arg, &state);
@@ -3439,7 +3456,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
int count;
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
count = local_wcrtomb (cbuf, arg, &state);
@@ -3495,7 +3512,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
int count;
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
count = local_wcrtomb (result + length, arg, &state);
@@ -3513,7 +3530,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
int count;
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
# endif
count = local_wcrtomb (cbuf, arg, &state);
@@ -3587,7 +3604,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
mbstate_t state;
wchar_t wc;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
int count = mbrtowc (&wc, &arg, 1, &state);
if (count < 0)
/* Invalid or incomplete multibyte character. */
@@ -3928,14 +3945,14 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
length += count;
}
#endif
-#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE
+#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE
|| (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
else if ((dp->conversion == 'a' || dp->conversion == 'A')
# if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE &&
NEED_PRINTF_DOUBLE))
&& (0
# if NEED_PRINTF_DOUBLE
|| a.arg[dp->arg_index].type == TYPE_DOUBLE
# endif
-# if NEED_PRINTF_LONG_DOUBLE
+# if NEED_PRINTF_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA &&
WIDE_CHAR_VERSION)
|| a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
# endif
)
@@ -4055,7 +4072,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
p = tmp;
if (type == TYPE_LONGDOUBLE)
{
-# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE
+# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE ||
(NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
long double arg = a.arg[dp->arg_index].a.a_longdouble;
if (isnanl (arg))
@@ -5611,7 +5628,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 ||
USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
size_t width;
#endif
-#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) ||
!HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) ||
!HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (WIDE_CHAR_VERSION &&
MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST
|| NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
int has_precision;
size_t precision;
#endif
@@ -5668,13 +5685,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
width = xsum (xtimes (width, 10), *digitp++ - '0');
while (digitp != dp->width_end);
}
-#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+# if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
has_width = 1;
-#endif
+# endif
}
#endif
-#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) ||
!HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) ||
!HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (WIDE_CHAR_VERSION &&
MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST
|| NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
has_precision = 0;
precision = 6;
if (dp->precision_start != dp->precision_end)
@@ -6585,7 +6602,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
wide character array. */
mbstate_t state;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
tmpdst_len = 0;
{
const TCHAR_T *src = tmpsrc;
@@ -6609,7 +6626,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
if (tmpdst == NULL)
goto out_of_memory;
- memset (&state, '\0', sizeof (mbstate_t));
+ mbszero (&state);
{
DCHAR_T *destptr = tmpdst;
const TCHAR_T *src = tmpsrc;
@@ -6793,7 +6810,22 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
for (; pad > 0; pad--)
*p++ = ' ';
}
- else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
+ else if ((flags & FLAG_ZERO) && pad_ptr != NULL
+ /* ISO C says: "For d, i, o, u, x, and X
+ conversions, if a precision is
+ specified, the 0 flag is ignored. */
+ && !(has_precision
+ && (dp->conversion == 'd'
+ || dp->conversion == 'i'
+ || dp->conversion == 'o'
+ || dp->conversion == 'u'
+ || dp->conversion == 'x'
+ || dp->conversion == 'X'
+ /* Although ISO C does not
+ require it, treat 'b' and
'B'
+ like 'x' and 'X'. */
+ || dp->conversion == 'b'
+ || dp->conversion == 'B')))
{
/* Pad with zeroes. */
DCHAR_T *q = end;
diff --git a/tp/Texinfo/XS/gnulib/lib/vasnprintf.h
b/tp/Texinfo/XS/gnulib/lib/vasnprintf.h
index f69649fb45..2d13407079 100644
--- a/tp/Texinfo/XS/gnulib/lib/vasnprintf.h
+++ b/tp/Texinfo/XS/gnulib/lib/vasnprintf.h
@@ -17,6 +17,11 @@
#ifndef _VASNPRINTF_H
#define _VASNPRINTF_H
+/* This file uses _GL_ATTRIBUTE_FORMAT. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Get va_list. */
#include <stdarg.h>
diff --git a/tp/Texinfo/XS/gnulib/lib/verify.h
b/tp/Texinfo/XS/gnulib/lib/verify.h
index c700243209..e4af91517e 100644
--- a/tp/Texinfo/XS/gnulib/lib/verify.h
+++ b/tp/Texinfo/XS/gnulib/lib/verify.h
@@ -241,10 +241,16 @@ template <int w>
# define _Static_assert(...) \
_GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
# else
- /* Work around MSVC preprocessor incompatibility with ISO C; see
- <https://stackoverflow.com/questions/5134523/>. */
-# define _Static_assert(R, ...) \
- _GL_VERIFY ((R), "static assertion failed", -)
+# if defined __cplusplus && _MSC_VER >= 1910
+ /* In MSVC 14.1 or newer, static_assert accepts one or two arguments,
+ but _Static_assert is not defined. */
+# define _Static_assert static_assert
+# else
+ /* Work around MSVC preprocessor incompatibility with ISO C; see
+ <https://stackoverflow.com/questions/5134523/>. */
+# define _Static_assert(R, ...) \
+ _GL_VERIFY ((R), "static assertion failed", -)
+# endif
# endif
# endif
/* Define static_assert if needed. */
@@ -252,7 +258,7 @@ template <int w>
&& __STDC_VERSION__ < 202311 \
&& (!defined __cplusplus \
|| (__cpp_static_assert < 201411 \
- && __GNUG__ < 6 && __clang_major__ < 6)))
+ && __GNUG__ < 6 && __clang_major__ < 6 && _MSC_VER < 1910)))
# if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__
/* MSVC 14 in C++ mode supports the two-arguments static_assert but not
the one-argument static_assert, and it does not support _Static_assert.
diff --git a/tp/Texinfo/XS/gnulib/lib/wchar.in.h
b/tp/Texinfo/XS/gnulib/lib/wchar.in.h
index 194a1c6723..510f202537 100644
--- a/tp/Texinfo/XS/gnulib/lib/wchar.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/wchar.in.h
@@ -84,6 +84,12 @@
#ifndef _@GUARD_PREFIX@_WCHAR_H
#define _@GUARD_PREFIX@_WCHAR_H
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+ _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
that can be freed by passing them as the Ith argument to the
function F. */
@@ -226,6 +232,13 @@ _GL_EXTERN_C void free (void *);
# endif
#endif
+
+#if @GNULIB_MBSZERO@
+/* Get memset(). */
+# include <string.h>
+#endif
+
+
/* Convert a single-byte character to a wide character. */
#if @GNULIB_BTOWC@
# if @REPLACE_BTOWC@
@@ -282,7 +295,7 @@ _GL_WARN_ON_USE (wctob, "wctob is unportable - "
#endif
-/* Test whether *PS is in the initial state. */
+/* Test whether *PS is in an initial state. */
#if @GNULIB_MBSINIT@
# if @REPLACE_MBSINIT@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -309,6 +322,208 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
#endif
+/* Put *PS into an initial state. */
+#if @GNULIB_MBSZERO@
+/* ISO C 23 § 7.31.6.(3) says that zeroing an mbstate_t is a way to put the
+ mbstate_t into an initial state. However, on many platforms an mbstate_t
+ is large, and it is possible - as an optimization - to get away with zeroing
+ only part of it. So, instead of
+
+ mbstate_t state = { 0 };
+
+ or
+
+ mbstate_t state;
+ memset (&state, 0, sizeof (mbstate_t));
+
+ we can write this faster code:
+
+ mbstate_t state;
+ mbszero (&state);
+ */
+/* _GL_MBSTATE_INIT_SIZE describes how mbsinit() behaves: It is the number of
+ bytes at the beginning of an mbstate_t that need to be zero, for mbsinit()
+ to return true.
+ _GL_MBSTATE_ZERO_SIZE is the number of bytes at the beginning of an
mbstate_t
+ that need to be zero,
+ - for mbsinit() to return true, and
+ - for all other multibyte-aware functions to operate properly.
+ 0 < _GL_MBSTATE_INIT_SIZE <= _GL_MBSTATE_ZERO_SIZE <= sizeof (mbstate_t).
+ These values are determined by source code inspection, where possible, and
+ by running the gnulib unit tests.
+ We need _GL_MBSTATE_INIT_SIZE because if we define _GL_MBSTATE_ZERO_SIZE
+ without considering what mbsinit() does, we get test failures such as
+ assertion "mbsinit (&iter->state)" failed
+ */
+# if GNULIB_defined_mbstate_t /* AIX, IRIX */
+/* mbstate_t has at least 4 bytes. They are used as coded in
+ gnulib/lib/mbrtowc.c. */
+# define _GL_MBSTATE_INIT_SIZE 1
+/* define _GL_MBSTATE_ZERO_SIZE 4
+ does not work: it causes test failures.
+ So, use the safe fallback value, below. */
+# elif __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 /* glibc */
+/* mbstate_t is defined in <bits/types/__mbstate_t.h>.
+ For more details, see glibc/iconv/skeleton.c. */
+# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (((mbstate_t) {0}).__count) */
+# define _GL_MBSTATE_ZERO_SIZE /* 8 */ sizeof (mbstate_t)
+# elif defined MUSL_LIBC /* musl libc */
+/* mbstate_t is defined in <bits/alltypes.h>.
+ It is an opaque aligned 8-byte struct, of which at most the first
+ 4 bytes are used.
+ For more details, see src/multibyte/mbrtowc.c. */
+# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (unsigned) */
+# define _GL_MBSTATE_ZERO_SIZE 4
+# elif defined __APPLE__ && defined __MACH__ /* macOS */
+/* On macOS, mbstate_t is defined in <machine/_types.h>.
+ It is an opaque aligned 128-byte struct, of which at most the first
+ 12 bytes are used.
+ For more details, see the __mbsinit implementations in
+ Libc-<version>/locale/FreeBSD/
+ {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8,utf2}.c. */
+/* File INIT_SIZE ZERO_SIZE
+ ascii.c 0 0
+ none.c 0 0
+ euc.c 12 12
+ mskanji.c 4 4
+ big5.c 4 4
+ gb2312.c 4 6
+ gbk.c 4 4
+ gb18030.c 4 8
+ utf8.c 8 10
+ utf2.c 8 12 */
+# define _GL_MBSTATE_INIT_SIZE 12
+# define _GL_MBSTATE_ZERO_SIZE 12
+# elif defined __FreeBSD__ /* FreeBSD */
+/* On FreeBSD, mbstate_t is defined in src/sys/sys/_types.h.
+ It is an opaque aligned 128-byte struct, of which at most the first
+ 12 bytes are used.
+ For more details, see the __mbsinit implementations in
+ src/lib/libc/locale/
+ {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */
+/* File INIT_SIZE ZERO_SIZE
+ ascii.c 0 0
+ none.c 0 0
+ euc.c 12 12
+ mskanji.c 4 4
+ big5.c 4 4
+ gb2312.c 4 6
+ gbk.c 4 4
+ gb18030.c 4 8
+ utf8.c 8 12 */
+# define _GL_MBSTATE_INIT_SIZE 12
+# define _GL_MBSTATE_ZERO_SIZE 12
+# elif defined __NetBSD__ /* NetBSD */
+/* On NetBSD, mbstate_t is defined in src/sys/sys/ansi.h.
+ It is an opaque aligned 128-byte struct, of which at most the first
+ 28 bytes are used.
+ For more details, see the *State types in
+ src/lib/libc/citrus/modules/citrus_*.c
+ (ignoring citrus_{hz,iso2022,utf7,viqr,zw}.c, since these implement
+ stateful encodings, not usable as locale encodings). */
+/* File ZERO_SIZE
+ citrus/citrus_none.c 0
+ citrus/modules/citrus_euc.c 8
+ citrus/modules/citrus_euctw.c 8
+ citrus/modules/citrus_mskanji.c 8
+ citrus/modules/citrus_big5.c 8
+ citrus/modules/citrus_gbk2k.c 8
+ citrus/modules/citrus_dechanyu.c 8
+ citrus/modules/citrus_johab.c 6
+ citrus/modules/citrus_utf8.c 12 */
+/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test
+ failures for values < 28. */
+# define _GL_MBSTATE_ZERO_SIZE 28
+# elif defined __OpenBSD__ /* OpenBSD */
+/* On OpenBSD, mbstate_t is defined in src/sys/sys/_types.h.
+ It is an opaque aligned 128-byte struct, of which at most the first
+ 12 bytes are used.
+ For more details, see src/lib/libc/citrus/citrus_*.c. */
+/* File INIT_SIZE ZERO_SIZE
+ citrus_none.c 0 0
+ citrus_utf8.c 12 12 */
+# define _GL_MBSTATE_INIT_SIZE 12
+# define _GL_MBSTATE_ZERO_SIZE 12
+# elif defined __minix /* Minix */
+/* On Minix, mbstate_t is defined in sys/sys/ansi.h.
+ It is an opaque aligned 128-byte struct.
+ For more details, see the *State types in
+ lib/libc/citrus/citrus_*.c. */
+/* File INIT_SIZE ZERO_SIZE
+ citrus_none.c 0 0 */
+/* But 1 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test
+ failures for values < 4. */
+# define _GL_MBSTATE_ZERO_SIZE 4
+# elif defined __sun /* Solaris */
+/* On Solaris, mbstate_t is defined in <wchar_impl.h>.
+ It is an opaque aligned 24-byte or 32-byte struct, of which at most the
first
+ 20 or 28 bytes are used.
+ For more details on OpenSolaris derivatives, see the *State types in
+ illumos-gate/usr/src/lib/libc/port/locale/
+ {none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */
+/* File INIT_SIZE ZERO_SIZE
+ none.c 0 0
+ euc.c 12 12
+ mskanji.c 4 4
+ big5.c 4 4
+ gb2312.c 4 6
+ gbk.c 4 4
+ gb18030.c 4 8
+ utf8.c 12 12 */
+/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test
+ failures
+ - in OpenIndiana and OmniOS: for values < 16,
+ - in Solaris 10 and 11: for values < 20 (in 32-bit mode)
+ or < 28 (in 64-bit mode).
+ Since we don't have a good way to distinguish the OpenSolaris derivatives
+ from the proprietary Solaris versions, and can't inspect the Solaris source
+ code, use the safe fallback values, below. */
+# elif defined __CYGWIN__ /* Cygwin */
+/* On Cygwin, mbstate_t is defined in <sys/_types.h>.
+ For more details, see newlib/libc/stdlib/mbtowc_r.c and
+ winsup/cygwin/strfuncs.cc. */
+# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (int) */
+# define _GL_MBSTATE_ZERO_SIZE 8
+# elif defined _WIN32 && !defined __CYGWIN__ /* Native Windows.
*/
+/* MSVC defines 'mbstate_t' as an aligned 8-byte struct.
+ On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined
+ as an aligned 8-byte struct, of which the first 4 bytes matter.
+ Use the safe values, below. */
+# elif defined __ANDROID__ /* Android */
+/* Android defines 'mbstate_t' in <bits/mbstate_t.h>.
+ It is an opaque 4-byte or 8-byte struct.
+ For more details, see
+ bionic/libc/private/bionic_mbstate.h
+ bionic/libc/bionic/mbrtoc32.cpp
+ bionic/libc/bionic/mbrtoc16.cpp
+ */
+# define _GL_MBSTATE_INIT_SIZE 4
+# define _GL_MBSTATE_ZERO_SIZE 4
+# endif
+/* Use safe values as defaults. */
+# ifndef _GL_MBSTATE_INIT_SIZE
+# define _GL_MBSTATE_INIT_SIZE sizeof (mbstate_t)
+# endif
+# ifndef _GL_MBSTATE_ZERO_SIZE
+# define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t)
+# endif
+_GL_BEGIN_C_LINKAGE
+# if defined IN_MBSZERO
+_GL_EXTERN_INLINE
+# else
+_GL_INLINE
+# endif
+_GL_ARG_NONNULL ((1)) void
+mbszero (mbstate_t *ps)
+{
+ memset (ps, 0, _GL_MBSTATE_ZERO_SIZE);
+}
+_GL_END_C_LINKAGE
+_GL_CXXALIAS_SYS (mbszero, void, (mbstate_t *ps));
+_GL_CXXALIASWARN (mbszero);
+#endif
+
+
/* Convert a multibyte character to a wide character. */
#if @GNULIB_MBRTOWC@
# if @REPLACE_MBRTOWC@
@@ -635,13 +850,25 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
/* Compare N wide characters of S1 and S2. */
#if @GNULIB_WMEMCMP@
-# if !@HAVE_WMEMCMP@
+# if @REPLACE_WMEMCMP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wmemcmp
+# define wmemcmp rpl_wmemcmp
+# endif
+_GL_FUNCDECL_RPL (wmemcmp, int,
+ (const wchar_t *s1, const wchar_t *s2, size_t n)
+ _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wmemcmp, int,
+ (const wchar_t *s1, const wchar_t *s2, size_t n));
+# else
+# if !@HAVE_WMEMCMP@
_GL_FUNCDECL_SYS (wmemcmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n)
_GL_ATTRIBUTE_PURE);
-# endif
+# endif
_GL_CXXALIAS_SYS (wmemcmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wmemcmp);
# endif
@@ -920,11 +1147,21 @@ _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - "
/* Compare S1 and S2. */
#if @GNULIB_WCSCMP@
-# if !@HAVE_WCSCMP@
+# if @REPLACE_WCSCMP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wcscmp
+# define wcscmp rpl_wcscmp
+# endif
+_GL_FUNCDECL_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
+ _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+# else
+# if !@HAVE_WCSCMP@
_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
_GL_ATTRIBUTE_PURE);
-# endif
+# endif
_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcscmp);
# endif
@@ -939,13 +1176,25 @@ _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - "
/* Compare no more than N wide characters of S1 and S2. */
#if @GNULIB_WCSNCMP@
-# if !@HAVE_WCSNCMP@
+# if @REPLACE_WCSNCMP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wcsncmp
+# define wcsncmp rpl_wcsncmp
+# endif
+_GL_FUNCDECL_RPL (wcsncmp, int,
+ (const wchar_t *s1, const wchar_t *s2, size_t n)
+ _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wcsncmp, int,
+ (const wchar_t *s1, const wchar_t *s2, size_t n));
+# else
+# if !@HAVE_WCSNCMP@
_GL_FUNCDECL_SYS (wcsncmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n)
_GL_ATTRIBUTE_PURE);
-# endif
+# endif
_GL_CXXALIAS_SYS (wcsncmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcsncmp);
# endif
@@ -1159,7 +1408,7 @@ _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - "
#endif
-/* Return the length of the initial segmet of WCS which consists entirely
+/* Return the length of the initial segment of WCS which consists entirely
of wide characters not in REJECT. */
#if @GNULIB_WCSCSPN@
# if !@HAVE_WCSCSPN@
@@ -1179,7 +1428,7 @@ _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - "
#endif
-/* Return the length of the initial segmet of WCS which consists entirely
+/* Return the length of the initial segment of WCS which consists entirely
of wide characters in ACCEPT. */
#if @GNULIB_WCSSPN@
# if !@HAVE_WCSSPN@
diff --git a/tp/Texinfo/XS/gnulib/lib/wctype.in.h
b/tp/Texinfo/XS/gnulib/lib/wctype.in.h
index f6e474d38d..fd52715a8a 100644
--- a/tp/Texinfo/XS/gnulib/lib/wctype.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/wctype.in.h
@@ -44,6 +44,12 @@
#ifndef _@GUARD_PREFIX@_WCTYPE_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK,
+ HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#if @HAVE_WINT_T@
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
# include <wchar.h>
@@ -68,9 +74,6 @@
#ifndef _@GUARD_PREFIX@_WCTYPE_H
#define _@GUARD_PREFIX@_WCTYPE_H
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_WCTYPE_INLINE
# define _GL_WCTYPE_INLINE _GL_INLINE
@@ -78,6 +81,8 @@ _GL_INLINE_HEADER_BEGIN
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Solaris 2.6 <wctype.h> includes <widec.h> which includes <euc.h> which
@@ -127,7 +132,8 @@ typedef unsigned int rpl_wint_t;
/* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
Linux libc5 has <wctype.h> and the functions but they are broken.
mingw and MSVC have <wctype.h> and the functions but they take a wchar_t
- as argument, not an rpl_wint_t.
+ as argument, not an rpl_wint_t. Additionally, the mingw iswprint function
+ is broken.
Assume all 11 functions (all isw* except iswblank) are implemented the
same way, or not at all. */
# if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@
@@ -179,7 +185,11 @@ rpl_iswlower (wint_t wc)
_GL_WCTYPE_INLINE int
rpl_iswprint (wint_t wc)
{
+# ifdef __MINGW32__
+ return ((wchar_t) wc == wc ? wc == ' ' || iswgraph ((wchar_t) wc) : 0);
+# else
return ((wchar_t) wc == wc ? iswprint ((wchar_t) wc) : 0);
+# endif
}
_GL_WCTYPE_INLINE int
@@ -623,14 +633,32 @@ _GL_CXXALIASWARN (iswblank);
typedef void * wctype_t;
# define GNULIB_defined_wctype_t 1
# endif
+#elif @REPLACE_WCTYPE@
+# if !GNULIB_defined_wctype_t
+typedef void *rpl_wctype_t;
+# undef wctype_t
+# define wctype_t rpl_wctype_t
+# define GNULIB_defined_wctype_t 1
+# endif
#endif
/* Get a descriptor for a wide character property. */
#if @GNULIB_WCTYPE@
-# if !@HAVE_WCTYPE_T@
-_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name));
-# endif
+# if @REPLACE_WCTYPE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wctype
+# define wctype rpl_wctype
+# endif
+_GL_FUNCDECL_RPL (wctype, wctype_t, (const char *name)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (wctype, wctype_t, (const char *name));
+# else
+# if !@HAVE_WCTYPE_T@
+_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)
+ _GL_ARG_NONNULL ((1)));
+# endif
_GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name));
+# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wctype);
# endif
@@ -646,7 +674,7 @@ _GL_WARN_ON_USE (wctype, "wctype is unportable - "
The argument WC must be either a wchar_t value or WEOF.
The argument DESC must have been returned by the wctype() function. */
#if @GNULIB_ISWCTYPE@
-# if @GNULIBHEADERS_OVERRIDE_WINT_T@
+# if @GNULIBHEADERS_OVERRIDE_WINT_T@ || @REPLACE_WCTYPE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef iswctype
# define iswctype rpl_iswctype
@@ -687,14 +715,32 @@ _GL_CXXALIASWARN (towupper);
typedef void * wctrans_t;
# define GNULIB_defined_wctrans_t 1
# endif
+#elif @REPLACE_WCTRANS@
+# if !GNULIB_defined_wctrans_t
+typedef void *rpl_wctrans_t;
+# undef wctrans_t
+# define wctrans_t rpl_wctrans_t
+# define GNULIB_defined_wctrans_t 1
+# endif
#endif
/* Get a descriptor for a wide character case conversion. */
#if @GNULIB_WCTRANS@
-# if !@HAVE_WCTRANS_T@
-_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name));
-# endif
+# if @REPLACE_WCTRANS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wctrans
+# define wctrans rpl_wctrans
+# endif
+_GL_FUNCDECL_RPL (wctrans, wctrans_t, (const char *name)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (wctrans, wctrans_t, (const char *name));
+# else
+# if !@HAVE_WCTRANS_T@
+_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)
+ _GL_ARG_NONNULL ((1)));
+# endif
_GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name));
+# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wctrans);
# endif
@@ -710,10 +756,19 @@ _GL_WARN_ON_USE (wctrans, "wctrans is unportable - "
The argument WC must be either a wchar_t value or WEOF.
The argument DESC must have been returned by the wctrans() function. */
#if @GNULIB_TOWCTRANS@
-# if !@HAVE_WCTRANS_T@
+# if @REPLACE_WCTRANS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef towctrans
+# define towctrans rpl_towctrans
+# endif
+_GL_FUNCDECL_RPL (towctrans, wint_t, (wint_t wc, wctrans_t desc));
+_GL_CXXALIAS_RPL (towctrans, wint_t, (wint_t wc, wctrans_t desc));
+# else
+# if !@HAVE_WCTRANS_T@
_GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
-# endif
+# endif
_GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
+# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (towctrans);
# endif
diff --git a/tp/Texinfo/XS/gnulib/lib/xsize.h b/tp/Texinfo/XS/gnulib/lib/xsize.h
index 1ec78e776f..5b08d61f2f 100644
--- a/tp/Texinfo/XS/gnulib/lib/xsize.h
+++ b/tp/Texinfo/XS/gnulib/lib/xsize.h
@@ -18,6 +18,11 @@
#ifndef _XSIZE_H
#define _XSIZE_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, HAVE_STDINT_H. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Get size_t. */
#include <stddef.h>
@@ -30,9 +35,6 @@
/* Get ATTRIBUTE_PURE. */
#include "attribute.h"
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef XSIZE_INLINE
# define XSIZE_INLINE _GL_INLINE
diff --git a/tp/Texinfo/XS/gnulib/m4/exponentd.m4
b/tp/Texinfo/XS/gnulib/m4/exponentd.m4
index 2ef46437de..163114b89e 100644
--- a/tp/Texinfo/XS/gnulib/m4/exponentd.m4
+++ b/tp/Texinfo/XS/gnulib/m4/exponentd.m4
@@ -1,9 +1,9 @@
-# exponentd.m4 serial 3
+# exponentd.m4 serial 4
dnl Copyright (C) 2007-2008, 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-AC_DEFUN([gl_DOUBLE_EXPONENT_LOCATION],
+AC_DEFUN_ONCE([gl_DOUBLE_EXPONENT_LOCATION],
[
AC_CACHE_CHECK([where to find the exponent in a 'double'],
[gl_cv_cc_double_expbit0],
diff --git a/tp/Texinfo/XS/gnulib/m4/extern-inline.m4
b/tp/Texinfo/XS/gnulib/m4/extern-inline.m4
index c001b1cff7..f9894d7fe5 100644
--- a/tp/Texinfo/XS/gnulib/m4/extern-inline.m4
+++ b/tp/Texinfo/XS/gnulib/m4/extern-inline.m4
@@ -79,7 +79,8 @@ AC_DEFUN([gl_EXTERN_INLINE],
# define _GL_EXTERN_INLINE_STDHEADER_BUG
#endif
#if ((__GNUC__ \
- ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ ? (defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ && !defined __PCC__) \
: (199901L <= __STDC_VERSION__ \
&& !defined __HP_cc \
&& !defined __PGI \
@@ -89,6 +90,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
# define _GL_EXTERN_INLINE extern inline
# define _GL_EXTERN_INLINE_IN_USE
#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+ && !defined __PCC__ \
&& !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
diff --git a/tp/Texinfo/XS/gnulib/m4/gnulib-common.m4
b/tp/Texinfo/XS/gnulib/m4/gnulib-common.m4
index c84a2afd9c..2426eb6398 100644
--- a/tp/Texinfo/XS/gnulib/m4/gnulib-common.m4
+++ b/tp/Texinfo/XS/gnulib/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 82
+# gnulib-common.m4 serial 87
dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -15,6 +15,10 @@ AC_DEFUN([gl_COMMON], [
AC_REQUIRE([gl_ZZGNULIB])
])
AC_DEFUN([gl_COMMON_BODY], [
+ AH_VERBATIM([0witness],
+[/* Witness that <config.h> has been included. */
+#define _GL_CONFIG_H_INCLUDED 1
+])
AH_VERBATIM([_GL_GNUC_PREREQ],
[/* True if the compiler says it groks GNU C version MAJOR.MINOR. */
#if defined __GNUC__ && defined __GNUC_MINOR__
@@ -116,6 +120,20 @@ AC_DEFUN([gl_COMMON_BODY], [
# pragma GCC diagnostic ignored "-Wpedantic"
#endif
+/* Define if, in a function declaration, the attributes in bracket syntax
+ [[...]] must come before the attributes in __attribute__((...)) syntax.
+ If this is defined, it is best to avoid the bracket syntax, so that the
+ various _GL_ATTRIBUTE_* can be cumulated on the same declaration in any
+ order. */
+#ifdef __cplusplus
+# if defined __clang__
+# define _GL_BRACKET_BEFORE_ATTRIBUTE 1
+# endif
+#else
+# if defined __GNUC__ && !defined __clang__
+# define _GL_BRACKET_BEFORE_ATTRIBUTE 1
+# endif
+#endif
]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's alignas instead.
[
/* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the
function
@@ -223,9 +241,11 @@ AC_DEFUN([gl_COMMON_BODY], [
- typedef,
in C++ also: namespace, class, template specialization. */
#ifndef _GL_ATTRIBUTE_DEPRECATED
-# ifdef __has_c_attribute
-# if __has_c_attribute (__deprecated__)
-# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# ifdef __has_c_attribute
+# if __has_c_attribute (__deprecated__)
+# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
+# endif
# endif
# endif
# if !defined _GL_ATTRIBUTE_DEPRECATED && _GL_HAS_ATTRIBUTE (deprecated)
@@ -355,13 +375,15 @@ AC_DEFUN([gl_COMMON_BODY], [
__has_c_attribute (__maybe_unused__) yields true but the use of
[[__maybe_unused__]] nevertheless produces a warning. */
#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
-# if defined __clang__ && defined __cplusplus
-# if !defined __apple_build_version__ && __clang_major__ >= 10
-# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
-# endif
-# elif defined __has_c_attribute
-# if __has_c_attribute (__maybe_unused__)
-# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# if defined __clang__ && defined __cplusplus
+# if !defined __apple_build_version__ && __clang_major__ >= 10
+# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+# endif
+# elif defined __has_c_attribute
+# if __has_c_attribute (__maybe_unused__)
+# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+# endif
# endif
# endif
# ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
@@ -379,18 +401,20 @@ AC_DEFUN([gl_COMMON_BODY], [
the return value, unless the caller uses something like ignore_value. */
/* Applies to: function, enumeration, class. */
#ifndef _GL_ATTRIBUTE_NODISCARD
-# if defined __clang__ && defined __cplusplus
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# if defined __clang__ && defined __cplusplus
/* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]]
produces
a warning.
The 1000 below means a yet unknown threshold. When clang++ version X
starts supporting [[__nodiscard__]] without warning about it, you can
replace the 1000 with X. */
-# if __clang_major__ >= 1000
-# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
-# endif
-# elif defined __has_c_attribute
-# if __has_c_attribute (__nodiscard__)
-# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+# if __clang_major__ >= 1000
+# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+# endif
+# elif defined __has_c_attribute
+# if __has_c_attribute (__nodiscard__)
+# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+# endif
# endif
# endif
# if !defined _GL_ATTRIBUTE_NODISCARD && _GL_HAS_ATTRIBUTE (warn_unused_result)
@@ -527,6 +551,18 @@ AC_DEFUN([gl_COMMON_BODY], [
# define _GL_UNUSED_LABEL
# endif
#endif
+])
+ AH_VERBATIM([c_linkage],
+[/* In C++, there is the concept of "language linkage", that encompasses
+ name mangling and function calling conventions.
+ The following macros start and end a block of "C" linkage. */
+#ifdef __cplusplus
+# define _GL_BEGIN_C_LINKAGE extern "C" {
+# define _GL_END_C_LINKAGE }
+#else
+# define _GL_BEGIN_C_LINKAGE
+# define _GL_END_C_LINKAGE
+#endif
])
AH_VERBATIM([async_safe],
[/* The _GL_ASYNC_SAFE marker should be attached to functions that are
@@ -583,7 +619,7 @@ AC_DEFUN([gl_COMMON_BODY], [
dnl gl_cross_guess_normal (to be used when 'yes' is good and 'no' is bad),
dnl gl_cross_guess_inverted (to be used when 'no' is good and 'yes' is bad).
AC_ARG_ENABLE([cross-guesses],
- [AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
+ [AS_HELP_STRING([[--enable-cross-guesses={conservative|risky}]],
[specify policy for cross-compilation guesses])],
[if test "x$enableval" != xconservative && test "x$enableval" != xrisky;
then
AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
diff --git a/tp/Texinfo/XS/gnulib/m4/gnulib-comp.m4
b/tp/Texinfo/XS/gnulib/m4/gnulib-comp.m4
index 691db073df..7c8183f948 100644
--- a/tp/Texinfo/XS/gnulib/m4/gnulib-comp.m4
+++ b/tp/Texinfo/XS/gnulib/m4/gnulib-comp.m4
@@ -74,6 +74,7 @@ AC_DEFUN([gl_EARLY],
# Code from module limits-h:
# Code from module localcharset:
# Code from module malloca:
+ # Code from module mbszero:
# Code from module memchr:
# Code from module multiarch:
# Code from module obstack:
@@ -90,6 +91,7 @@ AC_DEFUN([gl_EARLY],
# Code from module stddef:
# Code from module stdint:
# Code from module stdio:
+ gl_STDIO_H_EARLY
# Code from module stdlib:
# Code from module strchrnul:
# Code from module streq:
@@ -205,6 +207,10 @@ AC_DEFUN([gl_INIT],
LOCALCHARSET_TESTS_ENVIRONMENT=
AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
gl_MALLOCA
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+ gl_MUSL_LIBC
+ gl_WCHAR_MODULE_INDICATOR([mbszero])
gl_FUNC_MEMCHR
gl_CONDITIONAL([GL_COND_OBJ_MEMCHR], [test $REPLACE_MEMCHR = 1])
AM_COND_IF([GL_COND_OBJ_MEMCHR], [
@@ -306,13 +312,13 @@ AC_DEFUN([gl_INIT],
gl_UNISTD_H
gl_UNISTD_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
- gl_LIBUNISTRING_LIBHEADER([0.9.11], [unistr.h])
+ gl_LIBUNISTRING_LIBHEADER([1.2], [unistr.h])
AC_PROG_MKDIR_P
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-check])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-mblen])
- gl_LIBUNISTRING_MODULE([0.9.4], [unistr/u8-mbsnlen])
+ gl_LIBUNISTRING_MODULE([1.2], [unistr/u8-mbsnlen])
gl_MODULE_INDICATOR([unistr/u8-mbtouc])
- gl_LIBUNISTRING_MODULE([0.9.4], [unistr/u8-mbtouc])
+ gl_LIBUNISTRING_MODULE([1.2], [unistr/u8-mbtouc])
gl_MODULE_INDICATOR([unistr/u8-mbtouc-unsafe])
gl_LIBUNISTRING_MODULE([0.9.4], [unistr/u8-mbtouc-unsafe])
gl_MODULE_INDICATOR([unistr/u8-mbtoucr])
@@ -577,6 +583,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/localcharset.h
lib/malloca.c
lib/malloca.h
+ lib/mbszero.c
lib/memchr.c
lib/memchr.valgrind
lib/obstack.c
@@ -675,8 +682,13 @@ AC_DEFUN([gl_FILE_LIST], [
m4/libunistring-base.m4
m4/limits-h.m4
m4/localcharset.m4
+ m4/locale-fr.m4
+ m4/locale-ja.m4
+ m4/locale-zh.m4
m4/malloca.m4
m4/math_h.m4
+ m4/mbrtowc.m4
+ m4/mbstate_t.m4
m4/memchr.m4
m4/mmap-anon.m4
m4/multiarch.m4
diff --git a/tp/Texinfo/XS/gnulib/m4/lib-ld.m4
b/tp/Texinfo/XS/gnulib/m4/lib-ld.m4
index 6bc1886f53..acc6127435 100644
--- a/tp/Texinfo/XS/gnulib/m4/lib-ld.m4
+++ b/tp/Texinfo/XS/gnulib/m4/lib-ld.m4
@@ -1,4 +1,4 @@
-# lib-ld.m4 serial 10
+# lib-ld.m4 serial 11
dnl Copyright (C) 1996-2003, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -29,7 +29,7 @@ AC_DEFUN([AC_LIB_PROG_LD],
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_ARG_WITH([gnu-ld],
- [AS_HELP_STRING([--with-gnu-ld],
+ [AS_HELP_STRING([[--with-gnu-ld]],
[assume the C compiler uses GNU ld [default=no]])],
[test "$withval" = no || with_gnu_ld=yes],
[with_gnu_ld=no])dnl
diff --git a/tp/Texinfo/XS/gnulib/m4/lib-link.m4
b/tp/Texinfo/XS/gnulib/m4/lib-link.m4
index 653e34f8d1..5f8afae61a 100644
--- a/tp/Texinfo/XS/gnulib/m4/lib-link.m4
+++ b/tp/Texinfo/XS/gnulib/m4/lib-link.m4
@@ -224,7 +224,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
additional_libdir3=
fi
dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
+ dnl $LDFLAGS. Use breadth-first search.
LIB[]NAME=
LTLIB[]NAME=
INC[]NAME=
diff --git a/tp/Texinfo/XS/gnulib/m4/libunistring-base.m4
b/tp/Texinfo/XS/gnulib/m4/libunistring-base.m4
index fc6d02399c..6dd184a789 100644
--- a/tp/Texinfo/XS/gnulib/m4/libunistring-base.m4
+++ b/tp/Texinfo/XS/gnulib/m4/libunistring-base.m4
@@ -1,4 +1,4 @@
-# libunistring-base.m4 serial 7
+# libunistring-base.m4 serial 8
dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -18,6 +18,8 @@ dnl You have to bump the VERSION argument to the next
projected version
dnl number each time you make a change that affects the behaviour of the
dnl functions defined in Module (even if the sources of Module itself do not
dnl change).
+dnl
+dnl This macro invocation must not occur in macros that are AC_REQUIREd.
AC_DEFUN([gl_LIBUNISTRING_MODULE],
[
@@ -28,6 +30,35 @@ AC_DEFUN([gl_LIBUNISTRING_MODULE],
[gl_LIBUNISTRING_VERSION_CMP([$1])])
])
+dnl gl_LIBUNISTRING_MODULE_WITH_VARIABLE([VERSION], [Module])
+dnl is like gl_LIBUNISTRING_MODULE([VERSION], [Module]), except that it also
+dnl defines an AC_SUBSTed autoconf variable GNULIB_$MODULE_DLL_VARIABLE.
+dnl What's the expansion of this autoconf variable?
+dnl - When building libunistring, it expands to LIBUNISTRING_DLL_VARIABLE.
+dnl (This is necessary because this token must be present in the .h files
+dnl when the .h files get installed.)
+dnl - When building gnulib or application code it expands to
+dnl - LIBUNISTRING_DLL_VARIABLE by default,
+dnl - empty if the automake conditional LIBUNISTRING_COMPILE_$MODULE
+dnl evaluates to true.
+dnl (This is necessary because when the conditional evaluates to false,
+dnl the application code expects to use the declared variable from the
+dnl installed libunistring; it's in this case that the
+dnl LIBUNISTRING_DLL_VARIABLE macro from the installed
+dnl <unistring/woe32dll.h> must be used.)
+dnl
+dnl This macro invocation must not occur in macros that are AC_REQUIREd.
+
+AC_DEFUN([gl_LIBUNISTRING_MODULE_WITH_VARIABLE],
+[
+ gl_LIBUNISTRING_MODULE([$1], [$2])
+ m4_ifndef([gl_IN_LIBUNISTRING],
+ [if test -z "${AS_TR_CPP([LIBUNISTRING_COMPILE_$2])_TRUE}"; then
+ GL_MODULE_INDICATOR_PREFIX[]_GNULIB_[]AS_TR_CPP([$2_DLL_VARIABLE])=
+ fi
+ ])
+])
+
dnl gl_LIBUNISTRING_LIBHEADER([VERSION], [HeaderFile])
dnl Declares that HeaderFile should be created, unless we are linking
dnl with libunistring and its version is >= the given VERSION.
@@ -95,6 +126,26 @@ changequote([,])
LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e
"$gl_libunistring_sed_extract_minor"`
LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e
"$gl_libunistring_sed_extract_subminor"`
fi
+
+ dnl Determine whether <unistring/woe32dll.h> from an installed libunistring
+ dnl is available.
+ m4_ifdef([gl_IN_LIBUNISTRING],
+ [dnl In libunistring, all .h files that declare variables need to
+ dnl #include <unistring/woe32dll.h>. This references the file
+ dnl unistring/woe32dll.h in libunistring.
+ HAVE_UNISTRING_WOE32DLL_H=1
+ ],
+ [dnl In gnulib or in applications, we need a #include
<unistring/woe32dll.h>
+ dnl if and only if an installed libunistring is available.
+ if test "$HAVE_LIBUNISTRING" = yes; then
+ AC_CHECK_HEADERS([unistring/woe32dll.h],
+ [HAVE_UNISTRING_WOE32DLL_H=1],
+ [HAVE_UNISTRING_WOE32DLL_H=0])
+ else
+ HAVE_UNISTRING_WOE32DLL_H=0
+ fi
+ ])
+ AC_SUBST([HAVE_UNISTRING_WOE32DLL_H])
])
dnl gl_LIBUNISTRING_VERSION_CMP([VERSION])
diff --git a/tp/Texinfo/XS/gnulib/m4/limits-h.m4
b/tp/Texinfo/XS/gnulib/m4/limits-h.m4
index 4f8ce41098..6a5983ebc2 100644
--- a/tp/Texinfo/XS/gnulib/m4/limits-h.m4
+++ b/tp/Texinfo/XS/gnulib/m4/limits-h.m4
@@ -24,14 +24,26 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
int ullw = ULLONG_WIDTH;
int bw = BOOL_WIDTH;
int bm = BOOL_MAX;
+ int mblm = MB_LEN_MAX;
]])],
[gl_cv_header_limits_width=yes],
[gl_cv_header_limits_width=no])])
- if test "$gl_cv_header_limits_width" = yes; then
- GL_GENERATE_LIMITS_H=false
- else
- GL_GENERATE_LIMITS_H=true
- fi
+ GL_GENERATE_LIMITS_H=true
+ AS_IF([test "$gl_cv_header_limits_width" = yes],
+ [AC_CACHE_CHECK([whether limits.h has SSIZE_MAX],
+ [gl_cv_header_limits_ssize_max],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#include <limits.h>
+ #ifndef SSIZE_MAX
+ #error "SSIZE_MAX is not defined"
+ #endif
+ ]])],
+ [gl_cv_header_limits_ssize_max=yes],
+ [gl_cv_header_limits_ssize_max=no])])
+ if test "$gl_cv_header_limits_ssize_max" = yes; then
+ GL_GENERATE_LIMITS_H=false
+ fi])
])
dnl Unconditionally enables the replacement of <limits.h>.
diff --git a/tp/Texinfo/XS/gnulib/m4/locale-fr.m4
b/tp/Texinfo/XS/gnulib/m4/locale-fr.m4
new file mode 100644
index 0000000000..40b13aeaa7
--- /dev/null
+++ b/tp/Texinfo/XS/gnulib/m4/locale-fr.m4
@@ -0,0 +1,300 @@
+# locale-fr.m4 serial 22
+dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of a french locale with traditional encoding.
+AC_DEFUN_ONCE([gt_LOCALE_FR],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
+ /* Check whether the given locale name is recognized by the system. */
+# if defined _WIN32 && !defined __CYGWIN__
+ /* On native Windows, setlocale(category, "") looks at the system settings,
+ not at the environment variables. Also, when an encoding suffix such
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail.
+ On MirBSD 10, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "UTF-8". */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+ || strcmp (cs, "UTF-8") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+# endif
+ return 0;
+#endif
+}
+ ]])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the native Windows locale name.
+ if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_fr=French_France.1252
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of
the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure
script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null;
then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_FR=$gt_cv_locale_fr
+ case $LOCALE_FR in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_FR"; assuming "none"])
+ LOCALE_FR=none;;
+ esac
+ AC_SUBST([LOCALE_FR])
+])
+
+dnl Determine the name of a french locale with UTF-8 encoding.
+AC_DEFUN_ONCE([gt_LOCALE_FR_UTF8],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [
+ case "$host_os" in
+ *-musl* | midipix*)
+ dnl On musl libc, all kinds of ll_CC.UTF-8 locales exist, even without
+ dnl any locale file on disk. But they are effectively equivalent to the
+ dnl C.UTF-8 locale, except for locale categories (such as LC_MESSSAGES)
+ dnl for which localizations (.mo files) have been installed.
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ ;;
+ *)
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+# if defined _WIN32 && !defined __CYGWIN__
+ /* On native Windows, setlocale(category, "") looks at the system settings,
+ not at the environment variables. Also, when an encoding suffix such
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
+ return 0;
+}
+ ]])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale()
interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest;
exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=French_France.65001
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty,
because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning
of the
+ # configure script would override the LC_ALL setting. Likewise
for
+ # LC_CTYPE, which is also set at the beginning of the configure
script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+ ;;
+ esac
+ ])
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+ case $LOCALE_FR_UTF8 in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_FR_UTF8"; assuming "none"])
+ LOCALE_FR_UTF8=none;;
+ esac
+ AC_SUBST([LOCALE_FR_UTF8])
+
+ dnl Users of $LOCALE_FR_UTF8 need to know which of the locale categories they
+ dnl can rely on.
+ case "$host_os" in
+ *-musl* | midipix*)
+ dnl On musl libc, locale categories other than LC_CTYPE and LC_MESSAGES
+ dnl are effectively unimplemented.
+ LC_COLLATE_IMPLEMENTED=false
+ LC_NUMERIC_IMPLEMENTED=false
+ LC_TIME_IMPLEMENTED=false
+ LC_MONETARY_IMPLEMENTED=false
+ ;;
+ *)
+ LC_COLLATE_IMPLEMENTED=true
+ LC_NUMERIC_IMPLEMENTED=true
+ LC_TIME_IMPLEMENTED=true
+ LC_MONETARY_IMPLEMENTED=true
+ ;;
+ esac
+ AC_SUBST([LC_COLLATE_IMPLEMENTED])
+ AC_SUBST([LC_NUMERIC_IMPLEMENTED])
+ AC_SUBST([LC_TIME_IMPLEMENTED])
+ AC_SUBST([LC_MONETARY_IMPLEMENTED])
+])
diff --git a/tp/Texinfo/XS/gnulib/m4/locale-ja.m4
b/tp/Texinfo/XS/gnulib/m4/locale-ja.m4
new file mode 100644
index 0000000000..a400b75763
--- /dev/null
+++ b/tp/Texinfo/XS/gnulib/m4/locale-ja.m4
@@ -0,0 +1,149 @@
+# locale-ja.m4 serial 17
+dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of a japanese locale with EUC-JP encoding.
+AC_DEFUN_ONCE([gt_LOCALE_JA],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
+ /* Check whether the given locale name is recognized by the system. */
+# if defined _WIN32 && !defined __CYGWIN__
+ /* On native Windows, setlocale(category, "") looks at the system settings,
+ not at the environment variables. Also, when an encoding suffix such
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail.
+ On MirBSD 10, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "UTF-8". */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+ || strcmp (cs, "UTF-8") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding (except on MirBSD). */
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
+ return 0;
+#endif
+}
+ ]])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Note that on native Windows, the Japanese locale is
+ # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+ # cannot use it here.
+ gt_cv_locale_ja=none
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of
the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure
script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null;
then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_JA=$gt_cv_locale_ja
+ case $LOCALE_JA in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_JA"; assuming "none"])
+ LOCALE_JA=none;;
+ esac
+ AC_SUBST([LOCALE_JA])
+])
diff --git a/tp/Texinfo/XS/gnulib/m4/locale-zh.m4
b/tp/Texinfo/XS/gnulib/m4/locale-zh.m4
new file mode 100644
index 0000000000..8cb7b5e519
--- /dev/null
+++ b/tp/Texinfo/XS/gnulib/m4/locale-zh.m4
@@ -0,0 +1,143 @@
+# locale-zh.m4 serial 17
+dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of a chinese locale with GB18030 encoding.
+AC_DEFUN_ONCE([gt_LOCALE_ZH_CN],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
+ /* Check whether the given locale name is recognized by the system. */
+# if defined _WIN32 && !defined __CYGWIN__
+ /* On native Windows, setlocale(category, "") looks at the system settings,
+ not at the environment variables. Also, when an encoding suffix such
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail.
+ On MirBSD 10, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "UTF-8". */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+ || strcmp (cs, "UTF-8") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding (except on MirBSD). */
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+#endif
+}
+ ]])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_zh_CN=Chinese_China.54936
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ ;;
+ solaris2.8)
+ # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+ # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+ # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps
core.
+ gt_cv_locale_zh_CN=none
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of
the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure
script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null;
then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ ;;
+ esac
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+ case $LOCALE_ZH_CN in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_ZH_CN"; assuming "none"])
+ LOCALE_ZH_CN=none;;
+ esac
+ AC_SUBST([LOCALE_ZH_CN])
+])
diff --git a/tp/Texinfo/XS/gnulib/m4/mbrtowc.m4
b/tp/Texinfo/XS/gnulib/m4/mbrtowc.m4
new file mode 100644
index 0000000000..430e9ad832
--- /dev/null
+++ b/tp/Texinfo/XS/gnulib/m4/mbrtowc.m4
@@ -0,0 +1,792 @@
+# mbrtowc.m4 serial 43 -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2023 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBRTOWC],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_REQUIRE([gl_PTHREADLIB])
+ AC_CHECK_HEADERS_ONCE([threads.h])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
+ if test $ac_cv_func_mbrtowc = no; then
+ HAVE_MBRTOWC=0
+ AC_CHECK_DECLS([mbrtowc],,, [[
+ #include <wchar.h>
+ ]])
+ if test $ac_cv_have_decl_mbrtowc = yes; then
+ dnl On Minix 3.1.8, the system's <wchar.h> declares mbrtowc() although
+ dnl it does not have the function. Avoid a collision with gnulib's
+ dnl replacement.
+ REPLACE_MBRTOWC=1
+ fi
+ else
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBRTOWC=1
+ else
+ gl_MBRTOWC_NULL_ARG1
+ gl_MBRTOWC_NULL_ARG2
+ gl_MBRTOWC_RETVAL
+ gl_MBRTOWC_NUL_RETVAL
+ gl_MBRTOWC_STORES_INCOMPLETE
+ gl_MBRTOWC_EMPTY_INPUT
+ gl_MBRTOWC_C_LOCALE
+ case "$gl_cv_func_mbrtowc_null_arg1" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1],
+ [Define if the mbrtowc function has the NULL pwc argument bug.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_null_arg2" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_NULL_ARG2_BUG], [1],
+ [Define if the mbrtowc function has the NULL string argument
bug.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_retval" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1],
+ [Define if the mbrtowc function returns a wrong return value.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_nul_retval" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1],
+ [Define if the mbrtowc function does not return 0 for a NUL
character.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_stores_incomplete" in
+ *no) ;;
+ *) AC_DEFINE([MBRTOWC_STORES_INCOMPLETE_BUG], [1],
+ [Define if the mbrtowc function stores a wide character when
reporting incomplete input.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_empty_input" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_EMPTY_INPUT_BUG], [1],
+ [Define if the mbrtowc function does not return (size_t) -2
+ for empty input.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ], [1],
+ [Define if the mbrtowc function may signal encoding errors in the
C locale.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ fi
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+ case "$host_os" in
+ mingw*) MBRTOWC_LIB= ;;
+ *)
+ gl_WEAK_SYMBOLS
+ case "$gl_cv_have_weak" in
+ *yes) MBRTOWC_LIB= ;;
+ *) MBRTOWC_LIB="$LIBPTHREAD" ;;
+ esac
+ ;;
+ esac
+ else
+ MBRTOWC_LIB=
+ fi
+ dnl MBRTOWC_LIB is expected to be '-pthread' or '-lpthread' on AIX
+ dnl with gcc or xlc, and empty otherwise.
+ AC_SUBST([MBRTOWC_LIB])
+ dnl For backward compatibility.
+ LIB_MBRTOWC="$MBRTOWC_LIB"
+ AC_SUBST([LIB_MBRTOWC])
+])
+
+dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that
+dnl redefines the semantics of the given mbstate_t type.
+dnl Result is REPLACE_MBSTATE_T.
+dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to
+dnl avoid inconsistencies.
+
+AC_DEFUN_ONCE([gl_MBSTATE_T_BROKEN],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_CHECK_FUNCS_ONCE([mbsinit])
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
+ dnl On native Windows, we know exactly how mbsinit() behaves and don't need
+ dnl to override it, even if - like on MSVC - mbsinit() is only defined as
+ dnl an inline function, not as a global function.
+ if case "$host_os" in
+ mingw*) true ;;
+ *) test $ac_cv_func_mbsinit = yes ;;
+ esac \
+ && test $ac_cv_func_mbrtowc = yes; then
+ gl_MBRTOWC_INCOMPLETE_STATE
+ gl_MBRTOWC_SANITYCHECK
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+])
+
+dnl Test whether mbrtowc puts the state into non-initial state when parsing an
+dnl incomplete multibyte character.
+dnl Result is gl_cv_func_mbrtowc_incomplete_state.
+
+AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc handles incomplete characters],
+ [gl_cv_func_mbrtowc_incomplete_state],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_JA != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 2;
+ }
+ return 0;
+}]])],
+ [gl_cv_func_mbrtowc_incomplete_state=yes],
+ [gl_cv_func_mbrtowc_incomplete_state=no],
+ [:])
+ else
+ if test $LOCALE_FR_UTF8 != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ const char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 2;
+ }
+ return 0;
+}]])],
+ [gl_cv_func_mbrtowc_incomplete_state=yes],
+ [gl_cv_func_mbrtowc_incomplete_state=no],
+ [:])
+ fi
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc works not worse than mbtowc.
+dnl Result is gl_cv_func_mbrtowc_sanitycheck.
+
+AC_DEFUN([gl_MBRTOWC_SANITYCHECK],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc],
+ [gl_cv_func_mbrtowc_sanitycheck],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_ZH_CN != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 2;
+ }
+ return 0;
+}]])],
+ [gl_cv_func_mbrtowc_sanitycheck=yes],
+ [gl_cv_func_mbrtowc_sanitycheck=no],
+ [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc supports a NULL pwc argument correctly.
+dnl Result is gl_cv_func_mbrtowc_null_arg1.
+
+AC_DEFUN([gl_MBRTOWC_NULL_ARG1],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc handles a NULL pwc argument],
+ [gl_cv_func_mbrtowc_null_arg1],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris.
+ solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ int result = 0;
+
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ char input[] = "\303\237er";
+ mbstate_t state;
+ wchar_t wc;
+ size_t ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 5, &state);
+ if (ret != 2)
+ result |= 1;
+ if (!mbsinit (&state))
+ result |= 2;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ ret = mbrtowc (NULL, input, 5, &state);
+ if (ret != 2) /* Solaris 7 fails here: ret is -1. */
+ result |= 4;
+ if (!mbsinit (&state))
+ result |= 8;
+ }
+ return result;
+}]])],
+ [gl_cv_func_mbrtowc_null_arg1=yes],
+ [gl_cv_func_mbrtowc_null_arg1=no],
+ [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc supports a NULL string argument correctly.
+dnl Result is gl_cv_func_mbrtowc_null_arg2.
+
+AC_DEFUN([gl_MBRTOWC_NULL_ARG2],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument],
+ [gl_cv_func_mbrtowc_null_arg2],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on OSF/1.
+ osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+ int ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ mbrtowc (&wc, NULL, 5, &state);
+ /* Check that wc was not modified. */
+ if (wc != (wchar_t) 0xBADFACE)
+ return 2;
+ }
+ return 0;
+}]])],
+ [gl_cv_func_mbrtowc_null_arg2=yes],
+ [gl_cv_func_mbrtowc_null_arg2=no],
+ [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc, when parsing the end of a multibyte character,
+dnl correctly returns the number of bytes that were needed to complete the
+dnl character (not the total number of bytes of the multibyte character).
+dnl Result is gl_cv_func_mbrtowc_retval.
+
+AC_DEFUN([gl_MBRTOWC_RETVAL],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([whether mbrtowc has a correct return value],
+ [gl_cv_func_mbrtowc_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on HP-UX, Solaris, native
Windows.
+ hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
+ || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ int result = 0;
+ int found_some_locale = 0;
+ /* This fails on Solaris. */
+ if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+ result |= 1;
+ }
+ found_some_locale = 1;
+ }
+ /* This fails on HP-UX 11.11. */
+ if (strcmp ("$LOCALE_JA", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+ result |= 2;
+ }
+ found_some_locale = 1;
+ }
+ /* This fails on native Windows. */
+ if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
+ {
+ char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+ {
+ input[3] = '\0';
+ if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+ result |= 4;
+ }
+ found_some_locale = 1;
+ }
+ if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
+ {
+ char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+ {
+ input[3] = '\0';
+ if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+ result |= 8;
+ }
+ found_some_locale = 1;
+ }
+ if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
+ {
+ char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+ {
+ input[3] = '\0';
+ if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+ result |= 16;
+ }
+ found_some_locale = 1;
+ }
+ return (found_some_locale ? result : 77);
+}]])],
+ [gl_cv_func_mbrtowc_retval=yes],
+ [if test $? != 77; then
+ gl_cv_func_mbrtowc_retval=no
+ fi
+ ],
+ [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc, when parsing a NUL character, correctly returns 0.
+dnl Result is gl_cv_func_mbrtowc_nul_retval.
+
+AC_DEFUN([gl_MBRTOWC_NUL_RETVAL],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character],
+ [gl_cv_func_mbrtowc_nul_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris 8 and 9.
+ solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_ZH_CN != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8 and 9. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "", 1, &state) != 0)
+ return 2;
+ }
+ return 0;
+}]])],
+ [gl_cv_func_mbrtowc_nul_retval=yes],
+ [gl_cv_func_mbrtowc_nul_retval=no],
+ [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc stores a wide character when reporting incomplete
+dnl input.
+
+AC_DEFUN([gl_MBRTOWC_STORES_INCOMPLETE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc stores incomplete characters],
+ [gl_cv_func_mbrtowc_stores_incomplete],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
+ *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
+ esac
+changequote([,])dnl
+ case "$host_os" in
+ mingw*)
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ int result = 0;
+ if (setlocale (LC_ALL, "French_France.65001") != NULL)
+ {
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
+ && wc != (wchar_t) 0xBADFACE)
+ result |= 1;
+ }
+ if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
+ {
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
+ && wc != (wchar_t) 0xBADFACE)
+ result |= 2;
+ }
+ if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
+ {
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
+ && wc != (wchar_t) 0xBADFACE)
+ result |= 4;
+ }
+ if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
+ {
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
+ && wc != (wchar_t) 0xBADFACE)
+ result |= 8;
+ }
+ return result;
+}]])],
+ [gl_cv_func_mbrtowc_stores_incomplete=no],
+ [gl_cv_func_mbrtowc_stores_incomplete=yes],
+ [:])
+ ;;
+ *)
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ if test $LOCALE_FR_UTF8 != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
+ && wc != (wchar_t) 0xBADFACE)
+ return 1;
+ }
+ return 0;
+}]])],
+ [gl_cv_func_mbrtowc_stores_incomplete=no],
+ [gl_cv_func_mbrtowc_stores_incomplete=yes],
+ [:])
+ fi
+ ;;
+ esac
+ ])
+])
+
+dnl Test whether mbrtowc returns the correct value on empty input.
+
+AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc works on empty input],
+ [gl_cv_func_mbrtowc_empty_input],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <wchar.h>
+ static wchar_t wc;
+ static mbstate_t mbs;
+ int
+ main (void)
+ {
+ return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+ }]])],
+ [gl_cv_func_mbrtowc_empty_input=yes],
+ [gl_cv_func_mbrtowc_empty_input=no],
+ [case "$host_os" in
+ # Guess no on AIX and glibc systems.
+ aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ *) gl_cv_func_mbrtowc_empty_input="guessing yes"
;;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether mbrtowc reports encoding errors in the C locale.
+dnl Although POSIX was never intended to allow this, the GNU C Library
+dnl and other implementations do it. See:
+dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
+dnl POSIX has now clarified it:
+dnl <https://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrtowc.html>
+dnl says: "In the POSIX locale an [EILSEQ] error cannot occur since all byte
+dnl values are valid characters."
+
+AC_DEFUN([gl_MBRTOWC_C_LOCALE],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether the C locale is free of encoding errors],
+ [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <limits.h>
+ #include <locale.h>
+ #include <wchar.h>
+ ]], [[
+ int i;
+ char *locale = setlocale (LC_ALL, "C");
+ if (! locale)
+ return 2;
+ for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+ {
+ char c = i;
+ wchar_t wc;
+ mbstate_t mbs = { 0, };
+ size_t ss = mbrtowc (&wc, &c, 1, &mbs);
+ if (1 < ss)
+ return 3;
+ }
+ return 0;
+ ]])],
+ [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes],
+ [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no],
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
+ *)
gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal" ;;
+ esac
+ ])
+ ])
+])
+
+# Prerequisites of lib/mbrtowc.c and lib/lc-charset-dispatch.c.
+AC_DEFUN([gl_PREREQ_MBRTOWC], [
+ AC_REQUIRE([AC_C_INLINE])
+ :
+])
+
+# Prerequisites of lib/mbtowc-lock.c.
+AC_DEFUN([gl_PREREQ_MBTOWC_LOCK],
+[
+ gl_VISIBILITY
+])
+
+
+dnl From Paul Eggert
+
+dnl This is an override of an autoconf macro.
+
+AC_DEFUN([AC_FUNC_MBRTOWC],
+[
+ dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60.
+ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
+ [gl_cv_func_mbrtowc],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <wchar.h>]],
+ [[wchar_t wc;
+ char const s[] = "";
+ size_t n = 1;
+ mbstate_t state;
+ return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])],
+ [gl_cv_func_mbrtowc=yes],
+ [gl_cv_func_mbrtowc=no])])
+ if test $gl_cv_func_mbrtowc = yes; then
+ AC_DEFINE([HAVE_MBRTOWC], [1],
+ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
+ fi
+])
diff --git a/tp/Texinfo/XS/gnulib/m4/mbstate_t.m4
b/tp/Texinfo/XS/gnulib/m4/mbstate_t.m4
new file mode 100644
index 0000000000..dcd66b9613
--- /dev/null
+++ b/tp/Texinfo/XS/gnulib/m4/mbstate_t.m4
@@ -0,0 +1,34 @@
+# mbstate_t.m4 serial 14
+dnl Copyright (C) 2000-2002, 2008-2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# From Paul Eggert.
+
+# BeOS 5 has <wchar.h> but does not define mbstate_t,
+# so you can't declare an object of that type.
+# Check for this incompatibility with Standard C.
+
+# AC_TYPE_MBSTATE_T
+# -----------------
+AC_DEFUN([AC_TYPE_MBSTATE_T],
+[
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11
+
+ AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT[
+ #include <wchar.h>]],
+ [[mbstate_t x; return sizeof x;]])],
+ [ac_cv_type_mbstate_t=yes],
+ [ac_cv_type_mbstate_t=no])])
+ if test $ac_cv_type_mbstate_t = yes; then
+ AC_DEFINE([HAVE_MBSTATE_T], [1],
+ [Define to 1 if <wchar.h> declares mbstate_t.])
+ else
+ AC_DEFINE([mbstate_t], [int],
+ [Define to a type if <wchar.h> does not define.])
+ fi
+])
diff --git a/tp/Texinfo/XS/gnulib/m4/printf.m4
b/tp/Texinfo/XS/gnulib/m4/printf.m4
index cf4e225cfe..8b8f01067f 100644
--- a/tp/Texinfo/XS/gnulib/m4/printf.m4
+++ b/tp/Texinfo/XS/gnulib/m4/printf.m4
@@ -1,4 +1,4 @@
-# printf.m4 serial 80
+# printf.m4 serial 84
dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -1906,7 +1906,7 @@ AC_DEFUN([gl_SWPRINTF_WORKS],
int main()
{
int result = 0;
- { /* This test fails on musl, FreeBSD, NetBSD, OpenBSD, macOS, AIX. */
+ { /* This test fails on musl libc 1.2.3, FreeBSD, NetBSD, OpenBSD, macOS,
AIX. */
wchar_t buf[5] = { 0xBEEF, 0xBEEF, 0xBEEF, 0xBEEF, 0xBEEF };
int ret = swprintf (buf, 4, L"%cz", '\0');
/* Expected result:
@@ -1937,7 +1937,7 @@ int main()
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_swprintf_works="guessing yes";;
# Guess no on musl systems.
- *-musl* | midipix*) gl_cv_func_swprintf_works="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_swprintf_works="guessing no";;
# Guess no on FreeBSD, NetBSD, OpenBSD, macOS,
AIX.
freebsd* | midnightbsd* | netbsd* | openbsd* | darwin* | aix*)
gl_cv_func_swprintf_works="guessing no";;
@@ -1950,6 +1950,111 @@ int main()
])
])
+dnl Test whether the *wprintf family of functions supports the 'a' and 'A'
+dnl conversion specifier for hexadecimal output of 'long double' numbers.
+dnl (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_swprintf_directive_la.
+
+AC_DEFUN([gl_SWPRINTF_DIRECTIVE_LA],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether swprintf supports the 'La' and 'LA' directives],
+ [gl_cv_func_swprintf_directive_la],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <wchar.h>
+static wchar_t buf[100];
+int main ()
+{
+ int result = 0;
+ /* This catches a glibc 2.15 and Haiku 2022 bug. */
+ if (swprintf (buf, sizeof (buf) / sizeof (wchar_t),
+ L"%La %d", 3.1416015625L, 33, 44, 55) < 0
+ || (wcscmp (buf, L"0x1.922p+1 33") != 0
+ && wcscmp (buf, L"0x3.244p+0 33") != 0
+ && wcscmp (buf, L"0x6.488p-1 33") != 0
+ && wcscmp (buf, L"0xc.91p-2 33") != 0))
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_swprintf_directive_la=yes],
+ [gl_cv_func_swprintf_directive_la=no],
+ [case "$host_os" in
+ # Guess yes on glibc >= 2.17 systems.
+ *-gnu* | gnu*)
+ AC_EGREP_CPP([Unlucky], [
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16) || (__GLIBC__ >
2)) && !defined __UCLIBC__
+ Unlucky
+ #endif
+ #endif
+ ],
+ [gl_cv_func_swprintf_directive_la="guessing yes"],
+ [gl_cv_func_swprintf_directive_la="guessing no"])
+ ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_swprintf_directive_la="guessing
yes";;
+ # Guess yes on Android.
+ linux*-android*) gl_cv_func_swprintf_directive_la="guessing
yes";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_swprintf_directive_la="guessing
no";;
+ # If we don't know, obey
--enable-cross-guesses.
+ *)
gl_cv_func_swprintf_directive_la="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether the *wprintf family of functions supports the 'lc' conversion
+dnl specifier for all wide characters.
+dnl (ISO C11, POSIX:2001)
+dnl Result is gl_cv_func_swprintf_directive_lc.
+
+AC_DEFUN([gl_SWPRINTF_DIRECTIVE_LC],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether swprintf supports the 'lc' directive],
+ [gl_cv_func_swprintf_directive_lc],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <wchar.h>
+static wchar_t buf[100];
+static wint_t L_invalid = (wchar_t) 0x76543210;
+int main ()
+{
+ int result = 0;
+ /* This catches a musl libc 1.2.4, Android bug.
+ Reported at <https://www.openwall.com/lists/musl/2023/06/12/3>. */
+ if (swprintf (buf, sizeof (buf) / sizeof (wchar_t),
+ L"%lc %d", L_invalid, 33, 44, 55) < 0)
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_swprintf_directive_lc=yes],
+ [gl_cv_func_swprintf_directive_lc=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_swprintf_directive_lc="guessing
yes";;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_swprintf_directive_lc="guessing
no";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_swprintf_directive_lc="guessing
no";;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_swprintf_directive_lc="guessing
yes";;
+ # If we don't know, obey
--enable-cross-guesses.
+ *)
gl_cv_func_swprintf_directive_lc="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
dnl The results of these tests on various platforms are:
dnl
dnl 1 = gl_PRINTF_SIZES_C99
@@ -1977,6 +2082,8 @@ dnl 22 = gl_SNPRINTF_DIRECTIVE_N
dnl 23 = gl_SNPRINTF_SIZE1
dnl 24 = gl_VSNPRINTF_ZEROSIZE_C99
dnl 25 = gl_SWPRINTF_WORKS
+dnl 26 = gl_SWPRINTF_DIRECTIVE_LA
+dnl 27 = gl_SWPRINTF_DIRECTIVE_LC
dnl
dnl 1 = checking whether printf supports size specifiers as in C99...
dnl 2 = checking whether printf supports size specifiers as in C23...
@@ -2003,47 +2110,49 @@ dnl 22 = checking whether snprintf fully supports the
'n' directive...
dnl 23 = checking whether snprintf respects a size of 1...
dnl 24 = checking whether vsnprintf respects a zero size as in C99...
dnl 25 = checking whether swprintf works...
+dnl 26 = checking whether swprintf supports the 'La' and 'LA' directives...
+dnl 27 = checking whether swprintf supports the 'lc' directive...
dnl
dnl . = yes, # = no.
dnl
-dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14
15 16 17 18 19 20 21 22 23 24 25
-dnl musl libc 1.2.3 . # . . . . # # . . . . . .
. . . . . . . . . . #
-dnl glibc 2.35 . # . . . . . . . . . # . .
. . . . . . . . . . .
-dnl glibc 2.5 . # . . . . # # . . . # . .
. . . . . . . . . . ?
-dnl glibc 2.3.6 . # . . . # # # . . . # . .
. . . . . . . . . . ?
-dnl FreeBSD 13.0 . # . . . # # # . . . # . .
. . . # . . . . . . #
-dnl FreeBSD 5.4, 6.1 . # . . . # # # . . . # . .
. # . # . . . . . . #
-dnl Mac OS X 10.13.5 . # . . # # # # . # . # . .
. . . . . . . # . . #
-dnl Mac OS X 10.5.8 . # . . # # # # . . . # . .
. # . . . . . . . . #
-dnl Mac OS X 10.3.9 . # . . . # # # . . . # . .
. # . # . . . . . . #
-dnl OpenBSD 6.0, 6.7 . # . . . # # # . . . # . .
. . . # . . . . . . #
-dnl OpenBSD 3.9, 4.0 . # . # # # # # # . # # . #
. # . # . . . . . . #
-dnl Cygwin 1.7.0 (2009) . # . . # . # # . . ? ? . .
. . . ? . . . . . . ?
-dnl Cygwin 1.5.25 (2008) . # . . # # # # . . # ? . .
. . . # . . . . . . ?
-dnl Cygwin 1.5.19 (2006) # # . . # # # # # . # ? . #
. # # # . . . . . . ?
-dnl Solaris 11.4 . # . # # # # # . . # # . .
. # . . . . . . . . .
-dnl Solaris 11.3 . # . . . # # # . . # # . .
. . . . . . . . . . .
-dnl Solaris 11.0 . # . # # # # # . . # # . .
. # . . . . . . . . ?
-dnl Solaris 10 . # . # # # # # . . # # . .
. # # . . . . . . . ?
-dnl Solaris 2.6 ... 9 # # . # # # # # # . # # . .
. # # . . . # . . . ?
-dnl Solaris 2.5.1 # # . # # # # # # . # # . .
. # . . # # # # # # ?
-dnl AIX 7.1 . # . # # # # # . . . # . .
. # # . . . . . . . #
-dnl AIX 5.2 . # . # # # # # . . . # . .
. # . . . . . . . . #
-dnl AIX 4.3.2, 5.1 # # . # # # # # # . . # . .
. # . . . . # . . . #
-dnl HP-UX 11.31 . # . . . # # # . . . ? . .
. # . . . . # # . . ?
-dnl HP-UX 11.{00,11,23} # # . . . # # # # . . ? . .
. # . . . . # # . # ?
-dnl HP-UX 10.20 # # . # . # # # # . ? ? . .
# # . . . . # # ? # ?
-dnl IRIX 6.5 # # . # # # # # # . # # . .
. # . . . . # . . . #
-dnl OSF/1 5.1 # # . # # # # # # . . ? . .
. # . . . . # . . # ?
-dnl OSF/1 4.0d # # . # # # # # # . . ? . .
. # . . # # # # # # ?
-dnl NetBSD 9.0 . # . . . # # # . . . # . .
. . . . . . . . . . #
-dnl NetBSD 5.0 . # . . # # # # . . . # . .
. # . # . . . . . . #
-dnl NetBSD 4.0 . # ? ? ? ? # # ? . ? # . ?
? ? ? ? . . . ? ? ? #
-dnl NetBSD 3.0 . # . . . # # # # . ? # # #
? # . # . . . . . . #
-dnl Haiku . # . . # # # # # . # ? . .
. . . ? . . ? . . . ?
-dnl BeOS # # # . # # # # # . ? ? # .
? . # ? . . ? . . . ?
-dnl Android 4.3 . # . # # # # # # # # ? . #
. # . # . . . # . . ?
-dnl old mingw / msvcrt # # # # # # # # # . . ? # #
. # # ? . # # # . . #
-dnl MSVC 9 # # # # # # # # # # . ? # #
. # # ? # # # # . . #
-dnl mingw 2009-2011 . # # . # . # # . . . ? # #
. . . ? . . . . . . #
-dnl mingw-w64 2011 # # # # # # # # # . . ? # #
. # # ? . # # # . . #
+dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14
15 16 17 18 19 20 21 22 23 24 25 26 27
+dnl musl libc 1.2.3 . # . . . . # # . . . . . .
. . . . . . . . . . # . #
+dnl glibc 2.35 . # . . . . . . . . . # . .
. . . . . . . . . . . . .
+dnl glibc 2.5 . # . . . . # # . . . # . .
. . . . . . . . . . . # .
+dnl glibc 2.3.6 . # . . . # # # . . . # . .
. . . . . . . . . . . # .
+dnl FreeBSD 13.0 . # . . . # # # . . . # . .
. . . # . . . . . . # . #
+dnl FreeBSD 5.4, 6.1 . # . . . # # # . . . # . .
. # . # . . . . . . # ? ?
+dnl Mac OS X 10.13.5 . # . . # # # # . # . # . .
. . . . . . . # . . # ? ?
+dnl Mac OS X 10.5.8 . # . . # # # # . . . # . .
. # . . . . . . . . # ? ?
+dnl Mac OS X 10.3.9 . # . . . # # # . . . # . .
. # . # . . . . . . # ? ?
+dnl OpenBSD 6.0, 6.7 . # . . . # # # . . . # . .
. . . # . . . . . . # . #
+dnl OpenBSD 3.9, 4.0 . # . # # # # # # . # # . #
. # . # . . . . . . # ? ?
+dnl Cygwin 1.7.0 (2009) . # . . # . # # . . ? ? . .
. . . ? . . . . . . ? ? ?
+dnl Cygwin 1.5.25 (2008) . # . . # # # # . . # ? . .
. . . # . . . . . . ? ? ?
+dnl Cygwin 1.5.19 (2006) # # . . # # # # # . # ? . #
. # # # . . . . . . ? ? ?
+dnl Solaris 11.4 . # . # # # # # . . # # . .
. # . . . . . . . . . # .
+dnl Solaris 11.3 . # . . . # # # . . # # . .
. . . . . . . . . . . # .
+dnl Solaris 11.0 . # . # # # # # . . # # . .
. # . . . . . . . . ? ? ?
+dnl Solaris 10 . # . # # # # # . . # # . .
. # # . . . . . . . . # .
+dnl Solaris 2.6 ... 9 # # . # # # # # # . # # . .
. # # . . . # . . . ? ? ?
+dnl Solaris 2.5.1 # # . # # # # # # . # # . .
. # . . # # # # # # ? ? ?
+dnl AIX 7.1 . # . # # # # # . . . # . .
. # # . . . . . . . # . .
+dnl AIX 5.2 . # . # # # # # . . . # . .
. # . . . . . . . . # ? ?
+dnl AIX 4.3.2, 5.1 # # . # # # # # # . . # . .
. # . . . . # . . . # ? ?
+dnl HP-UX 11.31 . # . . . # # # . . . ? . .
. # . . . . # # . . ? ? ?
+dnl HP-UX 11.{00,11,23} # # . . . # # # # . . ? . .
. # . . . . # # . # ? ? ?
+dnl HP-UX 10.20 # # . # . # # # # . ? ? . .
# # . . . . # # ? # ? ? ?
+dnl IRIX 6.5 # # . # # # # # # . # # . .
. # . . . . # . . . # ? ?
+dnl OSF/1 5.1 # # . # # # # # # . . ? . .
. # . . . . # . . # ? ? ?
+dnl OSF/1 4.0d # # . # # # # # # . . ? . .
. # . . # # # # # # ? ? ?
+dnl NetBSD 9.0 . # . . . # # # . . . # . .
. . . . . . . . . . # . #
+dnl NetBSD 5.0 . # . . # # # # . . . # . .
. # . # . . . . . . # ? ?
+dnl NetBSD 4.0 . # ? ? ? ? # # ? . ? # . ?
? ? ? ? . . . ? ? ? # ? ?
+dnl NetBSD 3.0 . # . . . # # # # . ? # # #
? # . # . . . . . . # ? ?
+dnl Haiku . # . . # # # # # . # ? . .
. . . ? . . ? . . . . # .
+dnl BeOS # # # . # # # # # . ? ? # .
? . # ? . . ? . . . ? ? ?
+dnl Android 4.3 . # . # # # # # # # # ? . #
. # . # . . . # . . ? ? ?
+dnl old mingw / msvcrt # # # # # # # # # . . ? # #
. # # ? . # # # . . # ? ?
+dnl MSVC 9 # # # # # # # # # # . ? # #
. # # ? # # # # . . # ? ?
+dnl mingw 2009-2011 . # # . # . # # . . . ? # #
. . . ? . . . . . . # ? ?
+dnl mingw-w64 2011 # # # # # # # # # . . ? # #
. # # ? . # # # . . # ? ?
diff --git a/tp/Texinfo/XS/gnulib/m4/ssize_t.m4
b/tp/Texinfo/XS/gnulib/m4/ssize_t.m4
index 1c12c33ea0..52bd77d2ae 100644
--- a/tp/Texinfo/XS/gnulib/m4/ssize_t.m4
+++ b/tp/Texinfo/XS/gnulib/m4/ssize_t.m4
@@ -1,23 +1,37 @@
-# ssize_t.m4 serial 5 (gettext-0.18.2)
+# ssize_t.m4 serial 6
dnl Copyright (C) 2001-2003, 2006, 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
-dnl Test whether ssize_t is defined.
+dnl Define ssize_t if it does not already exist.
AC_DEFUN([gt_TYPE_SSIZE_T],
[
- AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
+ AC_CACHE_CHECK([for ssize_t], [gl_cv_ssize_t],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <sys/types.h>]],
[[int x = sizeof (ssize_t *) + sizeof (ssize_t);
return !x;]])],
- [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
- if test $gt_cv_ssize_t = no; then
- AC_DEFINE([ssize_t], [int],
- [Define as a signed type of the same size as size_t.])
+ [gl_cv_ssize_t=yes], [gl_cv_ssize_t=no])])
+ if test $gl_cv_ssize_t = no; then
+ dnl On 64-bit native Windows, ssize_t needs to be defined as 'long long',
+ dnl for consistency with the 64-bit size_t.
+ AC_CACHE_CHECK([whether size_t is wider than 'long'], [gl_cv_size_t_large],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ typedef int array [2 * (sizeof (size_t) > sizeof (long)) - 1];
+ ]])],
+ [gl_cv_size_t_large=yes], [gl_cv_size_t_large=no])])
+ if test $gl_cv_size_t_large = yes; then
+ gl_def_ssize_t='long long'
+ else
+ gl_def_ssize_t='long'
+ fi
+ AC_DEFINE_UNQUOTED([ssize_t], [$gl_def_ssize_t],
+ [Define as a signed type of the same size as size_t.])
fi
])
diff --git a/tp/Texinfo/XS/gnulib/m4/stdalign.m4
b/tp/Texinfo/XS/gnulib/m4/stdalign.m4
index f49cf8ec16..6a39ffe756 100644
--- a/tp/Texinfo/XS/gnulib/m4/stdalign.m4
+++ b/tp/Texinfo/XS/gnulib/m4/stdalign.m4
@@ -68,8 +68,10 @@ AC_DEFUN([gl_ALIGNASOF],
dnl The "zz" puts this toward config.h's end, to avoid potential
dnl collisions with other definitions.
AH_VERBATIM([zzalignas],
-[#if !defined HAVE_C_ALIGNASOF && __cplusplus < 201103 && !defined alignof
-# if HAVE_STDALIGN_H
+[#if !defined HAVE_C_ALIGNASOF \
+ && !(defined __cplusplus && 201103 <= __cplusplus) \
+ && !defined alignof
+# if defined HAVE_STDALIGN_H
# include <stdalign.h>
# endif
@@ -151,22 +153,22 @@ AC_DEFUN([gl_ALIGNASOF],
- alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
*/
-# if !HAVE_STDALIGN_H
-# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
-# if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
-# define _Alignas(a) alignas (a)
-# elif (!defined __attribute__ \
- && ((defined __APPLE__ && defined __MACH__ \
- ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
- : __GNUC__ && !defined __ibmxl__) \
- || (4 <= __clang_major__) \
- || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
- || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
-# define _Alignas(a) __attribute__ ((__aligned__ (a)))
-# elif 1300 <= _MSC_VER
-# define _Alignas(a) __declspec (align (a))
-# endif
+# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+# if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
+# define _Alignas(a) alignas (a)
+# elif (!defined __attribute__ \
+ && ((defined __APPLE__ && defined __MACH__ \
+ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ : __GNUC__ && !defined __ibmxl__) \
+ || (4 <= __clang_major__) \
+ || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
+ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
+# define _Alignas(a) __attribute__ ((__aligned__ (a)))
+# elif 1300 <= _MSC_VER
+# define _Alignas(a) __declspec (align (a))
# endif
+# endif
+# if !defined HAVE_STDALIGN_H
# if ((defined _Alignas \
&& !(defined __cplusplus \
&& (201103 <= __cplusplus || defined _MSC_VER))) \
@@ -175,7 +177,7 @@ AC_DEFUN([gl_ALIGNASOF],
# endif
# endif
-# if _GL_STDALIGN_NEEDS_STDDEF
+# if defined _GL_STDALIGN_NEEDS_STDDEF
# include <stddef.h>
# endif
#endif])
diff --git a/tp/Texinfo/XS/gnulib/m4/stdio_h.m4
b/tp/Texinfo/XS/gnulib/m4/stdio_h.m4
index 342b7d1f20..dbfa0d5d61 100644
--- a/tp/Texinfo/XS/gnulib/m4/stdio_h.m4
+++ b/tp/Texinfo/XS/gnulib/m4/stdio_h.m4
@@ -1,12 +1,22 @@
-# stdio_h.m4 serial 62
+# stdio_h.m4 serial 63
dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-AC_DEFUN_ONCE([gl_STDIO_H],
+AC_DEFUN([gl_STDIO_H_EARLY],
[
- AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ dnl Defining __USE_MINGW_ANSI_STDIO to 1 must be done early, because
+ dnl the results of several configure tests depend on it: The tests
+ dnl - checking whether snprintf returns a byte count as in C99...
+ dnl - checking whether snprintf truncates the result as in C99...
+ dnl - checking whether printf supports the 'F' directive...
+ dnl - checking whether printf supports the grouping flag...
+ dnl - checking whether printf supports the zero flag correctly...
+ dnl - checking whether printf supports infinite 'double' arguments...
+ dnl - checking whether printf supports large precisions...
+ dnl report 'yes' if __USE_MINGW_ANSI_STDIO is 1 but 'no' if
+ dnl __USE_MINGW_ANSI_STDIO is not set.
AH_VERBATIM([MINGW_ANSI_STDIO],
[/* Use GNU style printf and scanf. */
#ifndef __USE_MINGW_ANSI_STDIO
@@ -14,6 +24,11 @@ AC_DEFUN_ONCE([gl_STDIO_H],
#endif
])
AC_DEFINE([__USE_MINGW_ANSI_STDIO])
+])
+
+AC_DEFUN_ONCE([gl_STDIO_H],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_NEXT_HEADERS([stdio.h])
dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
diff --git a/tp/Texinfo/XS/gnulib/m4/stdlib_h.m4
b/tp/Texinfo/XS/gnulib/m4/stdlib_h.m4
index ac28ed9efc..f47c1eb37b 100644
--- a/tp/Texinfo/XS/gnulib/m4/stdlib_h.m4
+++ b/tp/Texinfo/XS/gnulib/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 72
+# stdlib_h.m4 serial 75
dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -32,6 +32,49 @@ AC_DEFUN_ONCE([gl_STDLIB_H],
AC_REQUIRE([AC_C_RESTRICT])
+ dnl Test whether MB_CUR_MAX needs to be overridden.
+ dnl On Solaris 10, in UTF-8 locales, its value is 3 but needs to be 4.
+ dnl Fortunately, we can do this because on this platform MB_LEN_MAX is 5.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_CACHE_CHECK([whether MB_CUR_MAX is correct],
+ [gl_cv_macro_MB_CUR_MAX_good],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris.
+ solaris*) gl_cv_macro_MB_CUR_MAX_good="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_macro_MB_CUR_MAX_good="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+int main ()
+{
+ int result = 0;
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ if (MB_CUR_MAX < 4)
+ result |= 1;
+ }
+ return result;
+}]])],
+ [gl_cv_macro_MB_CUR_MAX_good=yes],
+ [gl_cv_macro_MB_CUR_MAX_good=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_macro_MB_CUR_MAX_good" in
+ *yes) ;;
+ *) REPLACE_MB_CUR_MAX=1 ;;
+ esac
+
AC_CHECK_DECLS_ONCE([ecvt])
if test $ac_cv_have_decl_ecvt = no; then
HAVE_DECL_ECVT=0
@@ -132,6 +175,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_DECL_FCVT=1; AC_SUBST([HAVE_DECL_FCVT])
HAVE_DECL_GCVT=1; AC_SUBST([HAVE_DECL_GCVT])
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
+ HAVE_DECL_PROGRAM_INVOCATION_NAME=1;
AC_SUBST([HAVE_DECL_PROGRAM_INVOCATION_NAME])
HAVE_GETPROGNAME=1; AC_SUBST([HAVE_GETPROGNAME])
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
@@ -181,6 +225,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_INITSTATE=0; AC_SUBST([REPLACE_INITSTATE])
REPLACE_MALLOC_FOR_MALLOC_GNU=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_GNU])
REPLACE_MALLOC_FOR_MALLOC_POSIX=0;
AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_POSIX])
+ REPLACE_MB_CUR_MAX=0; AC_SUBST([REPLACE_MB_CUR_MAX])
REPLACE_MBSTOWCS=0; AC_SUBST([REPLACE_MBSTOWCS])
REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
REPLACE_MKOSTEMP=0; AC_SUBST([REPLACE_MKOSTEMP])
diff --git a/tp/Texinfo/XS/gnulib/m4/vasnprintf.m4
b/tp/Texinfo/XS/gnulib/m4/vasnprintf.m4
index 86133b30b1..df87b9e798 100644
--- a/tp/Texinfo/XS/gnulib/m4/vasnprintf.m4
+++ b/tp/Texinfo/XS/gnulib/m4/vasnprintf.m4
@@ -1,4 +1,4 @@
-# vasnprintf.m4 serial 48
+# vasnprintf.m4 serial 50
dnl Copyright (C) 2002-2004, 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -107,11 +107,72 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNWPRINTF],
esac
gl_MBRTOWC_C_LOCALE
case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+ *yes)
+ AC_CACHE_CHECK([whether swprintf in the C locale is free of encoding
errors],
+ [gl_cv_func_swprintf_C_locale_sans_EILSEQ],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#ifndef __USE_MINGW_ANSI_STDIO
+# define __USE_MINGW_ANSI_STDIO 1
+#endif
+#include <stdio.h>
+#include <wchar.h>
+int main()
+{
+ int result = 0;
+ { /* This test fails on glibc 2.35, musl libc 1.2.4, FreeBSD 13.2, NetBSD
9.3,
+ OpenBSD 7.2, Cygwin 2.9.0.
+ Reported at <https://www.openwall.com/lists/musl/2023/06/12/2>. */
+ wchar_t buf[12];
+ int ret = swprintf (buf, 12, L"%c", '\377');
+ if (ret < 0)
+ result |= 1;
+ }
+ return result;
+}]])],
+ [gl_cv_func_swprintf_C_locale_sans_EILSEQ=yes],
+ [gl_cv_func_swprintf_C_locale_sans_EILSEQ=no],
+ [case "$host_os" in
+ # Guess no on glibc systems.
+ *-gnu* | gnu*)
gl_cv_func_swprintf_C_locale_sans_EILSEQ="guessing yes";;
+ # Guess no on musl systems.
+ *-musl* | midipix*)
gl_cv_func_swprintf_C_locale_sans_EILSEQ="guessing no";;
+ # If we don't know, obey
--enable-cross-guesses.
+ *)
gl_cv_func_swprintf_C_locale_sans_EILSEQ="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+ ;;
+ esac
+ if case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+ *yes) false ;;
+ *) true ;;
+ esac \
+ || case "$gl_cv_func_swprintf_C_locale_sans_EILSEQ" in
+ *yes) false ;;
+ *) true ;;
+ esac; then
+ AC_DEFINE([NEED_WPRINTF_DIRECTIVE_C], [1],
+ [Define if the vasnwprintf implementation needs special code for
+ the 'c' directive.])
+ fi
+ gl_SWPRINTF_DIRECTIVE_LA
+ case "$gl_cv_func_swprintf_directive_la" in
+ *yes) ;;
+ *)
+ AC_DEFINE([NEED_WPRINTF_DIRECTIVE_LA], [1],
+ [Define if the vasnwprintf implementation needs special code for
+ the 'a' directive with 'long double' arguments.])
+ ;;
+ esac
+ gl_SWPRINTF_DIRECTIVE_LC
+ case "$gl_cv_func_swprintf_directive_lc" in
*yes) ;;
*)
- AC_DEFINE([NEED_WPRINTF_DIRECTIVE_C], [1],
+ AC_DEFINE([NEED_WPRINTF_DIRECTIVE_LC], [1],
[Define if the vasnwprintf implementation needs special code for
- the 'c' directive.])
+ the 'lc' directive.])
;;
esac
gl_MUSL_LIBC
diff --git a/tp/Texinfo/XS/gnulib/m4/wchar_h.m4
b/tp/Texinfo/XS/gnulib/m4/wchar_h.m4
index 8cc38ef804..31f5b0794d 100644
--- a/tp/Texinfo/XS/gnulib/m4/wchar_h.m4
+++ b/tp/Texinfo/XS/gnulib/m4/wchar_h.m4
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is
preserved.
dnl Written by Eric Blake.
-# wchar_h.m4 serial 57
+# wchar_h.m4 serial 61
AC_DEFUN_ONCE([gl_WCHAR_H],
[
@@ -147,6 +147,7 @@ AC_DEFUN([gl_WCHAR_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_BTOWC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTOB])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSINIT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSZERO])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRTOWC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRLEN])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSRTOWCS])
@@ -253,7 +254,10 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH])
REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME])
+ REPLACE_WCSCMP=0; AC_SUBST([REPLACE_WCSCMP])
+ REPLACE_WCSNCMP=0; AC_SUBST([REPLACE_WCSNCMP])
REPLACE_WCSSTR=0; AC_SUBST([REPLACE_WCSSTR])
REPLACE_WCSTOK=0; AC_SUBST([REPLACE_WCSTOK])
+ REPLACE_WMEMCMP=0; AC_SUBST([REPLACE_WMEMCMP])
REPLACE_WMEMPCPY=0; AC_SUBST([REPLACE_WMEMPCPY])
])
diff --git a/tp/Texinfo/XS/gnulib/m4/wctype_h.m4
b/tp/Texinfo/XS/gnulib/m4/wctype_h.m4
index 6856a73595..43a2d9cf10 100644
--- a/tp/Texinfo/XS/gnulib/m4/wctype_h.m4
+++ b/tp/Texinfo/XS/gnulib/m4/wctype_h.m4
@@ -1,4 +1,4 @@
-# wctype_h.m4 serial 30
+# wctype_h.m4 serial 32
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
@@ -197,4 +197,6 @@ AC_DEFUN([gl_WCTYPE_H_DEFAULTS],
REPLACE_ISWBLANK=0; AC_SUBST([REPLACE_ISWBLANK])
REPLACE_ISWDIGIT=0; AC_SUBST([REPLACE_ISWDIGIT])
REPLACE_ISWXDIGIT=0; AC_SUBST([REPLACE_ISWXDIGIT])
+ REPLACE_WCTRANS=0; AC_SUBST([REPLACE_WCTRANS])
+ REPLACE_WCTYPE=0; AC_SUBST([REPLACE_WCTYPE])
])
diff --git a/tp/Texinfo/XS/gnulib/m4/wcwidth.m4
b/tp/Texinfo/XS/gnulib/m4/wcwidth.m4
index 93a7fa329c..e7829e98c8 100644
--- a/tp/Texinfo/XS/gnulib/m4/wcwidth.m4
+++ b/tp/Texinfo/XS/gnulib/m4/wcwidth.m4
@@ -1,4 +1,4 @@
-# wcwidth.m4 serial 35
+# wcwidth.m4 serial 36
dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -41,9 +41,9 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes;
then
HAVE_WCWIDTH=1
dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
- dnl On NetBSD 9.0, OpenBSD 5.0, MidnightBSD 1.1,
+ dnl On macOS 12.5, NetBSD 9.0, OpenBSD 5.0, MidnightBSD 1.1,
dnl wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1.
- dnl On NetBSD 9.0, MidnightBSD 1.1, OSF/1 5.1,
+ dnl On macOS 12.5, NetBSD 9.0, MidnightBSD 1.1, OSF/1 5.1,
dnl wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1.
dnl On OpenBSD 5.8, wcwidth(0xFF1A) (FULLWIDTH COLON) returns 0.
dnl This leads to bugs in 'ls' (coreutils).
diff --git a/tp/Texinfo/XS/parsetexi/labels.c b/tp/Texinfo/XS/parsetexi/labels.c
index 3c9eaa81f2..879ef2f9ba 100644
--- a/tp/Texinfo/XS/parsetexi/labels.c
+++ b/tp/Texinfo/XS/parsetexi/labels.c
@@ -13,9 +13,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include <config.h>
#include <string.h>
-#include <config.h>
#include "parser.h"
#include "convert.h"
#include "source_marks.h"
diff --git a/tp/Texinfo/XS/parsetexi/source_marks.c
b/tp/Texinfo/XS/parsetexi/source_marks.c
index 347221c753..ce3aab5fce 100644
--- a/tp/Texinfo/XS/parsetexi/source_marks.c
+++ b/tp/Texinfo/XS/parsetexi/source_marks.c
@@ -13,6 +13,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include <config.h>
#include <string.h>
#include "parser.h"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS: Run "gnulib-tool --add-import",
Gavin D. Smith <=