diff options
author | Bruno Haible <bruno@clisp.org> | 2023-03-22 19:39:33 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-03-22 19:39:33 +0100 |
commit | 6b8f2da25eb90ee43212a282d5617f724b19cf21 (patch) | |
tree | 416a20bb6eed405047c6776d47ad3b7da734f6a1 /doc | |
parent | cf3252a50dc8b0c977f558cec3902d7f06857fad (diff) | |
download | gnulib-6b8f2da25eb90ee43212a282d5617f724b19cf21.tar.gz |
vasnwprintf: Fix test failures on FreeBSD, NetBSD, AIX, mingw.
* m4/printf.m4 (gl_SWPRINTF_WORKS): New macro.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke it and define
HAVE_WORKING_SWPRINTF accordingly.
* lib/vasnprintf.c: Together with HAVE_SWPRINTF, test also
HAVE_WORKING_SWPRINTF.
(VASNPRINTF): If WIDE_CHAR_VERSION && !DCHAR_IS_TCHAR, don't pass a
wchar_t[] to snprintf. Add a workaround against mingw's snwprintf
function.
* doc/posix-functions/swprintf.texi: Document the null wide character
bug.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/posix-functions/swprintf.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/posix-functions/swprintf.texi b/doc/posix-functions/swprintf.texi index a87bc06c86..357cfc1ad4 100644 --- a/doc/posix-functions/swprintf.texi +++ b/doc/posix-functions/swprintf.texi @@ -41,6 +41,13 @@ on some platforms: @c https://www.openwall.com/lists/musl/2023/03/20/1 musl libc 1.2.3. @item +This function is broken when it produces output that contains null wide +characters on some platforms: +@c https://www.openwall.com/lists/musl/2023/03/22/9 +musl libc 1.2.3, +FreeBSD 13.1, NetBSD 9.0, OpenBSD 7.2, macOS 12.5, AIX 7.2, +mingw. +@item This function does not support the @samp{b} directive, required by ISO C23, on some platforms: glibc 2.34, musl libc, macOS 12.5, FreeBSD 13.1, NetBSD 9.0, OpenBSD 7.2, |