diff options
author | Ben Craig <ben.craig@codeaurora.org> | 2016-02-10 13:47:25 +0000 |
---|---|---|
committer | Ben Craig <ben.craig@codeaurora.org> | 2016-02-10 13:47:25 +0000 |
commit | d32611211d4a43595b6998d77d26237fc4ee975b (patch) | |
tree | 0ea8295cdd8ec54e169aff4b31f1e327a8cf21ff /libcxx | |
parent | 156ed8ddd7ee8e58550430c6f09d4d09c084800c (diff) | |
download | bcm5719-llvm-d32611211d4a43595b6998d77d26237fc4ee975b.tar.gz bcm5719-llvm-d32611211d4a43595b6998d77d26237fc4ee975b.zip |
Limit catopen usage to unix-like OSes
Operating systems that are not unix-like are unlikely to have access to
catopen. Instead of black-listing each one, we now filter out all non-unix
operating systems first. We then exclude the unix-like operating systems
that don't have catopen. _WIN32 counts as a unix-like operating system
because of cygwin.
http://reviews.llvm.org/D16639
llvm-svn: 260381
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/include/__config | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index 9da235efa21..83e6e2a5d25 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -719,10 +719,12 @@ template <unsigned> struct __static_assert_check {}; #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 |