git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178545 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a1985ebbc8
commit
f6bdda044c
@ -20,6 +20,8 @@ locale_t newlocale( int mask, const char * locale, locale_t /*base*/ )
|
|||||||
locale_t uselocale( locale_t newloc )
|
locale_t uselocale( locale_t newloc )
|
||||||
{
|
{
|
||||||
locale_t old_locale = _get_current_locale();
|
locale_t old_locale = _get_current_locale();
|
||||||
|
if ( newloc == NULL )
|
||||||
|
return old_locale;
|
||||||
// uselocale sets the thread's locale by definition, so unconditionally use thread-local locale
|
// uselocale sets the thread's locale by definition, so unconditionally use thread-local locale
|
||||||
_configthreadlocale( _ENABLE_PER_THREAD_LOCALE );
|
_configthreadlocale( _ENABLE_PER_THREAD_LOCALE );
|
||||||
// uselocale sets all categories
|
// uselocale sets all categories
|
||||||
|
Loading…
x
Reference in New Issue
Block a user