From 9f097308c7465443765d1e25699a4cf33eff5455 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Jul 1999 19:37:40 +0000 Subject: Update. 1999-07-28 Ulrich Drepper * stdlib/mblen.c: Use static state. Reported by Bruno Haible . * stdlib/mbtowc.c: Reset state for s == NULL. * stdlib/wctomb.c: Likewise. Reported by Bruno Haible . * stdlib/mbstowcs.c: Do not use global state. Reported by Bruno Haible . --- stdlib/wctomb.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'stdlib/wctomb.c') diff --git a/stdlib/wctomb.c b/stdlib/wctomb.c index 2df8b998d5..757e6adaad 100644 --- a/stdlib/wctomb.c +++ b/stdlib/wctomb.c @@ -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; } -- cgit v1.2.3