diff options
author | Howard Hinnant <hhinnant@apple.com> | 2013-03-29 18:27:28 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2013-03-29 18:27:28 +0000 |
commit | fc2f021bdd3fd69ff62bfc6ceb5c5264afd4ee7d (patch) | |
tree | ead518ac52d9b5bcf7a1925a04e25d9f5c8f0feb /include/__locale | |
parent | 8b25c00ef17841f6e01e3d83444b065101cb5300 (diff) | |
download | external_libcxx-fc2f021bdd3fd69ff62bfc6ceb5c5264afd4ee7d.tar.gz external_libcxx-fc2f021bdd3fd69ff62bfc6ceb5c5264afd4ee7d.tar.bz2 external_libcxx-fc2f021bdd3fd69ff62bfc6ceb5c5264afd4ee7d.zip |
Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178354 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/__locale')
-rw-r--r-- | include/__locale | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/__locale b/include/__locale index 15102be2e..24d565b69 100644 --- a/include/__locale +++ b/include/__locale @@ -21,9 +21,9 @@ #include <locale.h> #ifdef _WIN32 # include <support/win32/locale_win32.h> -#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) +#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(EMSCRIPTEN) # include <xlocale.h> -#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD_ +#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || EMSCRIPTEN #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -339,11 +339,13 @@ public: static const mask punct = _PUNCT; static const mask xdigit = _HEX; static const mask blank = _BLANK; -#elif (defined(__APPLE__) || defined(__FreeBSD__)) +#elif (defined(__APPLE__) || defined(__FreeBSD__)) || defined(EMSCRIPTEN) #ifdef __APPLE__ typedef __uint32_t mask; #elif defined(__FreeBSD__) typedef unsigned long mask; +#elif defined(EMSCRIPTEN) + typedef unsigned short mask; #endif static const mask space = _CTYPE_S; static const mask print = _CTYPE_R; @@ -367,7 +369,7 @@ public: static const mask punct = _ISPUNCT; static const mask xdigit = _ISXDIGIT; static const mask blank = _ISBLANK; -#else // __GLIBC__ || _WIN32 || __APPLE__ || __FreeBSD__ || __sun__ +#else // __GLIBC__ || _WIN32 || __APPLE__ || __FreeBSD__ || EMSCRIPTEN || __sun__ typedef unsigned long mask; static const mask space = 1<<0; static const mask print = 1<<1; @@ -590,7 +592,7 @@ public: #endif _LIBCPP_ALWAYS_INLINE const mask* table() const _NOEXCEPT {return __tab_;} static const mask* classic_table() _NOEXCEPT; -#if defined(__GLIBC__) +#if defined(__GLIBC__) || defined(EMSCRIPTEN) static const int* __classic_upper_table() _NOEXCEPT; static const int* __classic_lower_table() _NOEXCEPT; #endif |