Yesterday I did: > * tests/test-vasnwprintf-posix.c (test_function): Add more tests for the > %c and %lc directives. Some of these new tests fail on musl libc, FreeBSD, NetBSD, AIX, mingw. - For musl libc, *BSD, AIX, it's a bug in the swprintf function, and as a workaround, I'll just not use swprintf on these platforms. For musl libc, I have reported it at . - For mingw, I'll continue to use the snwprintf function, but with a small workaround. 2023-03-22 Bruno Haible 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. 2023-03-22 Bruno Haible vasnwprintf: Fix a "warning: unused function 'wmax_room_needed'". * lib/vasnprintf.c (MAX_ROOM_NEEDED): Adjust #if condition. 2023-03-22 Bruno Haible vasnwprintf: Simplify last change. * lib/vasnprintf.c (VASNPRINTF): Remove unused variable 'len'.