[PATCH] D16634: [libcxx] Whitelist inclusion of sysctl.h instead of blacklisting

Ben Craig via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 28 10:14:12 PST 2016


bcraig updated this revision to Diff 46292.
bcraig added a comment.

CloudABI doesn't define unix, so stop blacklisting it explicitly and let the whitelist filter it out.


http://reviews.llvm.org/D16634

Files:
  src/thread.cpp

Index: src/thread.cpp
===================================================================
--- src/thread.cpp
+++ src/thread.cpp
@@ -16,10 +16,15 @@
 #include "future"
 #include "limits"
 #include <sys/types.h>
-#if !defined(_WIN32)
-# if !defined(__sun__) && !defined(__linux__) && !defined(_AIX) && !defined(__native_client__) && !defined(__CloudABI__)
+
+#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
+# include <sys/param.h>
+# if defined(BSD)
 #   include <sys/sysctl.h>
-# endif // !defined(__sun__) && !defined(__linux__) && !defined(_AIX) && !defined(__native_client__) && !defined(__CloudABI__)
+# endif // defined(BSD)
+#endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
+
+#if !defined(_WIN32)
 # include <unistd.h>
 #endif // !_WIN32
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16634.46292.patch
Type: text/x-patch
Size: 790 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160128/c10bb0e4/attachment.bin>


More information about the cfe-commits mailing list