once: Fix pthread-rwlock crashes with clang (regr. 2024-08-07).
[gnulib.git] / doc / posix-functions / mbsnrtowcs.texi
blob990914876319ad4a30cf5527190f04545f1b5df9
1 @node mbsnrtowcs
2 @subsection @code{mbsnrtowcs}
3 @findex mbsnrtowcs
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/mbsnrtowcs.html}
7 Gnulib module: mbsnrtowcs
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 This function is missing on some platforms:
13 FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, Solaris 11.3, Cygwin 1.5.x, mingw, MSVC 14, Android 4.4.
14 @item
15 This function produces invalid wide characters on some platforms:
16 Solaris 11.4.
17 @item
18 In the C or POSIX locales, this function can return @code{(size_t) -1}
19 and set @code{errno} to @code{EILSEQ}:
20 @c https://sourceware.org/bugzilla/show_bug.cgi?id=19932
21 @c https://sourceware.org/bugzilla/show_bug.cgi?id=29511
22 glibc 2.35.
23 @end itemize
25 Portability problems not fixed by Gnulib:
26 @itemize
27 @item
28 On Windows and 32-bit AIX platforms, @code{wchar_t} is a 16-bit type and
29 therefore cannot accommodate all Unicode characters.
30 However, the Gnulib function @code{mbsnrtoc32s}, provided by Gnulib module
31 @code{mbsnrtoc32s}, operates on 32-bit wide characters and therefore does not
32 have this limitation.
33 @item
34 The specification is not clear about whether this function should update the
35 conversion state when the first argument (the destination pointer) is NULL.
36 The glibc, Mac OS X, FreeBSD implementations do update the state in this case.
37 For portability, when passing a NULL destination argument, it is best to pass
38 a pointer to a temporary copy of the conversion state.
39 @end itemize