Hash :
f61570c0
Author :
Date :
2023-03-22T21:43:23
*printf-posix: Fix implementation of %b directive. * lib/vasnprintf.c (VASNPRINTF): In the %b directive implementation, fix the precision handling, and ignore the '0' flag when a width and a precision are both present. * tests/test-snprintf-posix.h (test_function): Add test cases for the %x directive and more test cases for the %b directive. * tests/test-sprintf-posix.h (test_function): Likewise. * tests/test-vasnprintf-posix.c (test_function): Likewise. * tests/test-vasnwprintf-posix.c (test_function): Likewise. * tests/test-vasprintf-posix.c (test_function): Likewise. * modules/vasnwprintf-posix-tests (Files): Add m4/musl.m4. (configure.ac): Invoke gl_MUSL_LIBC.
Files:
tests/test-vasnwprintf-posix.c
tests/test-vasnwprintf-posix2.sh
tests/test-vasnwprintf-posix2.c
tests/test-vasnwprintf-posix3.c
tests/minus-zero.h
tests/infinity.h
tests/nan.h
tests/macros.h
m4/musl.m4
m4/locale-fr.m4
m4/codeset.m4
Depends-on:
stdint
float
setlocale
wcscmp
wcsspn
wmemcmp
wmemcpy
configure.ac:
AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
gl_MUSL_LIBC
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
Makefile.am:
TESTS += test-vasnwprintf-posix test-vasnwprintf-posix2.sh test-vasnwprintf-posix3
TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
check_PROGRAMS += test-vasnwprintf-posix test-vasnwprintf-posix2 test-vasnwprintf-posix3
test_vasnwprintf_posix_LDADD = $(LDADD) $(MBRTOWC_LIB)
test_vasnwprintf_posix2_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
test_vasnwprintf_posix3_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)