From 0e8c95a08f87922575c9f400399258dba54df1ca Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 2 Jan 2017 02:28:26 +0300 Subject: Fix BUTL_CXX17_UNCAUGHT_EXCEPTIONS definition for Mac OS X --- butl/config | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/butl/config b/butl/config index 02209c5..dabbdc7 100644 --- a/butl/config +++ b/butl/config @@ -32,10 +32,15 @@ # define BUTL_CXX17_UNCAUGHT_EXCEPTIONS // // Clang's libc++ seems to have it for a while (but not before 1200) so we -// assume it's there from 1200 (it doesn't define a feature test macros). -// -#elif _LIBCPP_VERSION >= 1200 -# define BUTL_CXX17_UNCAUGHT_EXCEPTIONS +// assume it's there from 1200 (it doesn't define a feature test macros). But +// not for Mac OS X, where it is explicitly marked unavailable until version +// 10.12. +// +#elif defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 1200 +# if !defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) || \ + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101200 +# define BUTL_CXX17_UNCAUGHT_EXCEPTIONS +# endif // // GCC libstdc++ has it since GCC 6 and it defines the feature test macro. // We will also use this for any other runtime. -- cgit v1.1