1 --- mbrtowc.c.orig 2004-11-25 11:38:18.000000000 -0800
2 +++ mbrtowc.c 2005-02-18 18:21:18.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/locale/mbrtowc.c,v 1.7 2004/05/12 14:09:04 tjr Exp $");
7 +#include "xlocale_private.h"
13 +mbrtowc_l(wchar_t * __restrict pwc, const char * __restrict s,
14 + size_t n, mbstate_t * __restrict ps, locale_t loc)
16 + NORMALIZE_LOCALE(loc);
18 + ps = &loc->__mbs_mbrtowc;
19 + return (loc->__lc_ctype->__mbrtowc(pwc, s, n, ps, loc));
23 mbrtowc(wchar_t * __restrict pwc, const char * __restrict s,
24 size_t n, mbstate_t * __restrict ps)
26 - static mbstate_t mbs;
30 - return (__mbrtowc(pwc, s, n, ps));
31 + return mbrtowc_l(pwc, s, n, ps, __current_locale());