1//===------------------------ apple_availability.h ------------------------===//
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#ifndef _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
9#define _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
10
11#if defined(__APPLE__)
12
13#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
14#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101300
15#define _LIBCPP_USE_UTIMENSAT
16#endif
17#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
18#if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110000
19#define _LIBCPP_USE_UTIMENSAT
20#endif
21#elif defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__)
22#if __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 110000
23#define _LIBCPP_USE_UTIMENSAT
24#endif
25#elif defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__)
26#if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 40000
27#define _LIBCPP_USE_UTIMENSAT
28#endif
29#endif // __ENVIRONMENT_.*_VERSION_MIN_REQUIRED__
30
31#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
32#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101200
33#define _LIBCPP_USE_CLOCK_GETTIME
34#endif
35#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
36#if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 100000
37#define _LIBCPP_USE_CLOCK_GETTIME
38#endif
39#elif defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__)
40#if __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 100000
41#define _LIBCPP_USE_CLOCK_GETTIME
42#endif
43#elif defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__)
44#if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 30000
45#define _LIBCPP_USE_CLOCK_GETTIME
46#endif
47#endif // __ENVIRONMENT_.*_VERSION_MIN_REQUIRED__
48
49#endif // __APPLE__
50
51#endif // _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
52