diff options
Diffstat (limited to 'newlib/libc/stdlib/wcstombs_r.c')
-rw-r--r-- | newlib/libc/stdlib/wcstombs_r.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/newlib/libc/stdlib/wcstombs_r.c b/newlib/libc/stdlib/wcstombs_r.c index dd82bd383..7017a10b1 100644 --- a/newlib/libc/stdlib/wcstombs_r.c +++ b/newlib/libc/stdlib/wcstombs_r.c @@ -1,5 +1,6 @@ #include <stdlib.h> #include <wchar.h> +#include "local.h" size_t _DEFUN (_wcstombs_r, (reent, s, pwcs, n, state), @@ -18,14 +19,14 @@ _DEFUN (_wcstombs_r, (reent, s, pwcs, n, state), { size_t num_bytes = 0; while (*pwcs != 0) - num_bytes += _wctomb_r (r, buff, *pwcs++, state); + num_bytes += __wctomb (r, buff, *pwcs++, __locale_charset (), state); return num_bytes; } else { while (n > 0) { - int bytes = _wctomb_r (r, buff, *pwcs, state); + int bytes = __wctomb (r, buff, *pwcs, __locale_charset (), state); if (bytes == -1) return -1; num_to_copy = (n > bytes ? bytes : (int)n); |