1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00
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:
Ulrich Drepper
1999-07-28 19:37:40 +00:00
parent 97a0d44d89
commit 9f097308c7
5 changed files with 34 additions and 15 deletions

View File

@ -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;
}