1 --- wctrans.c.orig 2009-11-09 15:05:25.000000000 -0800
2 +++ wctrans.c 2009-11-09 15:05:26.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/locale/wctrans.c,v 1.3 2003/11/01 08:20:58 tjr Exp $");
7 +#include "xlocale_private.h"
12 @@ -38,15 +40,16 @@ enum {
16 -towctrans(wint_t wc, wctrans_t desc)
17 +towctrans_l(wint_t wc, wctrans_t desc, locale_t loc)
20 + NORMALIZE_LOCALE(loc);
24 + wc = towlower_l(wc, loc);
28 + wc = towupper_l(wc, loc);
32 @@ -57,6 +60,12 @@ towctrans(wint_t wc, wctrans_t desc)
37 +towctrans(wint_t wc, wctrans_t desc)
39 + return towctrans_l(wc, desc, __current_locale());
43 wctrans(const char *charclass)
45 @@ -78,3 +87,14 @@ wctrans(const char *charclass)
47 return (ccls[i].trans);
51 + * The extended locale version just calls the regular version. If there
52 + * is ever support for arbitrary per-locale translations, this need to
56 +wctrans_l(const char *charclass, locale_t loc)
58 + return wctrans(charclass);