1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
10 #define _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
12 #if defined(__APPLE__)
14 # if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
15 # if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500
16 # define _LIBCPP_USE_ULOCK
18 # elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
19 # if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000
20 # define _LIBCPP_USE_ULOCK
22 # elif defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__)
23 # if __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000
24 # define _LIBCPP_USE_ULOCK
26 # elif defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__)
27 # if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000
28 # define _LIBCPP_USE_ULOCK
30 # endif // __ENVIRONMENT_.*_VERSION_MIN_REQUIRED__
34 #endif // _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H