Commit cc90bee0e183c03c0ad05a14f69e59e20c1a6392

Bruno Haible 2023-03-17T12:25:37

vasnwprintf: New module. * lib/vasnprintf.c: Enable more code for WIDE_CHAR_VERSION, because snwprintf()/_snwprintf() (Windows) and swprintf() (Unix) don't return the needed buffer size, like snprintf does. * lib/wprintf-parse.h: New file, based on lib/printf-parse.h and gettext/gettext-runtime/intl/wprintf-parse.h. * lib/wprintf-parse.c: New file, based on gettext/gettext-runtime/intl/printf.c. * lib/vasnwprintf.h: New file, based on lib/vasnprintf.h and gettext/gettext-runtime/intl/vasnwprintf.h. * lib/vasnwprintf.c: New file. * lib/asnwprintf.c: New file, based on lib/asnprintf.c. * m4/vasnprintf.m4 (gl_FUNC_VASNWPRINTF): New macro. (gl_PREREQ_VASNXPRINTF): New macro, extracted from gl_PREREQ_VASNPRINTF. (gl_PREREQ_VASNPRINTF): Invoke it. Don't test for wcsnlen and mbrtowc. (gl_PREREQ_VASNWPRINTF): New macro. * modules/vasnwprintf: New file, based on modules/vasnprintf.