modules/emscripten/system/include/libcxx/__locale in webruby-0.2.2 vs modules/emscripten/system/include/libcxx/__locale in webruby-0.2.4

- old
+ new

@@ -17,15 +17,17 @@ #include <utility> #include <mutex> #include <cstdint> #include <cctype> #include <locale.h> -#ifdef _LIBCPP_MSVCRT +#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) # include <support/win32/locale_win32.h> -#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) +#elif _AIX +# include <support/ibm/xlocale.h> +#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__) # include <xlocale.h> -#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ +#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif @@ -173,11 +175,11 @@ } // template <class _CharT> class collate; template <class _CharT> -class _LIBCPP_TYPE_VIS collate +class _LIBCPP_TYPE_VIS_ONLY collate : public locale::facet { public: typedef _CharT char_type; typedef basic_string<char_type> string_type; @@ -252,16 +254,16 @@ __h ^= __g | (__g >> __sr); } return static_cast<long>(__h); } -_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_TYPE_VIS collate<char>) -_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_TYPE_VIS collate<wchar_t>) +_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS collate<char>) +_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS collate<wchar_t>) // template <class CharT> class collate_byname; -template <class _CharT> class _LIBCPP_TYPE_VIS collate_byname; +template <class _CharT> class _LIBCPP_TYPE_VIS_ONLY collate_byname; template <> class _LIBCPP_TYPE_VIS collate_byname<char> : public collate<char> { @@ -359,11 +361,11 @@ # if defined(__NetBSD__) static const mask blank = _CTYPE_BL; # else static const mask blank = _CTYPE_B; # endif -#elif defined(__sun__) +#elif defined(__sun__) || defined(_AIX) typedef unsigned int mask; static const mask space = _ISSPACE; static const mask print = _ISPRINT; static const mask cntrl = _ISCNTRL; static const mask upper = _ISUPPER; @@ -390,11 +392,11 @@ static const mask graph = alnum | punct; _LIBCPP_ALWAYS_INLINE ctype_base() {} }; -template <class _CharT> class _LIBCPP_TYPE_VIS ctype; +template <class _CharT> class _LIBCPP_TYPE_VIS_ONLY ctype; template <> class _LIBCPP_TYPE_VIS ctype<wchar_t> : public locale::facet, public ctype_base @@ -508,11 +510,11 @@ explicit ctype(const mask* __tab = 0, bool __del = false, size_t __refs = 0); _LIBCPP_ALWAYS_INLINE bool is(mask __m, char_type __c) const { - return isascii(__c) ? __tab_[static_cast<int>(__c)] & __m : false; + return isascii(__c) ? (__tab_[static_cast<int>(__c)] & __m) !=0 : false; } _LIBCPP_ALWAYS_INLINE const char_type* is(const char_type* __low, const char_type* __high, mask* __vec) const { @@ -617,11 +619,11 @@ virtual const char* do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __to) const; }; // template <class CharT> class ctype_byname; -template <class _CharT> class _LIBCPP_TYPE_VIS ctype_byname; +template <class _CharT> class _LIBCPP_TYPE_VIS_ONLY ctype_byname; template <> class _LIBCPP_TYPE_VIS ctype_byname<char> : public ctype<char> { @@ -778,11 +780,11 @@ enum result {ok, partial, error, noconv}; }; // template <class internT, class externT, class stateT> class codecvt; -template <class _InternT, class _ExternT, class _StateT> class _LIBCPP_TYPE_VIS codecvt; +template <class _InternT, class _ExternT, class _StateT> class _LIBCPP_TYPE_VIS_ONLY codecvt; // template <> class codecvt<char, char, mbstate_t> template <> class _LIBCPP_TYPE_VIS codecvt<char, char, mbstate_t> @@ -1124,11 +1126,11 @@ }; // template <class _InternT, class _ExternT, class _StateT> class codecvt_byname template <class _InternT, class _ExternT, class _StateT> -class _LIBCPP_TYPE_VIS codecvt_byname +class _LIBCPP_TYPE_VIS_ONLY codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> { public: _LIBCPP_ALWAYS_INLINE explicit codecvt_byname(const char* __nm, size_t __refs = 0) @@ -1143,14 +1145,14 @@ template <class _InternT, class _ExternT, class _StateT> codecvt_byname<_InternT, _ExternT, _StateT>::~codecvt_byname() { } -_LIBCPP_EXTERN_TEMPLATE(class codecvt_byname<char, char, mbstate_t>) -_LIBCPP_EXTERN_TEMPLATE(class codecvt_byname<wchar_t, char, mbstate_t>) -_LIBCPP_EXTERN_TEMPLATE(class codecvt_byname<char16_t, char, mbstate_t>) -_LIBCPP_EXTERN_TEMPLATE(class codecvt_byname<char32_t, char, mbstate_t>) +_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS codecvt_byname<char, char, mbstate_t>) +_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS codecvt_byname<wchar_t, char, mbstate_t>) +_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>) +_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>) _LIBCPP_FUNC_VIS void __throw_runtime_error(const char*); template <size_t _Np> struct __narrow_to_utf8 @@ -1332,11 +1334,11 @@ } }; // template <class charT> class numpunct -template <class _CharT> class _LIBCPP_TYPE_VIS numpunct; +template <class _CharT> class _LIBCPP_TYPE_VIS_ONLY numpunct; template <> class _LIBCPP_TYPE_VIS numpunct<char> : public locale::facet { @@ -1398,10 +1400,10 @@ string __grouping_; }; // template <class charT> class numpunct_byname -template <class charT> class _LIBCPP_TYPE_VIS numpunct_byname; +template <class charT> class _LIBCPP_TYPE_VIS_ONLY numpunct_byname; template <> class _LIBCPP_TYPE_VIS numpunct_byname<char> : public numpunct<char> {