[libcxx] Whitelist inclusion of sysctl.h instead of blacklisting

Instead of excluding all known operating systems that are not derived from BSD,
I now include all operating systems that claim to be derived from BSD.
Hopefully, that will make it so that this check doesn't need to change for
every new operating system that comes along.

http://reviews.llvm.org/D16634

llvm-svn: 259193
This commit is contained in:
Ben Craig 2016-01-29 13:53:23 +00:00
parent c6d8a57edf
commit 7d00f97048
1 changed files with 8 additions and 3 deletions

View File

@ -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