From 7595a8817e03c1366817e69aa74263efa2ca4979 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 31 Mar 2023 00:27:20 +0200 Subject: mbstowcs: New module. * lib/stdlib.in.h (mbstowcs): New declaration. * lib/mbstowcs.c: New file, based on lib/mbstoc32s.c. * m4/mbstowcs.m4: New file. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether mbstowcs is declared. (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBSTOWCS. (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MBSTOWCS. * modules/stdlib (Makefile.am): Substitute GNULIB_MBSTOWCS, REPLACE_MBSTOWCS. * modules/mbstowcs: New file. * tests/test-stdlib-c++.cc (mbstowcs): Check signature. * doc/posix-functions/mbstowcs.texi: Mention the C locale behaviour bug and the new module. --- doc/posix-functions/mbstowcs.texi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/posix-functions/mbstowcs.texi b/doc/posix-functions/mbstowcs.texi index 5d7dc4ca62..a695edc2af 100644 --- a/doc/posix-functions/mbstowcs.texi +++ b/doc/posix-functions/mbstowcs.texi @@ -4,10 +4,14 @@ POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/mbstowcs.html} -Gnulib module: --- +Gnulib module: mbstowcs Portability problems fixed by Gnulib: @itemize +@item +In the C or POSIX locales, this function can return @code{(size_t) -1} +and set @code{errno} to @code{EILSEQ}: +glibc 2.35. @end itemize Portability problems not fixed by Gnulib: -- cgit v1.2.1