diff options
author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2013-08-08 15:29:07 +0700 |
---|---|---|
committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2013-08-09 09:53:12 +0700 |
commit | 6f894d481d19e05fbc10f3ce7d74d9180d1cbb64 (patch) | |
tree | 8260bbd04f17fbee780c654b35175e89c10129fa /system/lib/libcxx/support/win32/locale_win32.cpp | |
parent | 6c275bebb45d6aac7e4a024b825ab34971b178d2 (diff) |
Update libcxx to revision 187959, 2013-08-08.
Diffstat (limited to 'system/lib/libcxx/support/win32/locale_win32.cpp')
-rw-r--r-- | system/lib/libcxx/support/win32/locale_win32.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/system/lib/libcxx/support/win32/locale_win32.cpp b/system/lib/libcxx/support/win32/locale_win32.cpp index 02b5874e..a639ade4 100644 --- a/system/lib/libcxx/support/win32/locale_win32.cpp +++ b/system/lib/libcxx/support/win32/locale_win32.cpp @@ -9,8 +9,8 @@ //===----------------------------------------------------------------------===// #include "support/win32/locale_win32.h" - -#include <stdarg.h> // va_start, va_end +#include <cstdarg> // va_start, va_end +#include <cwchar> // mbstate_t // FIXME: base currently unused. Needs manual work to construct the new locale locale_t newlocale( int mask, const char * locale, locale_t /*base*/ ) @@ -20,6 +20,8 @@ locale_t newlocale( int mask, const char * locale, locale_t /*base*/ ) locale_t uselocale( locale_t newloc ) { 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 _configthreadlocale( _ENABLE_PER_THREAD_LOCALE ); // uselocale sets all categories |