]>
Commit | Line | Data |
---|---|---|
e1ee4b85 A |
1 | /*! |
2 | * @header | |
3 | * TAPI-specific header to ensure project builds properly in installapi. | |
4 | */ | |
5 | #ifndef __DARWIN_TAPI_H | |
6 | #define __DARWIN_TAPI_H | |
7 | ||
8 | #if !DARWIN_TAPI | |
9 | #error "This header is for the installapi action only" | |
10 | #endif | |
11 | ||
12 | #include <os/base.h> | |
13 | #include <os/availability.h> | |
14 | #include <mach/kern_return.h> | |
15 | #include <mach/port.h> | |
16 | #include <mach/mach_port.h> | |
17 | ||
18 | #undef os_assert_mach | |
19 | #undef os_assert_mach_port_status | |
20 | ||
21 | // Duplicate declarations to make TAPI happy. | |
22 | API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0)) | |
23 | OS_EXPORT OS_NONNULL1 | |
24 | void | |
25 | os_assert_mach(const char *op, kern_return_t kr); | |
26 | ||
27 | API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0)) | |
28 | OS_EXPORT | |
29 | void | |
30 | os_assert_mach_port_status(const char *desc, mach_port_t p, | |
31 | mach_port_status_t *expected); | |
32 | ||
33 | // TAPI and the compiler don't agree about header search paths, so if TAPI found | |
34 | // our header in the SDK, and we've increased the API version, help it out. | |
35 | #if DARWIN_API_VERSION < 20170407 | |
36 | #define DARWIN_API_AVAILABLE_20170407 | |
37 | #endif | |
38 | ||
39 | #if DARWIN_API_VERSION < 20180727 | |
40 | #define DARWIN_API_AVAILABLE_20180727 | |
41 | #endif | |
42 | ||
43 | #if DARWIN_API_VERSION < 20181020 | |
44 | #define DARWIN_API_AVAILABLE_20181020 | |
45 | #endif | |
46 | ||
47 | #if DARWIN_API_VERSION < 20190830 | |
48 | #define DARWIN_API_AVAILABLE_20190830 | |
49 | #endif | |
50 | ||
51 | #if DARWIN_API_VERSION < 20191015 | |
52 | #define DARWIN_API_AVAILABLE_20191015 | |
53 | #endif | |
54 | ||
55 | #if !defined(LINKER_SET_ENTRY) | |
56 | #define LINKER_SET_ENTRY(_x, _y) | |
57 | #endif | |
58 | ||
59 | #endif // __DARWIN_TAPI_H |