xref: /freebsd/contrib/llvm-project/libcxx/src/include/apple_availability.h (revision 9f23cbd6cae82fd77edfad7173432fa8dccd0a95)
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
10 #define _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
11 
12 #if defined(__APPLE__)
13 
14 #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
15 #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101300
16 #define _LIBCPP_USE_UTIMENSAT
17 #endif
18 #elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
19 #if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110000
20 #define _LIBCPP_USE_UTIMENSAT
21 #endif
22 #elif defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__)
23 #if __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 110000
24 #define _LIBCPP_USE_UTIMENSAT
25 #endif
26 #elif defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__)
27 #if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 40000
28 #define _LIBCPP_USE_UTIMENSAT
29 #endif
30 #endif // __ENVIRONMENT_.*_VERSION_MIN_REQUIRED__
31 
32 #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
33 #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500
34 #define _LIBCPP_USE_ULOCK
35 #endif
36 #elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
37 #if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000
38 #define _LIBCPP_USE_ULOCK
39 #endif
40 #elif defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__)
41 #if __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000
42 #define _LIBCPP_USE_ULOCK
43 #endif
44 #elif defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__)
45 #if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000
46 #define _LIBCPP_USE_ULOCK
47 #endif
48 #endif // __ENVIRONMENT_.*_VERSION_MIN_REQUIRED__
49 
50 #endif // __APPLE__
51 
52 #endif // _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
53