1 --- wcstombs.c.orig Thu Nov 25 11:38:20 2004
2 +++ wcstombs.c Fri Feb 18 17:17:37 2005
5 __FBSDID("$FreeBSD: src/lib/libc/locale/wcstombs.c,v 1.10 2004/07/21 10:54:57 tjr Exp $");
7 +#include "xlocale_private.h"
15 -wcstombs(char * __restrict s, const wchar_t * __restrict pwcs, size_t n)
16 +wcstombs_l(char * __restrict s, const wchar_t * __restrict pwcs, size_t n,
19 static const mbstate_t initial;
22 + NORMALIZE_LOCALE(loc);
24 - return (__wcsnrtombs(s, &pwcs, SIZE_T_MAX, n, &mbs));
25 + return (loc->__lc_ctype->__wcsnrtombs(s, &pwcs, SIZE_T_MAX, n, &mbs, loc));
29 +wcstombs(char * __restrict s, const wchar_t * __restrict pwcs, size_t n)
31 + return wcstombs_l(s, pwcs, n, __current_locale());