diff options
author | Bruno Haible <bruno@clisp.org> | 2023-03-20 03:26:44 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-03-20 03:26:44 +0100 |
commit | 1632b9ada258f5b7175a154e8d632b10158d404c (patch) | |
tree | 58181d59e46541d293673f6e04eb407bd6f329dd /m4/vasnprintf.m4 | |
parent | d4e4a068ccfca0fa7009714a491e8c93e1f326fa (diff) | |
download | gnulib-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 'm4/vasnprintf.m4')
-rw-r--r-- | m4/vasnprintf.m4 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/vasnprintf.m4 b/m4/vasnprintf.m4 index b868aed08b..8e582dd791 100644 --- a/m4/vasnprintf.m4 +++ b/m4/vasnprintf.m4 @@ -1,4 +1,4 @@ -# vasnprintf.m4 serial 41 +# vasnprintf.m4 serial 42 dnl Copyright (C) 2002-2004, 2006-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -96,6 +96,7 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNWPRINTF], [ AC_CHECK_FUNCS([wcsnlen mbrtowc]) AC_CHECK_DECLS([_snwprintf], , , [[#include <stdio.h>]]) + gl_MUSL_LIBC gl_PREREQ_VASNXPRINTF ]) |