From 7d4be1efd53045983acf1d00041e70086d2c029f Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 21 Jan 2004 20:09:16 +0000 Subject: 2004-01-21 Jeff Johnston * libc/stdlib/mbrtowc.c (_mbrtowc_r): Fix case where s is null pointer to match C99 spec. * libc/stdlib/mbsrtowcs.c (_mbsrtowc_r): Fix to ignore len when dst is NULL. Also fix to not alter src pointer when dst is NULL and call _mbrtowc_r instead of _mbtowc_r. * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Call _wcrtomb_r instead of _wctomb_r. --- newlib/libc/stdlib/wcsrtombs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'newlib/libc/stdlib/wcsrtombs.c') diff --git a/newlib/libc/stdlib/wcsrtombs.c b/newlib/libc/stdlib/wcsrtombs.c index 11fdf9285..8c55b0878 100644 --- a/newlib/libc/stdlib/wcsrtombs.c +++ b/newlib/libc/stdlib/wcsrtombs.c @@ -37,7 +37,7 @@ _DEFUN (_wcsrtombs_r, (r, dst, src, len, ps), { int count = ps->__count; wint_t wch = ps->__value.__wch; - int bytes = _wctomb_r (r, buff, *pwcs, ps); + int bytes = _wcrtomb_r (r, buff, *pwcs, ps); if (bytes == -1) { r->_errno = EILSEQ; -- cgit v1.2.3