[PATCH] D16639: [libcxx] Limit catopen usage to unix-like OSes

Ben Craig via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 9 09:00:02 PST 2016


bcraig updated the summary for this revision.
bcraig updated this revision to Diff 47328.
bcraig added a comment.

Moved the CATOPEN config check back to __config.  Saving a larger locale refactor for later (but oh boy is it coming).


http://reviews.llvm.org/D16639

Files:
  include/__config

Index: include/__config
===================================================================
--- include/__config
+++ include/__config
@@ -714,10 +714,12 @@
 #define _LIBCPP_LOCALE__L_EXTENSIONS 1
 #endif
 
-#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(_NEWLIB_VERSION) && \
-    !defined(__CloudABI__)
+#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
+// Most unix variants have catopen.  These are the specific ones that don't.
+#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(_NEWLIB_VERSION)
 #define _LIBCPP_HAS_CATOPEN 1
 #endif
+#endif
 
 #ifdef __FreeBSD__
 #define _DECLARE_C99_LDBL_MATH 1


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16639.47328.patch
Type: text/x-patch
Size: 640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160209/a6e4fd48/attachment.bin>


More information about the cfe-commits mailing list