1 | /* DO NOT EDIT THIS FILE. |
---|
2 | |
---|
3 | It has been auto-edited by fixincludes from: |
---|
4 | |
---|
5 | "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AvailabilityInternal.h" |
---|
6 | |
---|
7 | This had to be done to correct non-standard usages in the |
---|
8 | original, manufacturer supplied header file. */ |
---|
9 | |
---|
10 | /* |
---|
11 | * Copyright (c) 2007-2016 by Apple Inc.. All rights reserved. |
---|
12 | * |
---|
13 | * @APPLE_LICENSE_HEADER_START@ |
---|
14 | * |
---|
15 | * This file contains Original Code and/or Modifications of Original Code |
---|
16 | * as defined in and that are subject to the Apple Public Source License |
---|
17 | * Version 2.0 (the 'License'). You may not use this file except in |
---|
18 | * compliance with the License. Please obtain a copy of the License at |
---|
19 | * http://www.opensource.apple.com/apsl/ and read it before using this |
---|
20 | * file. |
---|
21 | * |
---|
22 | * The Original Code and all software distributed under the License are |
---|
23 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER |
---|
24 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
---|
25 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, |
---|
26 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
---|
27 | * Please see the License for the specific language governing rights and |
---|
28 | * limitations under the License. |
---|
29 | * |
---|
30 | * @APPLE_LICENSE_HEADER_END@ |
---|
31 | */ |
---|
32 | |
---|
33 | /* |
---|
34 | File: AvailabilityInternal.h |
---|
35 | |
---|
36 | Contains: implementation details of __OSX_AVAILABLE_* macros from <Availability.h> |
---|
37 | |
---|
38 | */ |
---|
39 | #ifndef __AVAILABILITY_INTERNAL__ |
---|
40 | #define __AVAILABILITY_INTERNAL__ |
---|
41 | |
---|
42 | #if __has_include(<AvailabilityInternalPrivate.h>) |
---|
43 | #include <AvailabilityInternalPrivate.h> |
---|
44 | #endif |
---|
45 | |
---|
46 | #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED |
---|
47 | #if defined(__has_builtin) && __has_builtin(__is_target_os) |
---|
48 | #if __is_target_os(macos) |
---|
49 | #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ |
---|
50 | #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_4 |
---|
51 | #endif |
---|
52 | #elif __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ |
---|
53 | #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ |
---|
54 | #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_4 |
---|
55 | #endif /* __has_builtin(__is_target_os) && __is_target_os(macos) */ |
---|
56 | #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */ |
---|
57 | |
---|
58 | #ifndef __IPHONE_OS_VERSION_MIN_REQUIRED |
---|
59 | #if defined(__has_builtin) && __has_builtin(__is_target_os) |
---|
60 | #if __is_target_os(ios) |
---|
61 | #define __IPHONE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ |
---|
62 | #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_17_4 |
---|
63 | #endif |
---|
64 | #elif __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ |
---|
65 | #define __IPHONE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ |
---|
66 | #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_17_4 |
---|
67 | #endif /* __has_builtin(__is_target_os) && __is_target_os(ios) */ |
---|
68 | #endif /* __IPHONE_OS_VERSION_MIN_REQUIRED */ |
---|
69 | |
---|
70 | #ifndef __WATCH_OS_VERSION_MIN_REQUIRED |
---|
71 | #if defined(__has_builtin) && __has_builtin(__is_target_os) |
---|
72 | #if __is_target_os(watchos) |
---|
73 | #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ |
---|
74 | #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_10_4 |
---|
75 | /* for compatibility with existing code. New code should use platform specific checks */ |
---|
76 | #define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_9_0 |
---|
77 | #endif |
---|
78 | #elif __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ |
---|
79 | #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ |
---|
80 | #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_10_4 |
---|
81 | /* for compatibility with existing code. New code should use platform specific checks */ |
---|
82 | #define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_9_0 |
---|
83 | #endif /* __has_builtin(__is_target_os) && __is_target_os(watchos) */ |
---|
84 | #endif /* __WATCH_OS_VERSION_MIN_REQUIRED */ |
---|
85 | |
---|
86 | #ifndef __TV_OS_VERSION_MIN_REQUIRED |
---|
87 | #if defined(__has_builtin) && __has_builtin(__is_target_os) |
---|
88 | #if __is_target_os(tvos) |
---|
89 | #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ |
---|
90 | #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_17_4 |
---|
91 | /* for compatibility with existing code. New code should use platform specific checks */ |
---|
92 | #define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_9_0 |
---|
93 | #endif |
---|
94 | #elif __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ |
---|
95 | #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ |
---|
96 | #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_17_4 |
---|
97 | /* for compatibility with existing code. New code should use platform specific checks */ |
---|
98 | #define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_9_0 |
---|
99 | #endif /* __has_builtin(__is_target_os) && __is_target_os(tvos) */ |
---|
100 | #endif /* __TV_OS_VERSION_MIN_REQUIRED */ |
---|
101 | |
---|
102 | #ifndef __BRIDGE_OS_VERSION_MIN_REQUIRED |
---|
103 | #if defined(__has_builtin) && __has_builtin(__is_target_os) |
---|
104 | #if __is_target_os(bridgeos) |
---|
105 | #define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ |
---|
106 | #define __BRIDGE_OS_VERSION_MAX_ALLOWED __BRIDGEOS_8_4 |
---|
107 | /* for compatibility with existing code. New code should use platform specific checks */ |
---|
108 | #define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_11_0 |
---|
109 | #endif |
---|
110 | #endif |
---|
111 | #endif /* __BRIDGE_OS_VERSION_MIN_REQUIRED */ |
---|
112 | |
---|
113 | #ifndef __DRIVERKIT_VERSION_MIN_REQUIRED |
---|
114 | #if defined(__has_builtin) && __has_builtin(__is_target_os) |
---|
115 | #if __is_target_os(driverkit) |
---|
116 | #define __DRIVERKIT_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ |
---|
117 | #define __DRIVERKIT_VERSION_MAX_ALLOWED __DRIVERKIT_23_4 |
---|
118 | #endif |
---|
119 | #endif /* __has_builtin(__is_target_os) && __is_target_os(driverkit) */ |
---|
120 | #endif /* __DRIVERKIT_VERSION_MIN_REQUIRED */ |
---|
121 | |
---|
122 | #ifndef __VISION_OS_VERSION_MIN_REQUIRED |
---|
123 | #if defined(__has_builtin) && __has_builtin(__is_target_os) |
---|
124 | #if __is_target_os(visionos) |
---|
125 | #define __VISION_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ |
---|
126 | #define __VISION_OS_VERSION_MAX_ALLOWED __VISIONOS_1_1 |
---|
127 | /* for compatibility with existing code. New code should use platform specific checks */ |
---|
128 | #define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_17_1 |
---|
129 | #endif |
---|
130 | #endif /* __has_builtin(__is_target_os) && __is_target_os(visionos) */ |
---|
131 | #endif /* __VISION_OS_VERSION_MIN_REQUIRED */ |
---|
132 | |
---|
133 | |
---|
134 | //FIXME: Workaround for rdar://116062344 |
---|
135 | #ifndef __VISION_OS_VERSION_MIN_REQUIRED |
---|
136 | #if defined(__has_builtin) && __has_builtin(__is_target_os) |
---|
137 | #if __is_target_os(xros) |
---|
138 | #define __VISION_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ |
---|
139 | // Hardcoded these since until compiler fix for rdar://116062344 will land |
---|
140 | #if defined(__VISIONOS_2_0) |
---|
141 | #define __VISION_OS_VERSION_MAX_ALLOWED __VISIONOS_2_0 |
---|
142 | #elif defined(__VISIONOS_1_1) |
---|
143 | #define __VISION_OS_VERSION_MAX_ALLOWED __VISIONOS_1_1 |
---|
144 | #elif defined(__VISIONOS_1_0) |
---|
145 | #define __VISION_OS_VERSION_MAX_ALLOWED __VISIONOS_1_0 |
---|
146 | #endif |
---|
147 | /* for compatibility with existing code. New code should use platform specific checks */ |
---|
148 | #define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_17_1 |
---|
149 | #endif |
---|
150 | #endif /* __has_builtin(__is_target_os) && __is_target_os(visionos) */ |
---|
151 | #endif /* __VISION_OS_VERSION_MIN_REQUIRED */ |
---|
152 | |
---|
153 | #ifndef __OPEN_SOURCE__ |
---|
154 | |
---|
155 | #endif /* __OPEN_SOURCE__ */ |
---|
156 | |
---|
157 | #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED |
---|
158 | /* make sure a default max version is set */ |
---|
159 | #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED |
---|
160 | #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_17_0 |
---|
161 | #endif |
---|
162 | /* make sure a valid min is set */ |
---|
163 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0 |
---|
164 | #undef __IPHONE_OS_VERSION_MIN_REQUIRED |
---|
165 | #define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_2_0 |
---|
166 | #endif |
---|
167 | #endif |
---|
168 | |
---|
169 | #define __AVAILABILITY_INTERNAL_DEPRECATED __attribute__((deprecated)) |
---|
170 | #ifdef __has_feature |
---|
171 | #if __has_feature(attribute_deprecated_with_message) |
---|
172 | #define __AVAILABILITY_INTERNAL_DEPRECATED_MSG(_msg) __attribute__((deprecated(_msg))) |
---|
173 | #else |
---|
174 | #define __AVAILABILITY_INTERNAL_DEPRECATED_MSG(_msg) __attribute__((deprecated)) |
---|
175 | #endif |
---|
176 | #elif defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))) |
---|
177 | #define __AVAILABILITY_INTERNAL_DEPRECATED_MSG(_msg) __attribute__((deprecated(_msg))) |
---|
178 | #else |
---|
179 | #define __AVAILABILITY_INTERNAL_DEPRECATED_MSG(_msg) __attribute__((deprecated)) |
---|
180 | #endif |
---|
181 | #define __AVAILABILITY_INTERNAL_UNAVAILABLE __attribute__((unavailable)) |
---|
182 | #define __AVAILABILITY_INTERNAL_WEAK_IMPORT __attribute__((weak_import)) |
---|
183 | #define __AVAILABILITY_INTERNAL_REGULAR |
---|
184 | |
---|
185 | #include <AvailabilityInternalLegacy.h> |
---|
186 | |
---|
187 | #if defined(__has_feature) && defined(__has_attribute) |
---|
188 | #if __has_attribute(availability) |
---|
189 | #define __API_AVAILABLE_PLATFORM_macos(x) macos,introduced=x |
---|
190 | #define __API_DEPRECATED_PLATFORM_macos(x,y) macos,introduced=x,deprecated=y |
---|
191 | #define __API_UNAVAILABLE_PLATFORM_macos macos,unavailable |
---|
192 | #define __API_AVAILABLE_PLATFORM_macosx(x) macos,introduced=x |
---|
193 | #define __API_DEPRECATED_PLATFORM_macosx(x,y) macos,introduced=x,deprecated=y |
---|
194 | #define __API_UNAVAILABLE_PLATFORM_macosx macos,unavailable |
---|
195 | #define __API_AVAILABLE_PLATFORM_ios(x) ios,introduced=x |
---|
196 | #define __API_DEPRECATED_PLATFORM_ios(x,y) ios,introduced=x,deprecated=y |
---|
197 | #define __API_UNAVAILABLE_PLATFORM_ios ios,unavailable |
---|
198 | #define __API_AVAILABLE_PLATFORM_macCatalyst(x) macCatalyst,introduced=x |
---|
199 | #define __API_DEPRECATED_PLATFORM_macCatalyst(x,y) macCatalyst,introduced=x,deprecated=y |
---|
200 | #define __API_UNAVAILABLE_PLATFORM_macCatalyst macCatalyst,unavailable |
---|
201 | #define __API_AVAILABLE_PLATFORM_macCatalyst(x) macCatalyst,introduced=x |
---|
202 | #define __API_DEPRECATED_PLATFORM_macCatalyst(x,y) macCatalyst,introduced=x,deprecated=y |
---|
203 | #define __API_UNAVAILABLE_PLATFORM_macCatalyst macCatalyst,unavailable |
---|
204 | #define __API_AVAILABLE_PLATFORM_watchos(x) watchos,introduced=x |
---|
205 | #define __API_DEPRECATED_PLATFORM_watchos(x,y) watchos,introduced=x,deprecated=y |
---|
206 | #define __API_UNAVAILABLE_PLATFORM_watchos watchos,unavailable |
---|
207 | #define __API_AVAILABLE_PLATFORM_tvos(x) tvos,introduced=x |
---|
208 | #define __API_DEPRECATED_PLATFORM_tvos(x,y) tvos,introduced=x,deprecated=y |
---|
209 | #define __API_UNAVAILABLE_PLATFORM_tvos tvos,unavailable |
---|
210 | |
---|
211 | |
---|
212 | |
---|
213 | #define __API_AVAILABLE_PLATFORM_driverkit(x) driverkit,introduced=x |
---|
214 | #define __API_DEPRECATED_PLATFORM_driverkit(x,y) driverkit,introduced=x,deprecated=y |
---|
215 | #define __API_UNAVAILABLE_PLATFORM_driverkit driverkit,unavailable |
---|
216 | #define __API_AVAILABLE_PLATFORM_visionos(x) visionos,introduced=x |
---|
217 | #define __API_DEPRECATED_PLATFORM_visionos(x,y) visionos,introduced=x,deprecated=y |
---|
218 | #define __API_UNAVAILABLE_PLATFORM_visionos visionos,unavailable |
---|
219 | #define __API_AVAILABLE_PLATFORM_xros(x) visionos,introduced=x |
---|
220 | #define __API_DEPRECATED_PLATFORM_xros(x,y) visionos,introduced=x,deprecated=y |
---|
221 | #define __API_UNAVAILABLE_PLATFORM_xros visionos,unavailable |
---|
222 | |
---|
223 | #endif /* __has_attribute(availability) */ |
---|
224 | #endif /* defined(__has_feature) && defined(__has_attribute) */ |
---|
225 | |
---|
226 | #if defined(__has_feature) && defined(__has_attribute) |
---|
227 | #if __has_attribute(availability) |
---|
228 | #define __API_APPLY_TO any(record, enum, enum_constant, function, objc_method, objc_category, objc_protocol, objc_interface, objc_property, type_alias, variable, field) |
---|
229 | #define __API_RANGE_STRINGIFY(x) __API_RANGE_STRINGIFY2(x) |
---|
230 | #define __API_RANGE_STRINGIFY2(x) #x |
---|
231 | #endif /* __has_attribute(availability) */ |
---|
232 | #endif /* defined(__has_feature) && defined(__has_attribute) */ |
---|
233 | /* |
---|
234 | Macros for defining which versions/platform a given symbol can be used. |
---|
235 | |
---|
236 | @see http://clang.llvm.org/docs/AttributeReference.html#availability |
---|
237 | */ |
---|
238 | |
---|
239 | #if defined(__has_feature) && defined(__has_attribute) |
---|
240 | #if __has_attribute(availability) |
---|
241 | |
---|
242 | |
---|
243 | |
---|
244 | #if defined(__has_attribute) |
---|
245 | #if __has_attribute(availability) |
---|
246 | #define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x))) |
---|
247 | #else |
---|
248 | #define __API_A(x) |
---|
249 | #endif |
---|
250 | #else |
---|
251 | #define __API_A(x) |
---|
252 | #endif |
---|
253 | |
---|
254 | #define __API_AVAILABLE0(arg0) __API_A(arg0) |
---|
255 | #define __API_AVAILABLE1(arg0,arg1) __API_A(arg0) __API_A(arg1) |
---|
256 | #define __API_AVAILABLE2(arg0,arg1,arg2) __API_A(arg0) __API_A(arg1) __API_A(arg2) |
---|
257 | #define __API_AVAILABLE3(arg0,arg1,arg2,arg3) __API_A(arg0) __API_A(arg1) __API_A(arg2) __API_A(arg3) |
---|
258 | #define __API_AVAILABLE4(arg0,arg1,arg2,arg3,arg4) __API_A(arg0) __API_A(arg1) __API_A(arg2) __API_A(arg3) __API_A(arg4) |
---|
259 | #define __API_AVAILABLE5(arg0,arg1,arg2,arg3,arg4,arg5) __API_A(arg0) __API_A(arg1) __API_A(arg2) __API_A(arg3) __API_A(arg4) __API_A(arg5) |
---|
260 | #define __API_AVAILABLE6(arg0,arg1,arg2,arg3,arg4,arg5,arg6) __API_A(arg0) __API_A(arg1) __API_A(arg2) __API_A(arg3) __API_A(arg4) __API_A(arg5) __API_A(arg6) |
---|
261 | #define __API_AVAILABLE7(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7) __API_A(arg0) __API_A(arg1) __API_A(arg2) __API_A(arg3) __API_A(arg4) __API_A(arg5) __API_A(arg6) __API_A(arg7) |
---|
262 | #define __API_AVAILABLE8(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) __API_A(arg0) __API_A(arg1) __API_A(arg2) __API_A(arg3) __API_A(arg4) __API_A(arg5) __API_A(arg6) __API_A(arg7) __API_A(arg8) |
---|
263 | #define __API_AVAILABLE_GET_MACRO(_0,_1,_2,_3,_4,_5,_6,_7,_8,NAME,...) NAME |
---|
264 | |
---|
265 | #define __API_A_BEGIN(x) _Pragma(__API_RANGE_STRINGIFY (clang attribute (__attribute__((availability(__API_AVAILABLE_PLATFORM_##x))), apply_to = __API_APPLY_TO))) |
---|
266 | |
---|
267 | #define __API_AVAILABLE_BEGIN0(arg0) __API_A_BEGIN(arg0) |
---|
268 | #define __API_AVAILABLE_BEGIN1(arg0,arg1) __API_A_BEGIN(arg0) __API_A_BEGIN(arg1) |
---|
269 | #define __API_AVAILABLE_BEGIN2(arg0,arg1,arg2) __API_A_BEGIN(arg0) __API_A_BEGIN(arg1) __API_A_BEGIN(arg2) |
---|
270 | #define __API_AVAILABLE_BEGIN3(arg0,arg1,arg2,arg3) __API_A_BEGIN(arg0) __API_A_BEGIN(arg1) __API_A_BEGIN(arg2) __API_A_BEGIN(arg3) |
---|
271 | #define __API_AVAILABLE_BEGIN4(arg0,arg1,arg2,arg3,arg4) __API_A_BEGIN(arg0) __API_A_BEGIN(arg1) __API_A_BEGIN(arg2) __API_A_BEGIN(arg3) __API_A_BEGIN(arg4) |
---|
272 | #define __API_AVAILABLE_BEGIN5(arg0,arg1,arg2,arg3,arg4,arg5) __API_A_BEGIN(arg0) __API_A_BEGIN(arg1) __API_A_BEGIN(arg2) __API_A_BEGIN(arg3) __API_A_BEGIN(arg4) __API_A_BEGIN(arg5) |
---|
273 | #define __API_AVAILABLE_BEGIN6(arg0,arg1,arg2,arg3,arg4,arg5,arg6) __API_A_BEGIN(arg0) __API_A_BEGIN(arg1) __API_A_BEGIN(arg2) __API_A_BEGIN(arg3) __API_A_BEGIN(arg4) __API_A_BEGIN(arg5) __API_A_BEGIN(arg6) |
---|
274 | #define __API_AVAILABLE_BEGIN7(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7) __API_A_BEGIN(arg0) __API_A_BEGIN(arg1) __API_A_BEGIN(arg2) __API_A_BEGIN(arg3) __API_A_BEGIN(arg4) __API_A_BEGIN(arg5) __API_A_BEGIN(arg6) __API_A_BEGIN(arg7) |
---|
275 | #define __API_AVAILABLE_BEGIN8(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) __API_A_BEGIN(arg0) __API_A_BEGIN(arg1) __API_A_BEGIN(arg2) __API_A_BEGIN(arg3) __API_A_BEGIN(arg4) __API_A_BEGIN(arg5) __API_A_BEGIN(arg6) __API_A_BEGIN(arg7) __API_A_BEGIN(arg8) |
---|
276 | #define __API_AVAILABLE_BEGIN_GET_MACRO(_0,_1,_2,_3,_4,_5,_6,_7,_8,NAME,...) NAME |
---|
277 | |
---|
278 | |
---|
279 | |
---|
280 | #if defined(__has_attribute) |
---|
281 | #if __has_attribute(availability) |
---|
282 | #define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg))) |
---|
283 | #else |
---|
284 | #define __API_D(msg,x) |
---|
285 | #endif |
---|
286 | #else |
---|
287 | #define __API_D(msg,x) |
---|
288 | #endif |
---|
289 | |
---|
290 | #define __API_DEPRECATED_MSG0(msg,arg0) __API_D(msg,arg0) |
---|
291 | #define __API_DEPRECATED_MSG1(msg,arg0,arg1) __API_D(msg,arg0) __API_D(msg,arg1) |
---|
292 | #define __API_DEPRECATED_MSG2(msg,arg0,arg1,arg2) __API_D(msg,arg0) __API_D(msg,arg1) __API_D(msg,arg2) |
---|
293 | #define __API_DEPRECATED_MSG3(msg,arg0,arg1,arg2,arg3) __API_D(msg,arg0) __API_D(msg,arg1) __API_D(msg,arg2) __API_D(msg,arg3) |
---|
294 | #define __API_DEPRECATED_MSG4(msg,arg0,arg1,arg2,arg3,arg4) __API_D(msg,arg0) __API_D(msg,arg1) __API_D(msg,arg2) __API_D(msg,arg3) __API_D(msg,arg4) |
---|
295 | #define __API_DEPRECATED_MSG5(msg,arg0,arg1,arg2,arg3,arg4,arg5) __API_D(msg,arg0) __API_D(msg,arg1) __API_D(msg,arg2) __API_D(msg,arg3) __API_D(msg,arg4) __API_D(msg,arg5) |
---|
296 | #define __API_DEPRECATED_MSG6(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6) __API_D(msg,arg0) __API_D(msg,arg1) __API_D(msg,arg2) __API_D(msg,arg3) __API_D(msg,arg4) __API_D(msg,arg5) __API_D(msg,arg6) |
---|
297 | #define __API_DEPRECATED_MSG7(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7) __API_D(msg,arg0) __API_D(msg,arg1) __API_D(msg,arg2) __API_D(msg,arg3) __API_D(msg,arg4) __API_D(msg,arg5) __API_D(msg,arg6) __API_D(msg,arg7) |
---|
298 | #define __API_DEPRECATED_MSG8(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) __API_D(msg,arg0) __API_D(msg,arg1) __API_D(msg,arg2) __API_D(msg,arg3) __API_D(msg,arg4) __API_D(msg,arg5) __API_D(msg,arg6) __API_D(msg,arg7) __API_D(msg,arg8) |
---|
299 | #define __API_DEPRECATED_MSG_GET_MACRO(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,NAME,...) NAME |
---|
300 | |
---|
301 | #define __API_D_BEGIN(msg, x) _Pragma(__API_RANGE_STRINGIFY (clang attribute (__attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg))), apply_to = __API_APPLY_TO))) |
---|
302 | |
---|
303 | #define __API_DEPRECATED_BEGIN0(msg,arg0) __API_D_BEGIN(msg,arg0) |
---|
304 | #define __API_DEPRECATED_BEGIN1(msg,arg0,arg1) __API_D_BEGIN(msg,arg0) __API_D_BEGIN(msg,arg1) |
---|
305 | #define __API_DEPRECATED_BEGIN2(msg,arg0,arg1,arg2) __API_D_BEGIN(msg,arg0) __API_D_BEGIN(msg,arg1) __API_D_BEGIN(msg,arg2) |
---|
306 | #define __API_DEPRECATED_BEGIN3(msg,arg0,arg1,arg2,arg3) __API_D_BEGIN(msg,arg0) __API_D_BEGIN(msg,arg1) __API_D_BEGIN(msg,arg2) __API_D_BEGIN(msg,arg3) |
---|
307 | #define __API_DEPRECATED_BEGIN4(msg,arg0,arg1,arg2,arg3,arg4) __API_D_BEGIN(msg,arg0) __API_D_BEGIN(msg,arg1) __API_D_BEGIN(msg,arg2) __API_D_BEGIN(msg,arg3) __API_D_BEGIN(msg,arg4) |
---|
308 | #define __API_DEPRECATED_BEGIN5(msg,arg0,arg1,arg2,arg3,arg4,arg5) __API_D_BEGIN(msg,arg0) __API_D_BEGIN(msg,arg1) __API_D_BEGIN(msg,arg2) __API_D_BEGIN(msg,arg3) __API_D_BEGIN(msg,arg4) __API_D_BEGIN(msg,arg5) |
---|
309 | #define __API_DEPRECATED_BEGIN6(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6) __API_D_BEGIN(msg,arg0) __API_D_BEGIN(msg,arg1) __API_D_BEGIN(msg,arg2) __API_D_BEGIN(msg,arg3) __API_D_BEGIN(msg,arg4) __API_D_BEGIN(msg,arg5) __API_D_BEGIN(msg,arg6) |
---|
310 | #define __API_DEPRECATED_BEGIN7(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7) __API_D_BEGIN(msg,arg0) __API_D_BEGIN(msg,arg1) __API_D_BEGIN(msg,arg2) __API_D_BEGIN(msg,arg3) __API_D_BEGIN(msg,arg4) __API_D_BEGIN(msg,arg5) __API_D_BEGIN(msg,arg6) __API_D_BEGIN(msg,arg7) |
---|
311 | #define __API_DEPRECATED_BEGIN8(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) __API_D_BEGIN(msg,arg0) __API_D_BEGIN(msg,arg1) __API_D_BEGIN(msg,arg2) __API_D_BEGIN(msg,arg3) __API_D_BEGIN(msg,arg4) __API_D_BEGIN(msg,arg5) __API_D_BEGIN(msg,arg6) __API_D_BEGIN(msg,arg7) __API_D_BEGIN(msg,arg8) |
---|
312 | #define __API_DEPRECATED_BEGIN_GET_MACRO(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,NAME,...) NAME |
---|
313 | |
---|
314 | #if __has_feature(attribute_availability_with_replacement) |
---|
315 | #define __API_R(rep,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,replacement=rep))) |
---|
316 | #else |
---|
317 | #define __API_R(rep,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x))) |
---|
318 | #endif |
---|
319 | |
---|
320 | #define __API_DEPRECATED_REP0(msg,arg0) __API_R(msg,arg0) |
---|
321 | #define __API_DEPRECATED_REP1(msg,arg0,arg1) __API_R(msg,arg0) __API_R(msg,arg1) |
---|
322 | #define __API_DEPRECATED_REP2(msg,arg0,arg1,arg2) __API_R(msg,arg0) __API_R(msg,arg1) __API_R(msg,arg2) |
---|
323 | #define __API_DEPRECATED_REP3(msg,arg0,arg1,arg2,arg3) __API_R(msg,arg0) __API_R(msg,arg1) __API_R(msg,arg2) __API_R(msg,arg3) |
---|
324 | #define __API_DEPRECATED_REP4(msg,arg0,arg1,arg2,arg3,arg4) __API_R(msg,arg0) __API_R(msg,arg1) __API_R(msg,arg2) __API_R(msg,arg3) __API_R(msg,arg4) |
---|
325 | #define __API_DEPRECATED_REP5(msg,arg0,arg1,arg2,arg3,arg4,arg5) __API_R(msg,arg0) __API_R(msg,arg1) __API_R(msg,arg2) __API_R(msg,arg3) __API_R(msg,arg4) __API_R(msg,arg5) |
---|
326 | #define __API_DEPRECATED_REP6(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6) __API_R(msg,arg0) __API_R(msg,arg1) __API_R(msg,arg2) __API_R(msg,arg3) __API_R(msg,arg4) __API_R(msg,arg5) __API_R(msg,arg6) |
---|
327 | #define __API_DEPRECATED_REP7(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7) __API_R(msg,arg0) __API_R(msg,arg1) __API_R(msg,arg2) __API_R(msg,arg3) __API_R(msg,arg4) __API_R(msg,arg5) __API_R(msg,arg6) __API_R(msg,arg7) |
---|
328 | #define __API_DEPRECATED_REP8(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) __API_R(msg,arg0) __API_R(msg,arg1) __API_R(msg,arg2) __API_R(msg,arg3) __API_R(msg,arg4) __API_R(msg,arg5) __API_R(msg,arg6) __API_R(msg,arg7) __API_R(msg,arg8) |
---|
329 | #define __API_DEPRECATED_REP_GET_MACRO(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,NAME,...) NAME |
---|
330 | |
---|
331 | #if __has_feature(attribute_availability_with_replacement) |
---|
332 | #define __API_R_BEGIN(rep,x) _Pragma(__API_RANGE_STRINGIFY (clang attribute (__attribute__((availability(__API_DEPRECATED_PLATFORM_##x,replacement=rep))), apply_to = __API_APPLY_TO))) |
---|
333 | #else |
---|
334 | #define __API_R_BEGIN(rep,x) _Pragma(__API_RANGE_STRINGIFY (clang attribute (__attribute__((availability(__API_DEPRECATED_PLATFORM_##x))), apply_to = __API_APPLY_TO))) |
---|
335 | #endif |
---|
336 | |
---|
337 | #define __API_DEPRECATED_BEGIN_REP0(msg,arg0) __API_R_BEGIN(msg,arg0) |
---|
338 | #define __API_DEPRECATED_BEGIN_REP1(msg,arg0,arg1) __API_R_BEGIN(msg,arg0) __API_R_BEGIN(msg,arg1) |
---|
339 | #define __API_DEPRECATED_BEGIN_REP2(msg,arg0,arg1,arg2) __API_R_BEGIN(msg,arg0) __API_R_BEGIN(msg,arg1) __API_R_BEGIN(msg,arg2) |
---|
340 | #define __API_DEPRECATED_BEGIN_REP3(msg,arg0,arg1,arg2,arg3) __API_R_BEGIN(msg,arg0) __API_R_BEGIN(msg,arg1) __API_R_BEGIN(msg,arg2) __API_R_BEGIN(msg,arg3) |
---|
341 | #define __API_DEPRECATED_BEGIN_REP4(msg,arg0,arg1,arg2,arg3,arg4) __API_R_BEGIN(msg,arg0) __API_R_BEGIN(msg,arg1) __API_R_BEGIN(msg,arg2) __API_R_BEGIN(msg,arg3) __API_R_BEGIN(msg,arg4) |
---|
342 | #define __API_DEPRECATED_BEGIN_REP5(msg,arg0,arg1,arg2,arg3,arg4,arg5) __API_R_BEGIN(msg,arg0) __API_R_BEGIN(msg,arg1) __API_R_BEGIN(msg,arg2) __API_R_BEGIN(msg,arg3) __API_R_BEGIN(msg,arg4) __API_R_BEGIN(msg,arg5) |
---|
343 | #define __API_DEPRECATED_BEGIN_REP6(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6) __API_R_BEGIN(msg,arg0) __API_R_BEGIN(msg,arg1) __API_R_BEGIN(msg,arg2) __API_R_BEGIN(msg,arg3) __API_R_BEGIN(msg,arg4) __API_R_BEGIN(msg,arg5) __API_R_BEGIN(msg,arg6) |
---|
344 | #define __API_DEPRECATED_BEGIN_REP7(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7) __API_R_BEGIN(msg,arg0) __API_R_BEGIN(msg,arg1) __API_R_BEGIN(msg,arg2) __API_R_BEGIN(msg,arg3) __API_R_BEGIN(msg,arg4) __API_R_BEGIN(msg,arg5) __API_R_BEGIN(msg,arg6) __API_R_BEGIN(msg,arg7) |
---|
345 | #define __API_DEPRECATED_BEGIN_REP8(msg,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) __API_R_BEGIN(msg,arg0) __API_R_BEGIN(msg,arg1) __API_R_BEGIN(msg,arg2) __API_R_BEGIN(msg,arg3) __API_R_BEGIN(msg,arg4) __API_R_BEGIN(msg,arg5) __API_R_BEGIN(msg,arg6) __API_R_BEGIN(msg,arg7) __API_R_BEGIN(msg,arg8) |
---|
346 | #define __API_DEPRECATED_BEGIN_REP_GET_MACRO(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,NAME,...) NAME |
---|
347 | |
---|
348 | /* |
---|
349 | * API Unavailability |
---|
350 | * Use to specify that an API is unavailable for a particular platform. |
---|
351 | * |
---|
352 | * Example: |
---|
353 | * __API_UNAVAILABLE(macos) |
---|
354 | * __API_UNAVAILABLE(watchos, tvos) |
---|
355 | */ |
---|
356 | |
---|
357 | #if defined(__has_attribute) |
---|
358 | #if __has_attribute(availability) |
---|
359 | #define __API_U(x) __attribute__((availability(__API_UNAVAILABLE_PLATFORM_##x))) |
---|
360 | #else |
---|
361 | #define __API_U(x) |
---|
362 | #endif |
---|
363 | #else |
---|
364 | #define __API_U(x) |
---|
365 | #endif |
---|
366 | |
---|
367 | #define __API_UNAVAILABLE0(arg0) __API_U(arg0) |
---|
368 | #define __API_UNAVAILABLE1(arg0,arg1) __API_U(arg0) __API_U(arg1) |
---|
369 | #define __API_UNAVAILABLE2(arg0,arg1,arg2) __API_U(arg0) __API_U(arg1) __API_U(arg2) |
---|
370 | #define __API_UNAVAILABLE3(arg0,arg1,arg2,arg3) __API_U(arg0) __API_U(arg1) __API_U(arg2) __API_U(arg3) |
---|
371 | #define __API_UNAVAILABLE4(arg0,arg1,arg2,arg3,arg4) __API_U(arg0) __API_U(arg1) __API_U(arg2) __API_U(arg3) __API_U(arg4) |
---|
372 | #define __API_UNAVAILABLE5(arg0,arg1,arg2,arg3,arg4,arg5) __API_U(arg0) __API_U(arg1) __API_U(arg2) __API_U(arg3) __API_U(arg4) __API_U(arg5) |
---|
373 | #define __API_UNAVAILABLE6(arg0,arg1,arg2,arg3,arg4,arg5,arg6) __API_U(arg0) __API_U(arg1) __API_U(arg2) __API_U(arg3) __API_U(arg4) __API_U(arg5) __API_U(arg6) |
---|
374 | #define __API_UNAVAILABLE7(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7) __API_U(arg0) __API_U(arg1) __API_U(arg2) __API_U(arg3) __API_U(arg4) __API_U(arg5) __API_U(arg6) __API_U(arg7) |
---|
375 | #define __API_UNAVAILABLE8(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) __API_U(arg0) __API_U(arg1) __API_U(arg2) __API_U(arg3) __API_U(arg4) __API_U(arg5) __API_U(arg6) __API_U(arg7) __API_U(arg8) |
---|
376 | #define __API_UNAVAILABLE_GET_MACRO(_0,_1,_2,_3,_4,_5,_6,_7,_8,NAME,...) NAME |
---|
377 | |
---|
378 | #define __API_U_BEGIN(x) _Pragma(__API_RANGE_STRINGIFY (clang attribute (__attribute__((availability(__API_UNAVAILABLE_PLATFORM_##x))), apply_to = __API_APPLY_TO))) |
---|
379 | |
---|
380 | #define __API_UNAVAILABLE_BEGIN0(arg0) __API_U_BEGIN(arg0) |
---|
381 | #define __API_UNAVAILABLE_BEGIN1(arg0,arg1) __API_U_BEGIN(arg0) __API_U_BEGIN(arg1) |
---|
382 | #define __API_UNAVAILABLE_BEGIN2(arg0,arg1,arg2) __API_U_BEGIN(arg0) __API_U_BEGIN(arg1) __API_U_BEGIN(arg2) |
---|
383 | #define __API_UNAVAILABLE_BEGIN3(arg0,arg1,arg2,arg3) __API_U_BEGIN(arg0) __API_U_BEGIN(arg1) __API_U_BEGIN(arg2) __API_U_BEGIN(arg3) |
---|
384 | #define __API_UNAVAILABLE_BEGIN4(arg0,arg1,arg2,arg3,arg4) __API_U_BEGIN(arg0) __API_U_BEGIN(arg1) __API_U_BEGIN(arg2) __API_U_BEGIN(arg3) __API_U_BEGIN(arg4) |
---|
385 | #define __API_UNAVAILABLE_BEGIN5(arg0,arg1,arg2,arg3,arg4,arg5) __API_U_BEGIN(arg0) __API_U_BEGIN(arg1) __API_U_BEGIN(arg2) __API_U_BEGIN(arg3) __API_U_BEGIN(arg4) __API_U_BEGIN(arg5) |
---|
386 | #define __API_UNAVAILABLE_BEGIN6(arg0,arg1,arg2,arg3,arg4,arg5,arg6) __API_U_BEGIN(arg0) __API_U_BEGIN(arg1) __API_U_BEGIN(arg2) __API_U_BEGIN(arg3) __API_U_BEGIN(arg4) __API_U_BEGIN(arg5) __API_U_BEGIN(arg6) |
---|
387 | #define __API_UNAVAILABLE_BEGIN7(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7) __API_U_BEGIN(arg0) __API_U_BEGIN(arg1) __API_U_BEGIN(arg2) __API_U_BEGIN(arg3) __API_U_BEGIN(arg4) __API_U_BEGIN(arg5) __API_U_BEGIN(arg6) __API_U_BEGIN(arg7) |
---|
388 | #define __API_UNAVAILABLE_BEGIN8(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) __API_U_BEGIN(arg0) __API_U_BEGIN(arg1) __API_U_BEGIN(arg2) __API_U_BEGIN(arg3) __API_U_BEGIN(arg4) __API_U_BEGIN(arg5) __API_U_BEGIN(arg6) __API_U_BEGIN(arg7) __API_U_BEGIN(arg8) |
---|
389 | #define __API_UNAVAILABLE_BEGIN_GET_MACRO(_0,_1,_2,_3,_4,_5,_6,_7,_8,NAME,...) NAME |
---|
390 | |
---|
391 | #endif /* __has_attribute(availability) */ |
---|
392 | #endif /* #if defined(__has_feature) && defined(__has_attribute) */ |
---|
393 | |
---|
394 | /* |
---|
395 | * Swift compiler version |
---|
396 | * Allows for project-agnostic "epochs" for frameworks imported into Swift via the Clang importer, like #if _compiler_version for Swift |
---|
397 | * Example: |
---|
398 | * |
---|
399 | * #if __swift_compiler_version_at_least(800, 2, 20) |
---|
400 | * - (nonnull NSString *)description; |
---|
401 | * #else |
---|
402 | * - (NSString *)description; |
---|
403 | * #endif |
---|
404 | */ |
---|
405 | |
---|
406 | #ifdef __SWIFT_COMPILER_VERSION |
---|
407 | #define __swift_compiler_version_at_least_impl(X, Y, Z, a, b, ...) \ |
---|
408 | __SWIFT_COMPILER_VERSION >= ((X * UINT64_C(1000) * 1000 * 1000) + (Z * 1000 * 1000) + (a * 1000) + b) |
---|
409 | #define __swift_compiler_version_at_least(...) __swift_compiler_version_at_least_impl(__VA_ARGS__, 0, 0, 0, 0) |
---|
410 | #else |
---|
411 | #define __swift_compiler_version_at_least(...) 1 |
---|
412 | #endif |
---|
413 | |
---|
414 | /* |
---|
415 | * If __SPI_AVAILABLE has not been defined elsewhere, disable it. |
---|
416 | */ |
---|
417 | |
---|
418 | #ifndef __SPI_AVAILABLE |
---|
419 | #define __SPI_AVAILABLE(...) |
---|
420 | #endif |
---|
421 | |
---|
422 | #ifndef __SPI_AVAILABLE_BEGIN |
---|
423 | #define __SPI_AVAILABLE_BEGIN(...) |
---|
424 | #endif |
---|
425 | |
---|
426 | #ifndef __SPI_AVAILABLE_END |
---|
427 | #define __SPI_AVAILABLE_END(...) |
---|
428 | #endif |
---|
429 | |
---|
430 | #endif /* __AVAILABILITY_INTERNAL__ */ |
---|