From 63861afac8004becc3907993cd16b59a5bca5195 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 30 Mar 2023 23:12:50 +0200 Subject: mbsrtowcs: Fix behaviour in the C locale. * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Invoke gl_MBRTOWC_C_LOCALE. If mbrtowc is buggy in the C locale, override also mbsrtowcs. * modules/mbsrtowcs (Files): Add m4/mbrtowc.m4. * tests/test-mbsrtowcs.c (main): Add a test of the C locale, based on tests/test-mbrtowc.c. * tests/test-mbsrtowcs5.sh: New file, based on tests/test-mbrtowc5.sh. * modules/mbsrtowcs-tests (Files): Add it. (Makefile.am): Test it. * doc/posix-functions/mbsrtowcs.texi: Mention the C locale behaviour bug. --- modules/mbsrtowcs-tests | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/mbsrtowcs-tests') diff --git a/modules/mbsrtowcs-tests b/modules/mbsrtowcs-tests index d7301057d9..36050c670d 100644 --- a/modules/mbsrtowcs-tests +++ b/modules/mbsrtowcs-tests @@ -3,6 +3,7 @@ tests/test-mbsrtowcs1.sh tests/test-mbsrtowcs2.sh tests/test-mbsrtowcs3.sh tests/test-mbsrtowcs4.sh +tests/test-mbsrtowcs5.sh tests/test-mbsrtowcs.c tests/signature.h tests/macros.h @@ -24,7 +25,9 @@ gt_LOCALE_JA gt_LOCALE_ZH_CN Makefile.am: -TESTS += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh +TESTS += \ + test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh \ + test-mbsrtowcs5.sh TESTS_ENVIRONMENT += \ LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ -- cgit v1.2.1