| 1 | #ifndef __XPC_AVAILABILITY_H__ |
| 2 | #define __XPC_AVAILABILITY_H__ |
| 3 | |
| 4 | #include <Availability.h> |
| 5 | #include <sys/cdefs.h> |
| 6 | |
| 7 | __BEGIN_DECLS |
| 8 | |
| 9 | // Certain parts of the project use all the project's headers but have to build |
| 10 | // against newer OSX SDKs than ebuild uses -- liblaunch_host being the example. |
| 11 | // So we need to define these. |
| 12 | #ifndef __MAC_10_16 |
| 13 | #define __MAC_10_16 101600 |
| 14 | #endif // __MAC_10_16 |
| 15 | |
| 16 | #ifndef __MAC_10_15 |
| 17 | #define __MAC_10_15 101500 |
| 18 | #define __AVAILABILITY_INTERNAL__MAC_10_15 \ |
| 19 | __attribute__((availability(macosx, introduced=10.15))) |
| 20 | #endif // __MAC_10_15 |
| 21 | |
| 22 | #ifndef __MAC_10_14 |
| 23 | #define __MAC_10_14 101400 |
| 24 | #define __AVAILABILITY_INTERNAL__MAC_10_14 \ |
| 25 | __attribute__((availability(macosx, introduced=10.14))) |
| 26 | #endif // __MAC_10_14 |
| 27 | |
| 28 | #ifndef __MAC_10_13 |
| 29 | #define __MAC_10_13 101300 |
| 30 | #define __AVAILABILITY_INTERNAL__MAC_10_13 \ |
| 31 | 	__attribute__((availability(macosx, introduced=10.13))) |
| 32 | #endif // __MAC_10_13 |
| 33 | |
| 34 | #ifndef __MAC_10_12 |
| 35 | #define __MAC_10_12 101200 |
| 36 | #define __AVAILABILITY_INTERNAL__MAC_10_12 \ |
| 37 | 	__attribute__((availability(macosx, introduced=10.12))) |
| 38 | #endif // __MAC_10_12 |
| 39 | |
| 40 | #ifndef __MAC_10_11 |
| 41 | #define __MAC_10_11 101100 |
| 42 | #define __AVAILABILITY_INTERNAL__MAC_10_11 \ |
| 43 | 	__attribute__((availability(macosx, introduced=10.11))) |
| 44 | #endif // __MAC_10_11 |
| 45 | |
| 46 | #ifndef __MAC_12_0 |
| 47 | #define __MAC_12_0 120000 |
| 48 | #define __AVAILABILITY_INTERNAL__MAC_12_0 \ |
| 49 | 	__attribute__((availability(macosx, introduced=12.0))) |
| 50 | #endif // __MAC_12_0 |
| 51 | |
| 52 | #ifndef __MAC_13_3 |
| 53 | #define __MAC_13_3 130300 |
| 54 | #endif // __MAC_13_3 |
| 55 | |
| 56 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 |
| 57 | #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 |
| 58 | #endif // __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 |
| 59 | |
| 60 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 |
| 61 | #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 |
| 62 | #endif // __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 |
| 63 | |
| 64 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 |
| 65 | #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 |
| 66 | #endif // __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 |
| 67 | |
| 68 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 |
| 69 | #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 |
| 70 | #endif // __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 |
| 71 | |
| 72 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 |
| 73 | #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 |
| 74 | #endif // __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 |
| 75 | |
| 76 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 |
| 77 | #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 |
| 78 | #endif // __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 |
| 79 | |
| 80 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 |
| 81 | #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 |
| 82 | #endif // __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 |
| 83 | |
| 84 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 |
| 85 | #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 |
| 86 | #endif // __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 |
| 87 | |
| 88 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 |
| 89 | #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 |
| 90 | #endif // __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 |
| 91 | |
| 92 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 |
| 93 | #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 |
| 94 | #endif // __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 |
| 95 | |
| 96 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 |
| 97 | #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 |
| 98 | #endif // __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 |
| 99 | |
| 100 | #if __has_include(<simulator_host.h>) |
| 101 | __END_DECLS |
| 102 | #include <simulator_host.h> |
| 103 | __BEGIN_DECLS |
| 104 | #else // __has_include(<simulator_host.h>) |
| 105 | #ifndef IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED |
| 106 | #define IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED 999999 |
| 107 | #endif // IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED |
| 108 | #endif // __has_include(<simulator_host.h>) |
| 109 | |
| 110 | #ifndef __WATCHOS_UNAVAILABLE |
| 111 | #define __WATCHOS_UNAVAILABLE |
| 112 | #endif |
| 113 | |
| 114 | #ifndef __TVOS_UNAVAILABLE |
| 115 | #define __TVOS_UNAVAILABLE |
| 116 | #endif |
| 117 | |
| 118 | // simulator host-side bits build against SDKs not having __*_AVAILABLE() yet |
| 119 | #ifndef __OSX_AVAILABLE |
| 120 | #define __OSX_AVAILABLE(...) |
| 121 | #endif |
| 122 | |
| 123 | #ifndef __IOS_AVAILABLE |
| 124 | #define __IOS_AVAILABLE(...) |
| 125 | #endif |
| 126 | |
| 127 | #ifndef __TVOS_AVAILABLE |
| 128 | #define __TVOS_AVAILABLE(...) |
| 129 | #endif |
| 130 | |
| 131 | #ifndef __WATCHOS_AVAILABLE |
| 132 | #define __WATCHOS_AVAILABLE(...) |
| 133 | #endif |
| 134 | |
| 135 | #ifndef __API_AVAILABLE |
| 136 | #define __API_AVAILABLE(...) |
| 137 | #endif |
| 138 | |
| 139 | __END_DECLS |
| 140 | |
| 141 | #endif // __XPC_AVAILABILITY_H__ |