From 51ae55e510dc3affbbc87fb72dfd39e9c5a3f97e Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 19 Apr 2011 20:13:28 +0900 Subject: [PATCH] __locale: Add LC_XXX_MASK for Win32. --- include/__locale | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/__locale b/include/__locale index c9cd31a2..309037cb 100644 --- a/include/__locale +++ b/include/__locale @@ -19,7 +19,21 @@ #include #include #include +#ifdef __MINGW32__ +typedef _locale_t locale_t; + +#include +#define LC_COLLATE_MASK _M_COLLATE +#define LC_CTYPE_MASK _M_CTYPE +#define LC_MONETARY_MASK _M_MONETARY +#define LC_NUMERIC_MASK _M_NUMERIC +#define LC_TIME_MASK _M_TIME +#define LC_MESSAGES_MASK _M_MESSAGES +#define LC_ALL_MASK _M_ALL + +#else #include +#endif #pragma GCC system_header @@ -315,6 +329,17 @@ public: static const mask punct = _CTYPE_P; static const mask xdigit = _CTYPE_X; static const mask blank = _CTYPE_B; +#elif defined(__MINGW32__) + static const mask space = _SPACE; + static const mask print = (_BLANK|_PUNCT|_ALPHA|_DIGIT); + static const mask cntrl = _CONTROL; + static const mask upper = _UPPER; + static const mask lower = _LOWER; + static const mask alpha = _ALPHA; + static const mask digit = _DIGIT; + static const mask punct = _PUNCT; + static const mask xdigit = _HEX; + static const mask blank = _BLANK; #else // __APPLE__ static const mask space = _ISspace; static const mask print = _ISprint;