Author: bcraig Date: Wed Feb 10 07:47:25 2016 New Revision: 260381 URL: http://llvm.org/viewvc/llvm-project?rev=260381&view=rev Log: 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 Modified: libcxx/trunk/include/__config Modified: libcxx/trunk/include/__config URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=260381&r1=260380&r2=260381&view=diff ============================================================================== --- libcxx/trunk/include/__config (original) +++ libcxx/trunk/include/__config Wed Feb 10 07:47:25 2016 @@ -719,10 +719,12 @@ template <unsigned> struct __static_asse #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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits