From bfae9dab4b2e3ddaf13e82a6c24c0684de9e0d48 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 1 Feb 2017 17:00:18 +0200 Subject: Fix shared_mutex feature test for MacOS some more --- butl/ft/shared_mutex | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/butl/ft/shared_mutex b/butl/ft/shared_mutex index 73bd3e9..18692c8 100644 --- a/butl/ft/shared_mutex +++ b/butl/ft/shared_mutex @@ -38,10 +38,21 @@ # endif #endif -// __cpp_lib_shared_mutex +// __cpp_lib_shared_timed_mutex // #ifndef __cpp_lib_shared_timed_mutex -# define __cpp_lib_shared_timed_mutex 201402 + // + // On MacOS shared_timed_mutex is marked as unavailable until MacOS + // 10.12. + // +# if defined(_LIBCPP_VERSION) +# if !defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) || \ + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101200 +# define __cpp_lib_shared_timed_mutex 201402 +# endif +# else +# define __cpp_lib_shared_timed_mutex 201402 +# endif #endif #endif // BUTL_FT_SHARED_MUTEX -- cgit v1.1