aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdlib/mbtowc.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/mbtowc.c')
-rw-r--r--newlib/libc/stdlib/mbtowc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/stdlib/mbtowc.c b/newlib/libc/stdlib/mbtowc.c
index 5e34fe3..0d16f0d 100644
--- a/newlib/libc/stdlib/mbtowc.c
+++ b/newlib/libc/stdlib/mbtowc.c
@@ -60,9 +60,9 @@ _DEFUN (mbtowc, (pwc, s, n),
size_t n)
{
#ifdef MB_CAPABLE
- static int state;
+ _REENT_CHECK_MISC(_REENT);
- return _mbtowc_r (_REENT, pwc, s, n, &state);
+ return _mbtowc_r (_REENT, pwc, s, n, &(_REENT_MBTOWC_STATE(_REENT)));
#else /* not MB_CAPABLE */
if (s == NULL)
return 0;