diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:22:21 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:22:21 +0200 |
commit | 1d8b9e17ea13630aec475484da09ebba0366f7c8 (patch) | |
tree | 0c801f68561bfb0930a4ade80d7ca3a7940887ab /lib/wchar.in.h | |
parent | 84e26c587987e8484d55db4165f188b40c09e94b (diff) | |
parent | 630f99f29bd31a76d8d24da2975a045452c763ef (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'lib/wchar.in.h')
-rw-r--r-- | lib/wchar.in.h | 178 |
1 files changed, 92 insertions, 86 deletions
diff --git a/lib/wchar.in.h b/lib/wchar.in.h index a33a10f7..54354559 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -95,7 +95,7 @@ that can be freed by passing them as the Ith argument to the function F. */ #ifndef _GL_ATTRIBUTE_DEALLOC -# if __GNUC__ >= 11 +# if __GNUC__ >= 11 && !defined __clang__ # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) # else # define _GL_ATTRIBUTE_DEALLOC(f, i) @@ -141,7 +141,7 @@ */ #ifndef _GL_ATTRIBUTE_NOTHROW # if defined __cplusplus -# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major__ >= 4 # if __cplusplus >= 201103L # define _GL_ATTRIBUTE_NOTHROW noexcept (true) # else @@ -269,11 +269,11 @@ _GL_EXTERN_C void free (void *); # undef btowc # define btowc rpl_btowc # endif -_GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); +_GL_FUNCDECL_RPL (btowc, wint_t, (int c), _GL_ATTRIBUTE_PURE); _GL_CXXALIAS_RPL (btowc, wint_t, (int c)); # else # if !@HAVE_BTOWC@ -_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); +_GL_FUNCDECL_SYS (btowc, wint_t, (int c), _GL_ATTRIBUTE_PURE); # endif /* Need to cast, because on mingw, the return type is 'unsigned short'. */ _GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c)); @@ -297,12 +297,12 @@ _GL_WARN_ON_USE (btowc, "btowc is unportable - " # undef wctob # define wctob rpl_wctob # endif -_GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); +_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. */ -_GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); +_GL_FUNCDECL_SYS (wctob, int, (wint_t wc), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); # endif @@ -325,11 +325,11 @@ _GL_WARN_ON_USE (wctob, "wctob is unportable - " # undef mbsinit # define mbsinit rpl_mbsinit # endif -_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); +_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps), ); _GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); # else # if !@HAVE_MBSINIT@ -_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); +_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps), ); # endif _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); # endif @@ -556,7 +556,7 @@ _GL_CXXALIASWARN (mbszero); # endif _GL_FUNCDECL_RPL (mbrtowc, size_t, (wchar_t *restrict pwc, const char *restrict s, size_t n, - mbstate_t *restrict ps)); + mbstate_t *restrict ps), ); _GL_CXXALIAS_RPL (mbrtowc, size_t, (wchar_t *restrict pwc, const char *restrict s, size_t n, mbstate_t *restrict ps)); @@ -564,7 +564,7 @@ _GL_CXXALIAS_RPL (mbrtowc, size_t, # if !@HAVE_MBRTOWC@ _GL_FUNCDECL_SYS (mbrtowc, size_t, (wchar_t *restrict pwc, const char *restrict s, size_t n, - mbstate_t *restrict ps)); + mbstate_t *restrict ps), ); # endif _GL_CXXALIAS_SYS (mbrtowc, size_t, (wchar_t *restrict pwc, const char *restrict s, size_t n, @@ -590,13 +590,13 @@ _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " # define mbrlen rpl_mbrlen # endif _GL_FUNCDECL_RPL (mbrlen, size_t, - (const char *restrict s, size_t n, mbstate_t *restrict ps)); + (const char *restrict s, size_t n, mbstate_t *restrict ps), ); _GL_CXXALIAS_RPL (mbrlen, size_t, (const char *restrict s, size_t n, mbstate_t *restrict ps)); # else # if !@HAVE_MBRLEN@ _GL_FUNCDECL_SYS (mbrlen, size_t, - (const char *restrict s, size_t n, mbstate_t *restrict ps)); + (const char *restrict s, size_t n, mbstate_t *restrict ps), ); # endif _GL_CXXALIAS_SYS (mbrlen, size_t, (const char *restrict s, size_t n, mbstate_t *restrict ps)); @@ -623,7 +623,7 @@ _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " _GL_FUNCDECL_RPL (mbsrtowcs, size_t, (wchar_t *restrict dest, const char **restrict srcp, size_t len, - mbstate_t *restrict ps) + mbstate_t *restrict ps), _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (mbsrtowcs, size_t, (wchar_t *restrict dest, @@ -634,7 +634,7 @@ _GL_CXXALIAS_RPL (mbsrtowcs, size_t, _GL_FUNCDECL_SYS (mbsrtowcs, size_t, (wchar_t *restrict dest, const char **restrict srcp, size_t len, - mbstate_t *restrict ps) + mbstate_t *restrict ps), _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mbsrtowcs, size_t, @@ -664,7 +664,7 @@ _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " _GL_FUNCDECL_RPL (mbsnrtowcs, size_t, (wchar_t *restrict dest, const char **restrict srcp, size_t srclen, size_t len, - mbstate_t *restrict ps) + mbstate_t *restrict ps), _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (mbsnrtowcs, size_t, (wchar_t *restrict dest, @@ -675,7 +675,7 @@ _GL_CXXALIAS_RPL (mbsnrtowcs, size_t, _GL_FUNCDECL_SYS (mbsnrtowcs, size_t, (wchar_t *restrict dest, const char **restrict srcp, size_t srclen, size_t len, - mbstate_t *restrict ps) + mbstate_t *restrict ps), _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mbsnrtowcs, size_t, @@ -703,13 +703,13 @@ _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " # define wcrtomb rpl_wcrtomb # endif _GL_FUNCDECL_RPL (wcrtomb, size_t, - (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); + (char *restrict s, wchar_t wc, mbstate_t *restrict ps), ); _GL_CXXALIAS_RPL (wcrtomb, size_t, (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); # else # if !@HAVE_WCRTOMB@ _GL_FUNCDECL_SYS (wcrtomb, size_t, - (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); + (char *restrict s, wchar_t wc, mbstate_t *restrict ps), ); # endif _GL_CXXALIAS_SYS (wcrtomb, size_t, (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); @@ -736,7 +736,7 @@ _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " _GL_FUNCDECL_RPL (wcsrtombs, size_t, (char *restrict dest, const wchar_t **restrict srcp, size_t len, - mbstate_t *restrict ps) + mbstate_t *restrict ps), _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (wcsrtombs, size_t, (char *restrict dest, const wchar_t **restrict srcp, @@ -747,7 +747,7 @@ _GL_CXXALIAS_RPL (wcsrtombs, size_t, _GL_FUNCDECL_SYS (wcsrtombs, size_t, (char *restrict dest, const wchar_t **restrict srcp, size_t len, - mbstate_t *restrict ps) + mbstate_t *restrict ps), _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (wcsrtombs, size_t, @@ -778,7 +778,7 @@ _GL_FUNCDECL_RPL (wcsnrtombs, size_t, (char *restrict dest, const wchar_t **restrict srcp, size_t srclen, size_t len, - mbstate_t *restrict ps) + mbstate_t *restrict ps), _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (wcsnrtombs, size_t, (char *restrict dest, @@ -791,7 +791,7 @@ _GL_FUNCDECL_SYS (wcsnrtombs, size_t, (char *restrict dest, const wchar_t **restrict srcp, size_t srclen, size_t len, - mbstate_t *restrict ps) + mbstate_t *restrict ps), _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (wcsnrtombs, size_t, @@ -819,12 +819,12 @@ _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " # undef wcwidth # define wcwidth rpl_wcwidth # endif -_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); +_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t), _GL_ATTRIBUTE_PURE); _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); # else # if !@HAVE_DECL_WCWIDTH@ /* wcwidth exists but is not declared. */ -_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); +_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); # endif @@ -843,7 +843,7 @@ _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " /* Search N wide characters of S for C. */ #if @GNULIB_WMEMCHR@ # if !@HAVE_WMEMCHR@ -_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n) +_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n), _GL_ATTRIBUTE_PURE); # endif /* On some systems, this function is defined as an overloaded function: @@ -855,11 +855,12 @@ _GL_CXXALIAS_SYS_CAST2 (wmemchr, wchar_t *, (const wchar_t *, wchar_t, size_t), const wchar_t *, (const wchar_t *, wchar_t, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) \ + && !defined __clang__ _GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); _GL_CXXALIASWARN1 (wmemchr, const wchar_t *, (const wchar_t *s, wchar_t c, size_t n)); -# elif __GLIBC__ >= 2 +# elif __GLIBC__ >= 2 && !defined __CORRECT_ISO_CPP_WCHAR_H_PROTO _GL_CXXALIASWARN (wmemchr); # endif #elif defined GNULIB_POSIXCHECK @@ -879,14 +880,14 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " # define wmemcmp rpl_wmemcmp # endif _GL_FUNCDECL_RPL (wmemcmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n) + (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) + (const wchar_t *s1, const wchar_t *s2, size_t n), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wmemcmp, int, @@ -909,7 +910,7 @@ _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " # if !@HAVE_WMEMCPY@ _GL_FUNCDECL_SYS (wmemcpy, wchar_t *, (wchar_t *restrict dest, - const wchar_t *restrict src, size_t n)); + const wchar_t *restrict src, size_t n), ); # endif _GL_CXXALIAS_SYS (wmemcpy, wchar_t *, (wchar_t *restrict dest, @@ -931,7 +932,7 @@ _GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " #if @GNULIB_WMEMMOVE@ # if !@HAVE_WMEMMOVE@ _GL_FUNCDECL_SYS (wmemmove, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); + (wchar_t *dest, const wchar_t *src, size_t n), ); # endif _GL_CXXALIAS_SYS (wmemmove, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); @@ -957,7 +958,7 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " # endif _GL_FUNCDECL_RPL (wmempcpy, wchar_t *, (wchar_t *restrict dest, - const wchar_t *restrict src, size_t n)); + const wchar_t *restrict src, size_t n), ); _GL_CXXALIAS_RPL (wmempcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); @@ -965,7 +966,7 @@ _GL_CXXALIAS_RPL (wmempcpy, wchar_t *, # if !@HAVE_WMEMPCPY@ _GL_FUNCDECL_SYS (wmempcpy, wchar_t *, (wchar_t *restrict dest, - const wchar_t *restrict src, size_t n)); + const wchar_t *restrict src, size_t n), ); # endif _GL_CXXALIAS_SYS (wmempcpy, wchar_t *, (wchar_t *restrict dest, @@ -986,7 +987,7 @@ _GL_WARN_ON_USE (wmempcpy, "wmempcpy is unportable - " /* Set N wide characters of S to C. */ #if @GNULIB_WMEMSET@ # if !@HAVE_WMEMSET@ -_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n), ); # endif _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); # if __GLIBC__ >= 2 @@ -1004,7 +1005,7 @@ _GL_WARN_ON_USE (wmemset, "wmemset is unportable - " /* Return the number of wide characters in S. */ #if @GNULIB_WCSLEN@ # if !@HAVE_WCSLEN@ -_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE); +_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); # if __GLIBC__ >= 2 @@ -1025,7 +1026,7 @@ _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " namespace, not in the global namespace. So, force a declaration in the global namespace. */ # if !@HAVE_WCSNLEN@ || (defined __sun && defined __cplusplus) -_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) +_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); @@ -1043,7 +1044,7 @@ _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " #if @GNULIB_WCSCPY@ # if !@HAVE_WCSCPY@ _GL_FUNCDECL_SYS (wcscpy, wchar_t *, - (wchar_t *restrict dest, const wchar_t *restrict src)); + (wchar_t *restrict dest, const wchar_t *restrict src), ); # endif _GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src)); @@ -1066,7 +1067,7 @@ _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " the global namespace. */ # if !@HAVE_WCPCPY@ || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, - (wchar_t *restrict dest, const wchar_t *restrict src)); + (wchar_t *restrict dest, const wchar_t *restrict src), ); # endif _GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src)); @@ -1085,7 +1086,7 @@ _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " # if !@HAVE_WCSNCPY@ _GL_FUNCDECL_SYS (wcsncpy, wchar_t *, (wchar_t *restrict dest, - const wchar_t *restrict src, size_t n)); + const wchar_t *restrict src, size_t n), ); # endif _GL_CXXALIAS_SYS (wcsncpy, wchar_t *, (wchar_t *restrict dest, @@ -1111,7 +1112,7 @@ _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " # if !@HAVE_WCPNCPY@ || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcpncpy, wchar_t *, (wchar_t *restrict dest, - const wchar_t *restrict src, size_t n)); + const wchar_t *restrict src, size_t n), ); # endif _GL_CXXALIAS_SYS (wcpncpy, wchar_t *, (wchar_t *restrict dest, @@ -1130,7 +1131,7 @@ _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " #if @GNULIB_WCSCAT@ # if !@HAVE_WCSCAT@ _GL_FUNCDECL_SYS (wcscat, wchar_t *, - (wchar_t *restrict dest, const wchar_t *restrict src)); + (wchar_t *restrict dest, const wchar_t *restrict src), ); # endif _GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src)); @@ -1151,7 +1152,7 @@ _GL_WARN_ON_USE (wcscat, "wcscat is unportable - " # if !@HAVE_WCSNCAT@ _GL_FUNCDECL_SYS (wcsncat, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, - size_t n)); + size_t n), ); # endif _GL_CXXALIAS_SYS (wcsncat, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, @@ -1175,12 +1176,12 @@ _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " # undef wcscmp # define wcscmp rpl_wcscmp # endif -_GL_FUNCDECL_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) +_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_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); @@ -1205,14 +1206,14 @@ _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " # define wcsncmp rpl_wcsncmp # endif _GL_FUNCDECL_RPL (wcsncmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n) + (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) + (const wchar_t *s1, const wchar_t *s2, size_t n), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcsncmp, int, @@ -1236,7 +1237,7 @@ _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " namespace, not in the global namespace. So, force a declaration in the global namespace. */ # if !@HAVE_WCSCASECMP@ || (defined __sun && defined __cplusplus) -_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) +_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); @@ -1257,7 +1258,7 @@ _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " the global namespace. */ # if !@HAVE_WCSNCASECMP@ || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcsncasecmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n) + (const wchar_t *s1, const wchar_t *s2, size_t n), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcsncasecmp, int, @@ -1276,7 +1277,7 @@ _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " category of the current locale. */ #if @GNULIB_WCSCOLL@ # if !@HAVE_WCSCOLL@ -_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); +_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2), ); # endif _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); # if __GLIBC__ >= 2 @@ -1297,7 +1298,7 @@ _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " #if @GNULIB_WCSXFRM@ # if !@HAVE_WCSXFRM@ _GL_FUNCDECL_SYS (wcsxfrm, size_t, - (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)); + (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n), ); # endif _GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)); @@ -1325,15 +1326,16 @@ _GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); /* On Solaris 11.3, the header files declare the function in the std:: namespace, not in the global namespace. So, force a declaration in the global namespace. */ -# if !@HAVE_WCSDUP@ || (defined __sun && defined __cplusplus) || __GNUC__ >= 11 +# if !@HAVE_WCSDUP@ || (defined __sun && defined __cplusplus) \ + || (__GNUC__ >= 11 && !defined __clang__) # if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 _GL_FUNCDECL_SYS (wcsdup, wchar_t *, - (const wchar_t *s) - _GL_ATTRIBUTE_NOTHROW - _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); + (const wchar_t *s), + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE) + _GL_ATTRIBUTE_NOTHROW; # else _GL_FUNCDECL_SYS (wcsdup, wchar_t *, - (const wchar_t *s) + (const wchar_t *s), _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); # endif # endif @@ -1341,16 +1343,16 @@ _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); # endif _GL_CXXALIASWARN (wcsdup); #else -# if __GNUC__ >= 11 && !defined wcsdup +# if (__GNUC__ >= 11 && !defined __clang__) && !defined wcsdup /* For -Wmismatched-dealloc: Associate wcsdup with free or rpl_free. */ # if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 _GL_FUNCDECL_SYS (wcsdup, wchar_t *, - (const wchar_t *s) - _GL_ATTRIBUTE_NOTHROW - _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); + (const wchar_t *s), + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE) + _GL_ATTRIBUTE_NOTHROW; # else _GL_FUNCDECL_SYS (wcsdup, wchar_t *, - (const wchar_t *s) + (const wchar_t *s), _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); # endif # endif @@ -1373,12 +1375,12 @@ _GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); # else # if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 _GL_FUNCDECL_SYS (wcsdup, wchar_t *, - (const wchar_t *s) - _GL_ATTRIBUTE_NOTHROW - _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); + (const wchar_t *s), + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE) + _GL_ATTRIBUTE_NOTHROW; # else _GL_FUNCDECL_SYS (wcsdup, wchar_t *, - (const wchar_t *s) + (const wchar_t *s), _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); # endif # if @HAVE_DECL_WCSDUP@ @@ -1395,7 +1397,7 @@ _GL_CXXALIASWARN (wcsdup); /* Find the first occurrence of WC in WCS. */ #if @GNULIB_WCSCHR@ # if !@HAVE_WCSCHR@ -_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc) +_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc), _GL_ATTRIBUTE_PURE); # endif /* On some systems, this function is defined as an overloaded function: @@ -1407,10 +1409,11 @@ _GL_CXXALIAS_SYS_CAST2 (wcschr, wchar_t *, (const wchar_t *, wchar_t), const wchar_t *, (const wchar_t *, wchar_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) \ + && !defined __clang__ _GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); -# elif __GLIBC__ >= 2 +# elif __GLIBC__ >= 2 && !defined __CORRECT_ISO_CPP_WCHAR_H_PROTO _GL_CXXALIASWARN (wcschr); # endif #elif defined GNULIB_POSIXCHECK @@ -1425,7 +1428,7 @@ _GL_WARN_ON_USE (wcschr, "wcschr is unportable - " /* Find the last occurrence of WC in WCS. */ #if @GNULIB_WCSRCHR@ # if !@HAVE_WCSRCHR@ -_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc) +_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc), _GL_ATTRIBUTE_PURE); # endif /* On some systems, this function is defined as an overloaded function: @@ -1437,10 +1440,11 @@ _GL_CXXALIAS_SYS_CAST2 (wcsrchr, wchar_t *, (const wchar_t *, wchar_t), const wchar_t *, (const wchar_t *, wchar_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) \ + && !defined __clang__ _GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); -# elif __GLIBC__ >= 2 +# elif __GLIBC__ >= 2 && !defined __CORRECT_ISO_CPP_WCHAR_H_PROTO _GL_CXXALIASWARN (wcsrchr); # endif #elif defined GNULIB_POSIXCHECK @@ -1456,7 +1460,7 @@ _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " of wide characters not in REJECT. */ #if @GNULIB_WCSCSPN@ # if !@HAVE_WCSCSPN@ -_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject) +_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); @@ -1476,7 +1480,7 @@ _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " of wide characters in ACCEPT. */ #if @GNULIB_WCSSPN@ # if !@HAVE_WCSSPN@ -_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept) +_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); @@ -1496,7 +1500,7 @@ _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " #if @GNULIB_WCSPBRK@ # if !@HAVE_WCSPBRK@ _GL_FUNCDECL_SYS (wcspbrk, wchar_t *, - (const wchar_t *wcs, const wchar_t *accept) + (const wchar_t *wcs, const wchar_t *accept), _GL_ATTRIBUTE_PURE); # endif /* On some systems, this function is defined as an overloaded function: @@ -1508,12 +1512,13 @@ _GL_CXXALIAS_SYS_CAST2 (wcspbrk, wchar_t *, (const wchar_t *, const wchar_t *), const wchar_t *, (const wchar_t *, const wchar_t *)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) \ + && !defined __clang__ _GL_CXXALIASWARN1 (wcspbrk, wchar_t *, (wchar_t *wcs, const wchar_t *accept)); _GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, (const wchar_t *wcs, const wchar_t *accept)); -# elif __GLIBC__ >= 2 +# elif __GLIBC__ >= 2 && !defined __CORRECT_ISO_CPP_WCHAR_H_PROTO _GL_CXXALIASWARN (wcspbrk); # endif #elif defined GNULIB_POSIXCHECK @@ -1534,7 +1539,7 @@ _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " # endif _GL_FUNCDECL_RPL (wcsstr, wchar_t *, (const wchar_t *restrict haystack, - const wchar_t *restrict needle) + const wchar_t *restrict needle), _GL_ATTRIBUTE_PURE); _GL_CXXALIAS_RPL (wcsstr, wchar_t *, (const wchar_t *restrict haystack, @@ -1543,7 +1548,7 @@ _GL_CXXALIAS_RPL (wcsstr, wchar_t *, # if !@HAVE_WCSSTR@ _GL_FUNCDECL_SYS (wcsstr, wchar_t *, (const wchar_t *restrict haystack, - const wchar_t *restrict needle) + const wchar_t *restrict needle), _GL_ATTRIBUTE_PURE); # endif /* On some systems, this function is defined as an overloaded function: @@ -1558,14 +1563,15 @@ _GL_CXXALIAS_SYS_CAST2 (wcsstr, (const wchar_t *restrict, const wchar_t *restrict)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) \ + && !defined __clang__ _GL_CXXALIASWARN1 (wcsstr, wchar_t *, (wchar_t *restrict haystack, const wchar_t *restrict needle)); _GL_CXXALIASWARN1 (wcsstr, const wchar_t *, (const wchar_t *restrict haystack, const wchar_t *restrict needle)); -# elif __GLIBC__ >= 2 +# elif __GLIBC__ >= 2 && !defined __CORRECT_ISO_CPP_WCHAR_H_PROTO _GL_CXXALIASWARN (wcsstr); # endif #elif defined GNULIB_POSIXCHECK @@ -1586,7 +1592,7 @@ _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " # endif _GL_FUNCDECL_RPL (wcstok, wchar_t *, (wchar_t *restrict wcs, const wchar_t *restrict delim, - wchar_t **restrict ptr)); + wchar_t **restrict ptr), ); _GL_CXXALIAS_RPL (wcstok, wchar_t *, (wchar_t *restrict wcs, const wchar_t *restrict delim, wchar_t **restrict ptr)); @@ -1594,7 +1600,7 @@ _GL_CXXALIAS_RPL (wcstok, wchar_t *, # if !@HAVE_WCSTOK@ _GL_FUNCDECL_SYS (wcstok, wchar_t *, (wchar_t *restrict wcs, const wchar_t *restrict delim, - wchar_t **restrict ptr)); + wchar_t **restrict ptr), ); # endif _GL_CXXALIAS_SYS (wcstok, wchar_t *, (wchar_t *restrict wcs, const wchar_t *restrict delim, @@ -1620,12 +1626,12 @@ _GL_WARN_ON_USE (wcstok, "wcstok is unportable - " # undef wcswidth # define wcswidth rpl_wcswidth # endif -_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n) +_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n), _GL_ATTRIBUTE_PURE); _GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n)); # else # if !@HAVE_WCSWIDTH@ -_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n) +_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n), _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); @@ -1653,7 +1659,7 @@ _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " _GL_FUNCDECL_RPL (wcsftime, size_t, (wchar_t *restrict __buf, size_t __bufsize, const wchar_t *restrict __fmt, - const struct tm *restrict __tp) + const struct tm *restrict __tp), _GL_ARG_NONNULL ((1, 3, 4))); _GL_CXXALIAS_RPL (wcsftime, size_t, (wchar_t *restrict __buf, size_t __bufsize, @@ -1664,7 +1670,7 @@ _GL_CXXALIAS_RPL (wcsftime, size_t, _GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *restrict __buf, size_t __bufsize, const wchar_t *restrict __fmt, - const struct tm *restrict __tp) + const struct tm *restrict __tp), _GL_ARG_NONNULL ((1, 3, 4))); # endif _GL_CXXALIAS_SYS (wcsftime, size_t, @@ -1698,7 +1704,7 @@ _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " Possible errno values include: - ERANGE if SIZE is too small. - ENOMEM if the memory could no be allocated. */ -_GL_FUNCDECL_SYS (wgetcwd, wchar_t *, (wchar_t *buf, size_t size)); +_GL_FUNCDECL_SYS (wgetcwd, wchar_t *, (wchar_t *buf, size_t size), ); #endif |