Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/mblen.c')
-rw-r--r--newlib/libc/stdlib/mblen.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/newlib/libc/stdlib/mblen.c b/newlib/libc/stdlib/mblen.c
index ace23889b..4d9ac38bd 100644
--- a/newlib/libc/stdlib/mblen.c
+++ b/newlib/libc/stdlib/mblen.c
@@ -55,11 +55,12 @@ _DEFUN (mblen, (s, n),
{
#ifdef _MB_CAPABLE
int retval = 0;
+ struct _reent *reent = _REENT;
mbstate_t *state;
- _REENT_CHECK_MISC(_REENT);
- state = &(_REENT_MBLEN_STATE(_REENT));
- retval = __mbtowc (_REENT, NULL, s, n, __locale_charset (), state);
+ _REENT_CHECK_MISC(reent);
+ state = &(_REENT_MBLEN_STATE(reent));
+ retval = __mbtowc (reent, NULL, s, n, __locale_charset (), state);
if (retval < 0)
{
state->__count = 0;