From 13e14a6bfd9f29cbfeab0c5161d2a994f97532e7 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 26 Mar 2026 12:53:53 +0100 Subject: Update/gnulib 2026 03 (#2247) * Sync with the 202601-stable Gnulib code (4a3650d887) * Ignore more deps stuff in gnulib * Remove autogenerated gnulib files * Ignore more gnulib generated headers --- gl/wchar.in.h | 72 +++++++---------------------------------------------------- 1 file changed, 8 insertions(+), 64 deletions(-) (limited to 'gl/wchar.in.h') diff --git a/gl/wchar.in.h b/gl/wchar.in.h index a6c52eb9..a60a4dfc 100644 --- a/gl/wchar.in.h +++ b/gl/wchar.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2025 Free Software Foundation, Inc. + Copyright (C) 2007-2026 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 @@ -36,8 +36,7 @@ && ((defined _INTTYPES_INCLUDED \ && !defined _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H) \ || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ - || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \ - || defined _@GUARD_PREFIX@_ALREADY_INCLUDING_WCHAR_H) + || (defined __MINGW32__ && defined __STRING_H_SOURCED__)) /* Special invocation convention: - Inside glibc and uClibc header files, but not MinGW. - On HP-UX 11.00 we have a sequence of nested includes @@ -47,10 +46,7 @@ therefore we cannot provide the function overrides; instead include only the system's . - With MinGW 3.22, when includes , only some part of - is actually processed, and that doesn't include 'mbstate_t'. - - On IRIX 6.5, similarly, we have an include -> , and - the latter includes . But here, we have no way to detect whether - is completely included or is still being included. */ + is actually processed, and that doesn't include 'mbstate_t'. */ #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ /* The glibc 2.5 /usr/include/wchar.h defines __need_wint_t but never undefines @@ -62,8 +58,6 @@ #ifndef _@GUARD_PREFIX@_WCHAR_H -#define _@GUARD_PREFIX@_ALREADY_INCLUDING_WCHAR_H - #if @HAVE_FEATURES_H@ # include /* for __GLIBC__ */ #endif @@ -82,8 +76,6 @@ # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ #endif -#undef _@GUARD_PREFIX@_ALREADY_INCLUDING_WCHAR_H - #ifndef _@GUARD_PREFIX@_WCHAR_H #define _@GUARD_PREFIX@_WCHAR_H @@ -110,7 +102,7 @@ /* Applies to: functions. Cannot be used on inline functions. */ #ifndef _GL_ATTRIBUTE_DEALLOC_FREE # if defined __cplusplus && defined __GNUC__ && !defined __clang__ -/* Work around GCC bug */ +/* Work around GCC bug */ # define _GL_ATTRIBUTE_DEALLOC_FREE \ _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) # else @@ -211,18 +203,11 @@ typedef unsigned int rpl_wint_t; /* Override mbstate_t if it is too small. - On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for - implementing mbrtowc for encodings like UTF-8. On AIX, MSVC, and OpenBSD 6.0, mbrtowc needs to be overridden, but mbstate_t exists and is large enough and overriding it would cause problems in C++ mode. */ #if !(((defined _WIN32 && !defined __CYGWIN__) || @HAVE_MBSINIT@) && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ # if !GNULIB_defined_mbstate_t -# if !(defined _AIX || defined _MSC_VER || defined __OpenBSD__) -typedef int rpl_mbstate_t; -# undef mbstate_t -# define mbstate_t rpl_mbstate_t -# endif # define GNULIB_defined_mbstate_t 1 # endif #endif @@ -316,7 +301,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); # ifndef __cplusplus -_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) +_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); # endif _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) @@ -347,7 +332,6 @@ _GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c)); _GL_CXXALIASWARN (btowc); # endif #elif defined GNULIB_POSIXCHECK -# undef btowc # if HAVE_RAW_DECL_BTOWC _GL_WARN_ON_USE (btowc, "btowc is unportable - " "use gnulib module btowc for portability"); @@ -365,8 +349,8 @@ _GL_WARN_ON_USE (btowc, "btowc is unportable - " _GL_FUNCDECL_RPL (wctob, int, (wint_t wc), _GL_ATTRIBUTE_PURE); _GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); # else -# if !defined wctob && !@HAVE_DECL_WCTOB@ -/* wctob is provided by gnulib, or wctob exists but is not declared. */ +# if !defined wctob && !@HAVE_WCTOB@ +/* wctob is provided by gnulib. */ _GL_FUNCDECL_SYS (wctob, int, (wint_t wc), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); @@ -375,7 +359,6 @@ _GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); _GL_CXXALIASWARN (wctob); # endif #elif defined GNULIB_POSIXCHECK -# undef wctob # if HAVE_RAW_DECL_WCTOB _GL_WARN_ON_USE (wctob, "wctob is unportable - " "use gnulib module wctob for portability"); @@ -402,7 +385,6 @@ _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); _GL_CXXALIASWARN (mbsinit); # endif #elif defined GNULIB_POSIXCHECK -# undef mbsinit # if HAVE_RAW_DECL_MBSINIT _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " "use gnulib module mbsinit for portability"); @@ -443,7 +425,7 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " without considering what mbsinit() does, we get test failures such as assertion "mbsinit (&iter->state)" failed */ -# if GNULIB_defined_mbstate_t /* AIX, IRIX */ +# if GNULIB_defined_mbstate_t /* AIX */ /* mbstate_t has at least 4 bytes. They are used as coded in gnulib/lib/mbrtowc.c. */ # define _GL_MBSTATE_INIT_SIZE 1 @@ -642,7 +624,6 @@ _GL_CXXALIAS_SYS (mbrtowc, size_t, _GL_CXXALIASWARN (mbrtowc); # endif #elif defined GNULIB_POSIXCHECK -# undef mbrtowc # if HAVE_RAW_DECL_MBRTOWC _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " "use gnulib module mbrtowc for portability"); @@ -673,7 +654,6 @@ _GL_CXXALIAS_SYS (mbrlen, size_t, _GL_CXXALIASWARN (mbrlen); # endif #elif defined GNULIB_POSIXCHECK -# undef mbrlen # if HAVE_RAW_DECL_MBRLEN _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " "use gnulib module mbrlen for portability"); @@ -714,7 +694,6 @@ _GL_CXXALIAS_SYS (mbsrtowcs, size_t, _GL_CXXALIASWARN (mbsrtowcs); # endif #elif defined GNULIB_POSIXCHECK -# undef mbsrtowcs # if HAVE_RAW_DECL_MBSRTOWCS _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " "use gnulib module mbsrtowcs for portability"); @@ -755,7 +734,6 @@ _GL_CXXALIAS_SYS (mbsnrtowcs, size_t, _GL_CXXALIASWARN (mbsnrtowcs); # endif #elif defined GNULIB_POSIXCHECK -# undef mbsnrtowcs # if HAVE_RAW_DECL_MBSNRTOWCS _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " "use gnulib module mbsnrtowcs for portability"); @@ -786,7 +764,6 @@ _GL_CXXALIAS_SYS (wcrtomb, size_t, _GL_CXXALIASWARN (wcrtomb); # endif #elif defined GNULIB_POSIXCHECK -# undef wcrtomb # if HAVE_RAW_DECL_WCRTOMB _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " "use gnulib module wcrtomb for portability"); @@ -827,7 +804,6 @@ _GL_CXXALIAS_SYS (wcsrtombs, size_t, _GL_CXXALIASWARN (wcsrtombs); # endif #elif defined GNULIB_POSIXCHECK -# undef wcsrtombs # if HAVE_RAW_DECL_WCSRTOMBS _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " "use gnulib module wcsrtombs for portability"); @@ -872,7 +848,6 @@ _GL_CXXALIAS_SYS (wcsnrtombs, size_t, _GL_CXXALIASWARN (wcsnrtombs); # endif #elif defined GNULIB_POSIXCHECK -# undef wcsnrtombs # if HAVE_RAW_DECL_WCSNRTOMBS _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " "use gnulib module wcsnrtombs for portability"); @@ -900,7 +875,6 @@ _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); _GL_CXXALIASWARN (wcwidth); # endif #elif defined GNULIB_POSIXCHECK -# undef wcwidth # if HAVE_RAW_DECL_WCWIDTH _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " "use gnulib module wcwidth for portability"); @@ -933,7 +907,6 @@ _GL_CXXALIASWARN1 (wmemchr, const wchar_t *, _GL_CXXALIASWARN (wmemchr); # endif #elif defined GNULIB_POSIXCHECK -# undef wmemchr # if HAVE_RAW_DECL_WMEMCHR _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " "use gnulib module wmemchr for portability"); @@ -970,7 +943,6 @@ _GL_CXXALIAS_SYS (wmemcmp, int, _GL_CXXALIASWARN (wmemcmp); # endif #elif defined GNULIB_POSIXCHECK -# undef wmemcmp # if HAVE_RAW_DECL_WMEMCMP _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " "use gnulib module wmemcmp for portability"); @@ -994,7 +966,6 @@ _GL_CXXALIAS_SYS (wmemcpy, wchar_t *, _GL_CXXALIASWARN (wmemcpy); # endif #elif defined GNULIB_POSIXCHECK -# undef wmemcpy # if HAVE_RAW_DECL_WMEMCPY _GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " "use gnulib module wmemcpy for portability"); @@ -1017,7 +988,6 @@ _GL_CXXALIAS_SYS (wmemmove, wchar_t *, _GL_CXXALIASWARN (wmemmove); # endif #elif defined GNULIB_POSIXCHECK -# undef wmemmove # if HAVE_RAW_DECL_WMEMMOVE _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " "use gnulib module wmemmove for portability"); @@ -1053,7 +1023,6 @@ _GL_CXXALIAS_SYS (wmempcpy, wchar_t *, _GL_CXXALIASWARN (wmempcpy); # endif #elif defined GNULIB_POSIXCHECK -# undef wmempcpy # if HAVE_RAW_DECL_WMEMPCPY _GL_WARN_ON_USE (wmempcpy, "wmempcpy is unportable - " "use gnulib module wmempcpy for portability"); @@ -1072,7 +1041,6 @@ _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); _GL_CXXALIASWARN (wmemset); # endif #elif defined GNULIB_POSIXCHECK -# undef wmemset # if HAVE_RAW_DECL_WMEMSET _GL_WARN_ON_USE (wmemset, "wmemset is unportable - " "use gnulib module wmemset for portability"); @@ -1090,7 +1058,6 @@ _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); _GL_CXXALIASWARN (wcslen); # endif #elif defined GNULIB_POSIXCHECK -# undef wcslen # if HAVE_RAW_DECL_WCSLEN _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " "use gnulib module wcslen for portability"); @@ -1110,7 +1077,6 @@ _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen), _GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); _GL_CXXALIASWARN (wcsnlen); #elif defined GNULIB_POSIXCHECK -# undef wcsnlen # if HAVE_RAW_DECL_WCSNLEN _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " "use gnulib module wcsnlen for portability"); @@ -1130,7 +1096,6 @@ _GL_CXXALIAS_SYS (wcscpy, wchar_t *, _GL_CXXALIASWARN (wcscpy); # endif #elif defined GNULIB_POSIXCHECK -# undef wcscpy # if HAVE_RAW_DECL_WCSCPY _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " "use gnulib module wcscpy for portability"); @@ -1151,7 +1116,6 @@ _GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src)); _GL_CXXALIASWARN (wcpcpy); #elif defined GNULIB_POSIXCHECK -# undef wcpcpy # if HAVE_RAW_DECL_WCPCPY _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " "use gnulib module wcpcpy for portability"); @@ -1175,7 +1139,6 @@ _GL_CXXALIAS_SYS (wcsncpy, wchar_t *, _GL_CXXALIASWARN (wcsncpy); # endif #elif defined GNULIB_POSIXCHECK -# undef wcsncpy # if HAVE_RAW_DECL_WCSNCPY _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " "use gnulib module wcsncpy for portability"); @@ -1199,7 +1162,6 @@ _GL_CXXALIAS_SYS (wcpncpy, wchar_t *, const wchar_t *restrict src, size_t n)); _GL_CXXALIASWARN (wcpncpy); #elif defined GNULIB_POSIXCHECK -# undef wcpncpy # if HAVE_RAW_DECL_WCPNCPY _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " "use gnulib module wcpncpy for portability"); @@ -1219,7 +1181,6 @@ _GL_CXXALIAS_SYS (wcscat, wchar_t *, _GL_CXXALIASWARN (wcscat); # endif #elif defined GNULIB_POSIXCHECK -# undef wcscat # if HAVE_RAW_DECL_WCSCAT _GL_WARN_ON_USE (wcscat, "wcscat is unportable - " "use gnulib module wcscat for portability"); @@ -1258,7 +1219,6 @@ _GL_CXXALIAS_SYS (wcsncat, wchar_t *, _GL_CXXALIASWARN (wcsncat); # endif #elif defined GNULIB_POSIXCHECK -# undef wcsncat # if HAVE_RAW_DECL_WCSNCAT _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " "use gnulib module wcsncat for portability"); @@ -1287,7 +1247,6 @@ _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscmp); # endif #elif defined GNULIB_POSIXCHECK -# undef wcscmp # if HAVE_RAW_DECL_WCSCMP _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " "use gnulib module wcscmp for portability"); @@ -1324,7 +1283,6 @@ _GL_CXXALIAS_SYS (wcsncmp, int, _GL_CXXALIASWARN (wcsncmp); # endif #elif defined GNULIB_POSIXCHECK -# undef wcsncmp # if HAVE_RAW_DECL_WCSNCMP _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " "use gnulib module wcsncmp for portability"); @@ -1344,7 +1302,6 @@ _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2), _GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscasecmp); #elif defined GNULIB_POSIXCHECK -# undef wcscasecmp # if HAVE_RAW_DECL_WCSCASECMP _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " "use gnulib module wcscasecmp for portability"); @@ -1366,7 +1323,6 @@ _GL_CXXALIAS_SYS (wcsncasecmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wcsncasecmp); #elif defined GNULIB_POSIXCHECK -# undef wcsncasecmp # if HAVE_RAW_DECL_WCSNCASECMP _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " "use gnulib module wcsncasecmp for portability"); @@ -1385,7 +1341,6 @@ _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscoll); # endif #elif defined GNULIB_POSIXCHECK -# undef wcscoll # if HAVE_RAW_DECL_WCSCOLL _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " "use gnulib module wcscoll for portability"); @@ -1407,7 +1362,6 @@ _GL_CXXALIAS_SYS (wcsxfrm, size_t, _GL_CXXALIASWARN (wcsxfrm); # endif #elif defined GNULIB_POSIXCHECK -# undef wcsxfrm # if HAVE_RAW_DECL_WCSXFRM _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " "use gnulib module wcsxfrm for portability"); @@ -1458,7 +1412,6 @@ _GL_FUNCDECL_SYS (wcsdup, wchar_t *, # endif # endif # if defined GNULIB_POSIXCHECK -# undef wcsdup # if HAVE_RAW_DECL_WCSDUP _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " "use gnulib module wcsdup for portability"); @@ -1518,7 +1471,6 @@ _GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN (wcschr); # endif #elif defined GNULIB_POSIXCHECK -# undef wcschr # if HAVE_RAW_DECL_WCSCHR _GL_WARN_ON_USE (wcschr, "wcschr is unportable - " "use gnulib module wcschr for portability"); @@ -1549,7 +1501,6 @@ _GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN (wcsrchr); # endif #elif defined GNULIB_POSIXCHECK -# undef wcsrchr # if HAVE_RAW_DECL_WCSRCHR _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " "use gnulib module wcsrchr for portability"); @@ -1569,7 +1520,6 @@ _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); _GL_CXXALIASWARN (wcscspn); # endif #elif defined GNULIB_POSIXCHECK -# undef wcscspn # if HAVE_RAW_DECL_WCSCSPN _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " "use gnulib module wcscspn for portability"); @@ -1589,7 +1539,6 @@ _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); _GL_CXXALIASWARN (wcsspn); # endif #elif defined GNULIB_POSIXCHECK -# undef wcsspn # if HAVE_RAW_DECL_WCSSPN _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " "use gnulib module wcsspn for portability"); @@ -1623,7 +1572,6 @@ _GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, _GL_CXXALIASWARN (wcspbrk); # endif #elif defined GNULIB_POSIXCHECK -# undef wcspbrk # if HAVE_RAW_DECL_WCSPBRK _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " "use gnulib module wcspbrk for portability"); @@ -1676,7 +1624,6 @@ _GL_CXXALIASWARN1 (wcsstr, const wchar_t *, _GL_CXXALIASWARN (wcsstr); # endif #elif defined GNULIB_POSIXCHECK -# undef wcsstr # if HAVE_RAW_DECL_WCSSTR _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " "use gnulib module wcsstr for portability"); @@ -1711,7 +1658,6 @@ _GL_CXXALIAS_SYS (wcstok, wchar_t *, _GL_CXXALIASWARN (wcstok); # endif #elif defined GNULIB_POSIXCHECK -# undef wcstok # if HAVE_RAW_DECL_WCSTOK _GL_WARN_ON_USE (wcstok, "wcstok is unportable - " "use gnulib module wcstok for portability"); @@ -1741,7 +1687,6 @@ _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); _GL_CXXALIASWARN (wcswidth); # endif #elif defined GNULIB_POSIXCHECK -# undef wcswidth # if HAVE_RAW_DECL_WCSWIDTH _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " "use gnulib module wcswidth for portability"); @@ -1783,7 +1728,6 @@ _GL_CXXALIAS_SYS (wcsftime, size_t, _GL_CXXALIASWARN (wcsftime); # endif #elif defined GNULIB_POSIXCHECK -# undef wcsftime # if HAVE_RAW_DECL_WCSFTIME _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " "use gnulib module wcsftime for portability"); -- cgit v1.2.3-74-g34f1