mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Update.
1999-07-28 Ulrich Drepper <drepper@cygnus.com> * stdlib/mblen.c: Use static state. Reported by Bruno Haible <haible@ilog.fr>. * stdlib/mbtowc.c: Reset state for s == NULL. * stdlib/wctomb.c: Likewise. Reported by Bruno Haible <haible@ilog.fr>. * stdlib/mbstowcs.c: Do not use global state. Reported by Bruno Haible <haible@ilog.fr>.
This commit is contained in:
@ -42,6 +42,10 @@ wctomb (char *s, wchar_t wchar)
|
||||
/* Make sure we use the correct value. */
|
||||
update_conversion_ptrs ();
|
||||
|
||||
/* This is an extension in the Unix standard which does not directly
|
||||
violate ISO C. */
|
||||
memset (&__no_r_state, '\0', siyeof __no_r_state);
|
||||
|
||||
return __wcsmbs_gconv_fcts.tomb->__stateful;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user