X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=locale%2Fuselocale.c;h=e2f38c10bae7685e61b5d8481872e26e2fe4645a;hb=cf684340ce723e2ec50e8f82d8c10947360518d2;hp=d19ae50d0b877ab27ca1f5e420950c01e1dbb21f;hpb=4032add80a847ddff3dff9d85163fc119013b9e2;p=platform%2Fupstream%2Fglibc.git diff --git a/locale/uselocale.c b/locale/uselocale.c index d19ae50..e2f38c1 100644 --- a/locale/uselocale.c +++ b/locale/uselocale.c @@ -19,6 +19,7 @@ #include #include "localeinfo.h" +#include /* Switch the current thread's locale to DATASET. If DATASET is null, instead just return the current setting. @@ -60,6 +61,11 @@ __uselocale (locale_t newloc) # include "categories.def" # undef DEFINE_CATEGORY #endif + + /* Update the special tsd cache of some locale data. */ + __libc_tsd_set (CTYPE_B, (void *) locobj->__ctype_b); + __libc_tsd_set (CTYPE_TOLOWER, (void *) locobj->__ctype_tolower); + __libc_tsd_set (CTYPE_TOUPPER, (void *) locobj->__ctype_toupper); } return oldloc == &_nl_global_locale ? LC_GLOBAL_LOCALE : oldloc;