Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: include/__locale

Issue 904473004: Rebased localmods in libcxx to 223109. (Closed)
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/__config ('k') | include/atomic » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « include/__config ('k') | include/atomic » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698