[PATCH] [libc++] Support newlib as libc++'s C library [locale part]

JF Bastien jfb at chromium.org
Wed Sep 17 13:13:14 PDT 2014


================
Comment at: include/locale:197
@@ +196,3 @@
+#define __has_include(x) 0
+#endif
+#if __has_include(<newlib.h>)
----------------
I still don't think `__has_include` should be defined in a header, could you put a TODO about fixing the issue in newlib first?

================
Comment at: include/support/newlib/xlocale.h:27
@@ +26,3 @@
+// TODO(jroelofs): so newlib has this, but it's guarded out in c++. Would it be
+// better to put the declaration for that here?
+static inline int isascii(int c) {
----------------
As noted before, I think newlib is correct here.

================
Comment at: include/support/newlib/xlocale.h:64
@@ +63,3 @@
+// TODO(jroelofs): I hate '..' in include lines. Is there a better way?
+#include <support/xlocale/xlocale.h>
+
----------------
Should this be after you terminate the `extern "C"`?

http://reviews.llvm.org/D5385






More information about the cfe-commits mailing list