summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-03-20 03:26:44 +0100
committerBruno Haible <bruno@clisp.org>2023-03-20 03:26:44 +0100
commit1632b9ada258f5b7175a154e8d632b10158d404c (patch)
tree58181d59e46541d293673f6e04eb407bd6f329dd /doc
parentd4e4a068ccfca0fa7009714a491e8c93e1f326fa (diff)
downloadgnulib-1632b9ada258f5b7175a154e8d632b10158d404c.tar.gz
vasnwprintf: Fix test failures on musl libc.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_MUSL_LIBC. * lib/vasnprintf.c (VASNPRINTF): On musl libc, when WIDE_CHAR_VERSION, - force pad_ourselves to be 1, - don't use %n. Fix zero-padding when the result starts with a prefix "0x" or "0b". * modules/vasnwprintf (Files): Add musl.m4. * doc/posix-functions/swprintf.texi: Mention two musl libc bugs.
Diffstat (limited to 'doc')
-rw-r--r--doc/posix-functions/swprintf.texi10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/posix-functions/swprintf.texi b/doc/posix-functions/swprintf.texi
index 906ee521aa..a87bc06c86 100644
--- a/doc/posix-functions/swprintf.texi
+++ b/doc/posix-functions/swprintf.texi
@@ -26,11 +26,21 @@ This function does not support the @samp{n} directive on some platforms:
glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu),
macOS 11.1, MSVC 14.
@item
+This function sometimes returns a wrong value through the @samp{n} directive
+on some platforms:
+@c https://www.openwall.com/lists/musl/2023/03/19/1
+musl libc 1.2.3.
+@item
On Windows and 32-bit AIX platforms, @code{wchar_t} is a 16-bit type and therefore cannot
accommodate all Unicode characters.
@item
On Windows, this function does not take a buffer size as second argument.
@item
+This function ignores the minimum field width in the @samp{lc} directive
+on some platforms:
+@c https://www.openwall.com/lists/musl/2023/03/20/1
+musl libc 1.2.3.
+@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,