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

JF Bastien jfb at chromium.org
Wed Sep 17 16:19:59 PDT 2014


================
Comment at: include/__locale:44
@@ +43,3 @@
+    return isascii(c);
+}
+
----------------
Could you add a comment explaining this?

Also, it relies on the C library actually exporting `isascii`, which it would as long as it has non-strict extensions. I think it's a fair assumption, but still worth pointing out.

Shouldn't the forward declaration be `extern "C"`? If it's found at link time and not in a header then the current code won't work.

================
Comment at: include/support/newlib/xlocale.h:30
@@ +29,3 @@
+  return isascii(c);
+}
+
----------------
Remove.

================
Comment at: include/support/newlib/xlocale.h:62
@@ +61,3 @@
+
+// Share implementaiton with android bionic
+#include <support/xlocale/xlocale.h>
----------------
Typo still there.

http://reviews.llvm.org/D5385






More information about the cfe-commits mailing list