--- a/include/locale +++ b/include/locale @@ -10,7 +10,6 @@ #ifndef _LIBCPP_LOCALE #define _LIBCPP_LOCALE - /* locale synopsis @@ -871,7 +870,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end, typename remove_reference::type __save_errno = errno; errno = 0; char *__p2; - long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); + long long __ll = strtoll(__a, &__p2, __base); typename remove_reference::type __current_errno = errno; if (__current_errno == 0) errno = __save_errno; @@ -911,7 +910,7 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end, typename remove_reference::type __save_errno = errno; errno = 0; char *__p2; - unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); + unsigned long long __ll = strtoull(__a, &__p2, __base); typename remove_reference::type __current_errno = errno; if (__current_errno == 0) errno = __save_errno; --- libcxx-4.0.0.src/src/locale.cpp.orig +++ libcxx-4.0.0.src/src/locale.cpp @@ -1012,7 +1012,7 @@ return low; } -#if defined(__EMSCRIPTEN__) +#if defined(__linux__) extern "C" const unsigned short ** __ctype_b_loc(); extern "C" const int ** __ctype_tolower_loc(); extern "C" const int ** __ctype_toupper_loc(); @@ -1118,20 +1118,8 @@ #else return __pctype_func(); #endif -#elif defined(__EMSCRIPTEN__) - return *__ctype_b_loc(); -#elif defined(_NEWLIB_VERSION) - // Newlib has a 257-entry table in ctype_.c, where (char)0 starts at [1]. - return _ctype_ + 1; -#elif defined(_AIX) - return (const unsigned int *)__lc_ctype_ptr->obj->mask; #else - // Platform not supported: abort so the person doing the port knows what to - // fix -# warning ctype::classic_table() is not implemented - printf("ctype::classic_table() is not implemented\n"); - abort(); - return NULL; + return (const unsigned long *)*__ctype_b_loc(); #endif } #endif