| Index: include/__locale
|
| diff --git a/include/__locale b/include/__locale
|
| index 47116200e26e704dce9c84cafc1f18f3f17a4173..03f1b521c5db48814b53abe574e7f2764cf6b90b 100644
|
| --- a/include/__locale
|
| +++ b/include/__locale
|
| @@ -31,6 +31,13 @@
|
| # endif
|
| #elif defined(__sun__)
|
| # include <support/solaris/xlocale.h>
|
| +// @LOCALMOD-START
|
| +#elif defined(_NEWLIB_VERSION)
|
| +// FIXME: replace all the uses of _NEWLIB_VERSION with __NEWLIB__ preceded by an
|
| +// include of <sys/cdefs.h> once https://sourceware.org/ml/newlib-cvs/2014-q3/msg00038.html
|
| +// has had a chance to bake for a bit.
|
| +#include <support/newlib/xlocale.h>
|
| +// @LOCALMOD-END
|
| #elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
|
| || defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
|
| # include <xlocale.h>
|
| @@ -391,6 +398,21 @@ public:
|
| static const mask punct = _ISPUNCT;
|
| static const mask xdigit = _ISXDIGIT;
|
| static const mask blank = _ISBLANK;
|
| +// @LOCALMOD-START
|
| +#elif defined(_NEWLIB_VERSION)
|
| + typedef char mask; // Same type as Newlib's _ctype_ array in ctype.h.
|
| + // Defined in Newlib's ctype.h.
|
| + static const mask space = _S;
|
| + static const mask print = _P | _U | _L | _N | _B;
|
| + static const mask cntrl = _C;
|
| + static const mask upper = _U;
|
| + static const mask lower = _L;
|
| + static const mask alpha = _U | _L;
|
| + static const mask digit = _N;
|
| + static const mask punct = _P;
|
| + static const mask xdigit = _X | _N;
|
| + static const mask blank = _B;
|
| +// @LOCALMOD-END
|
| #else // __GLIBC__ || _WIN32 || __APPLE__ || __FreeBSD__ || __EMSCRIPTEN__ || __sun__
|
| typedef unsigned long mask;
|
| static const mask space = 1<<0;
|
|
|