| 1 | /* |
| 2 | * Copyright (c) 2008-2017 Apple Inc. All rights reserved. |
| 3 | * |
| 4 | * @APPLE_APACHE_LICENSE_HEADER_START@ |
| 5 | * |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | * you may not use this file except in compliance with the License. |
| 8 | * You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | * See the License for the specific language governing permissions and |
| 16 | * limitations under the License. |
| 17 | * |
| 18 | * @APPLE_APACHE_LICENSE_HEADER_END@ |
| 19 | */ |
| 20 | |
| 21 | #ifndef __OS_AVAILABILITY__ |
| 22 | #define __OS_AVAILABILITY__ |
| 23 | |
| 24 | /* |
| 25 | * API_TO_BE_DEPRECATED is used as a version number in API that will be deprecated |
| 26 | * in an upcoming release. This soft deprecation is an intermediate step before formal |
| 27 | * deprecation to notify developers about the API before compiler warnings are generated. |
| 28 | * You can find all places in your code that use soft deprecated API by redefining the |
| 29 | * value of this macro to your current minimum deployment target, for example: |
| 30 | * (macOS) |
| 31 | * clang -DAPI_TO_BE_DEPRECATED=10.12 <other compiler flags> |
| 32 | * (iOS) |
| 33 | * clang -DAPI_TO_BE_DEPRECATED=11.0 <other compiler flags> |
| 34 | */ |
| 35 | |
| 36 | #ifndef API_TO_BE_DEPRECATED |
| 37 | #define API_TO_BE_DEPRECATED 100000 |
| 38 | #endif |
| 39 | |
| 40 | #ifndef API_TO_BE_DEPRECATED_MACOS |
| 41 | #define API_TO_BE_DEPRECATED_MACOS 100000 |
| 42 | #endif |
| 43 | |
| 44 | #ifndef API_TO_BE_DEPRECATED_IOS |
| 45 | #define API_TO_BE_DEPRECATED_IOS 100000 |
| 46 | #endif |
| 47 | |
| 48 | #ifndef API_TO_BE_DEPRECATED_TVOS |
| 49 | #define API_TO_BE_DEPRECATED_TVOS 100000 |
| 50 | #endif |
| 51 | |
| 52 | #ifndef API_TO_BE_DEPRECATED_WATCHOS |
| 53 | #define API_TO_BE_DEPRECATED_WATCHOS 100000 |
| 54 | #endif |
| 55 | |
| 56 | #ifndef __API_TO_BE_DEPRECATED_BRIDGEOS |
| 57 | |
| 58 | #endif |
| 59 | |
| 60 | #ifndef __API_TO_BE_DEPRECATED_MACCATALYST |
| 61 | #define __API_TO_BE_DEPRECATED_MACCATALYST 100000 |
| 62 | #endif |
| 63 | |
| 64 | #ifndef API_TO_BE_DEPRECATED_DRIVERKIT |
| 65 | #define API_TO_BE_DEPRECATED_DRIVERKIT 100000 |
| 66 | #endif |
| 67 | |
| 68 | #ifndef API_TO_BE_DEPRECATED_VISIONOS |
| 69 | #define API_TO_BE_DEPRECATED_VISIONOS 100000 |
| 70 | #endif |
| 71 | |
| 72 | #ifndef __OPEN_SOURCE__ |
| 73 | |
| 74 | #endif /* __OPEN_SOURCE__ */ |
| 75 | |
| 76 | #include <AvailabilityInternal.h> |
| 77 | #include <AvailabilityInternalLegacy.h> |
| 78 | #if __has_include(<AvailabilityInternalPrivate.h>) |
| 79 | #include <AvailabilityInternalPrivate.h> |
| 80 | #endif |
| 81 | |
| 82 | |
| 83 | |
| 84 | #if defined(__has_feature) && defined(__has_attribute) |
| 85 | #if __has_attribute(availability) |
| 86 | |
| 87 | /* |
| 88 | * API Introductions |
| 89 | * |
| 90 | * Use to specify the release that a particular API became available. |
| 91 | * |
| 92 | * Platform names: |
| 93 | * macos, macOSApplicationExtension, macCatalyst, macCatalystApplicationExtension, |
| 94 | * ios, iOSApplicationExtension, tvos, tvOSApplicationExtension, watchos, |
| 95 | * watchOSApplicationExtension, driverkit, visionos, visionOSApplicationExtension |
| 96 | * |
| 97 | * Examples: |
| 98 | * API_AVAILABLE(macos(10.10)) |
| 99 | * API_AVAILABLE(macos(10.9), ios(10.0)) |
| 100 | * API_AVAILABLE(macos(10.4), ios(8.0), watchos(2.0), tvos(10.0)) |
| 101 | * API_AVAILABLE(driverkit(19.0)) |
| 102 | */ |
| 103 | |
| 104 | #define API_AVAILABLE(...) __API_AVAILABLE_GET_MACRO_93585900(__VA_ARGS__,__API_AVAILABLE15,__API_AVAILABLE14,__API_AVAILABLE13,__API_AVAILABLE12,__API_AVAILABLE11,__API_AVAILABLE10,__API_AVAILABLE9,__API_AVAILABLE8,__API_AVAILABLE7,__API_AVAILABLE6,__API_AVAILABLE5,__API_AVAILABLE4,__API_AVAILABLE3,__API_AVAILABLE2,__API_AVAILABLE1,__API_AVAILABLE0,0)(__VA_ARGS__) |
| 105 | #define API_AVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_AVAILABLE_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_AVAILABLE_BEGIN15,__API_AVAILABLE_BEGIN14,__API_AVAILABLE_BEGIN13,__API_AVAILABLE_BEGIN12,__API_AVAILABLE_BEGIN11,__API_AVAILABLE_BEGIN10,__API_AVAILABLE_BEGIN9,__API_AVAILABLE_BEGIN8,__API_AVAILABLE_BEGIN7,__API_AVAILABLE_BEGIN6,__API_AVAILABLE_BEGIN5,__API_AVAILABLE_BEGIN4,__API_AVAILABLE_BEGIN3,__API_AVAILABLE_BEGIN2,__API_AVAILABLE_BEGIN1,__API_AVAILABLE_BEGIN0,0)(__VA_ARGS__) |
| 106 | #define API_AVAILABLE_END _Pragma("clang attribute pop") |
| 107 | |
| 108 | /* |
| 109 | * API Deprecations |
| 110 | * |
| 111 | * Use to specify the release that a particular API became deprecated. |
| 112 | * |
| 113 | * Platform names: |
| 114 | * macos, macOSApplicationExtension, macCatalyst, macCatalystApplicationExtension, |
| 115 | * ios, iOSApplicationExtension, tvos, tvOSApplicationExtension, watchos, |
| 116 | * watchOSApplicationExtension, driverkit, visionos, visionOSApplicationExtension |
| 117 | * |
| 118 | * Within each platform a tuple of versions will represent the version the API was |
| 119 | * introduced in, followed by the version it was deperecated in. |
| 120 | * |
| 121 | * Examples: |
| 122 | * |
| 123 | * API_DEPRECATED("Deprecated", macos(10.4, 10.8)) |
| 124 | * API_DEPRECATED("Deprecated", macos(10.4, 10.8), ios(2.0, 3.0), watchos(2.0, 3.0), tvos(9.0, 10.0)) |
| 125 | * |
| 126 | * API_DEPRECATED_WITH_REPLACEMENT("-setName:", tvos(10.0, 10.4), ios(9.0, 10.0)) |
| 127 | * API_DEPRECATED_WITH_REPLACEMENT("SomeClassName", macos(10.4, 10.6), watchos(2.0, 3.0)) |
| 128 | */ |
| 129 | |
| 130 | #define API_DEPRECATED(...) __API_DEPRECATED_MSG_GET_MACRO_93585900(__VA_ARGS__,__API_DEPRECATED_MSG15,__API_DEPRECATED_MSG14,__API_DEPRECATED_MSG13,__API_DEPRECATED_MSG12,__API_DEPRECATED_MSG11,__API_DEPRECATED_MSG10,__API_DEPRECATED_MSG9,__API_DEPRECATED_MSG8,__API_DEPRECATED_MSG7,__API_DEPRECATED_MSG6,__API_DEPRECATED_MSG5,__API_DEPRECATED_MSG4,__API_DEPRECATED_MSG3,__API_DEPRECATED_MSG2,__API_DEPRECATED_MSG1,__API_DEPRECATED_MSG0,0,0)(__VA_ARGS__) |
| 131 | #define API_DEPRECATED_WITH_REPLACEMENT(...) __API_DEPRECATED_REP_GET_MACRO_93585900(__VA_ARGS__,__API_DEPRECATED_REP15,__API_DEPRECATED_REP14,__API_DEPRECATED_REP13,__API_DEPRECATED_REP12,__API_DEPRECATED_REP11,__API_DEPRECATED_REP10,__API_DEPRECATED_REP9,__API_DEPRECATED_REP8,__API_DEPRECATED_REP7,__API_DEPRECATED_REP6,__API_DEPRECATED_REP5,__API_DEPRECATED_REP4,__API_DEPRECATED_REP3,__API_DEPRECATED_REP2,__API_DEPRECATED_REP1,__API_DEPRECATED_REP0,0,0)(__VA_ARGS__) |
| 132 | |
| 133 | #define API_DEPRECATED_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_DEPRECATED_BEGIN15,__API_DEPRECATED_BEGIN14,__API_DEPRECATED_BEGIN13,__API_DEPRECATED_BEGIN12,__API_DEPRECATED_BEGIN11,__API_DEPRECATED_BEGIN10,__API_DEPRECATED_BEGIN9,__API_DEPRECATED_BEGIN8,__API_DEPRECATED_BEGIN7,__API_DEPRECATED_BEGIN6,__API_DEPRECATED_BEGIN5,__API_DEPRECATED_BEGIN4,__API_DEPRECATED_BEGIN3,__API_DEPRECATED_BEGIN2,__API_DEPRECATED_BEGIN1,__API_DEPRECATED_BEGIN0,0,0)(__VA_ARGS__) |
| 134 | #define API_DEPRECATED_END _Pragma("clang attribute pop") |
| 135 | |
| 136 | #define API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_WITH_REPLACEMENT_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN15,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN14,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN13,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN12,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN11,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN10,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN9,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN8,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN7,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN6,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN5,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN4,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN3,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN2,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN1,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN0,0,0)(__VA_ARGS__) |
| 137 | #define API_DEPRECATED_WITH_REPLACEMENT_END _Pragma("clang attribute pop") |
| 138 | |
| 139 | /* |
| 140 | * API Obsoletions |
| 141 | * |
| 142 | * Use to specify the release that a particular API became unavailable. |
| 143 | * |
| 144 | * Platform names: |
| 145 | * macos, macOSApplicationExtension, macCatalyst, macCatalystApplicationExtension, |
| 146 | * ios, iOSApplicationExtension, tvos, tvOSApplicationExtension, watchos, |
| 147 | * watchOSApplicationExtension, driverkit, visionos, visionOSApplicationExtension |
| 148 | * |
| 149 | * Within each platform a tuple of versions will represent the version the API was |
| 150 | * introduced in, followed by the version it was deperecated in, and finally the version it |
| 151 | * was removed in. |
| 152 | * |
| 153 | * Examples: |
| 154 | * |
| 155 | * API_OBSOLETED("No longer supported", macos(10.4, 10.8, 11.0)) |
| 156 | * API_OBSOLETED("No longer supported", macos(10.4, 10.8, 11.0), ios(2.0, 3.0, 4.0), watchos(2.0, 3.0, 4.0), tvos(9.0, 10.0, 11.0)) |
| 157 | * |
| 158 | * API_OBSOLETED_WITH_REPLACEMENT("-setName:", tvos(10.0, 10.4, 12.0), ios(9.0, 10.0, 11.0)) |
| 159 | * API_OBSOLETED_WITH_REPLACEMENT("SomeClassName", macos(10.4, 10.6, 11.0), watchos(2.0, 3.0, 4.0)) |
| 160 | */ |
| 161 | |
| 162 | #define API_OBSOLETED(...) __API_OBSOLETED_MSG_GET_MACRO_93585900(__VA_ARGS__,__API_OBSOLETED_MSG15,__API_OBSOLETED_MSG14,__API_OBSOLETED_MSG13,__API_OBSOLETED_MSG12,__API_OBSOLETED_MSG11,__API_OBSOLETED_MSG10,__API_OBSOLETED_MSG9,__API_OBSOLETED_MSG8,__API_OBSOLETED_MSG7,__API_OBSOLETED_MSG6,__API_OBSOLETED_MSG5,__API_OBSOLETED_MSG4,__API_OBSOLETED_MSG3,__API_OBSOLETED_MSG2,__API_OBSOLETED_MSG1,__API_OBSOLETED_MSG0,0,0)(__VA_ARGS__) |
| 163 | #define API_OBSOLETED_WITH_REPLACEMENT(...) __API_OBSOLETED_REP_GET_MACRO_93585900(__VA_ARGS__,__API_OBSOLETED_REP15,__API_OBSOLETED_REP14,__API_OBSOLETED_REP13,__API_OBSOLETED_REP12,__API_OBSOLETED_REP11,__API_OBSOLETED_REP10,__API_OBSOLETED_REP9,__API_OBSOLETED_REP8,__API_OBSOLETED_REP7,__API_OBSOLETED_REP6,__API_OBSOLETED_REP5,__API_OBSOLETED_REP4,__API_OBSOLETED_REP3,__API_OBSOLETED_REP2,__API_OBSOLETED_REP1,__API_OBSOLETED_REP0,0,0)(__VA_ARGS__) |
| 164 | |
| 165 | #define API_OBSOLETED_BEGIN(...) _Pragma("clang attribute push") __API_OBSOLETED_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_OBSOLETED_BEGIN15,__API_OBSOLETED_BEGIN14,__API_OBSOLETED_BEGIN13,__API_OBSOLETED_BEGIN12,__API_OBSOLETED_BEGIN11,__API_OBSOLETED_BEGIN10,__API_OBSOLETED_BEGIN9,__API_OBSOLETED_BEGIN8,__API_OBSOLETED_BEGIN7,__API_OBSOLETED_BEGIN6,__API_OBSOLETED_BEGIN5,__API_OBSOLETED_BEGIN4,__API_OBSOLETED_BEGIN3,__API_OBSOLETED_BEGIN2,__API_OBSOLETED_BEGIN1,__API_OBSOLETED_BEGIN0,0,0)(__VA_ARGS__) |
| 166 | #define API_OBSOLETED_END _Pragma("clang attribute pop") |
| 167 | |
| 168 | #define API_OBSOLETED_WITH_REPLACEMENT_BEGIN(...) _Pragma("clang attribute push") __API_OBSOLETED_WITH_REPLACEMENT_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN15,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN14,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN13,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN12,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN11,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN10,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN9,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN8,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN7,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN6,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN5,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN4,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN3,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN2,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN1,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN0,0,0)(__VA_ARGS__) |
| 169 | #define API_OBSOLETED_WITH_REPLACEMENT_END _Pragma("clang attribute pop") |
| 170 | |
| 171 | /* |
| 172 | * API Unavailability |
| 173 | * Use to specify that an API is unavailable for a particular platform. |
| 174 | * |
| 175 | * Example: |
| 176 | * API_UNAVAILABLE(macos) |
| 177 | * API_UNAVAILABLE(watchos, tvos) |
| 178 | */ |
| 179 | |
| 180 | #define API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO_93585900(__VA_ARGS__,__API_UNAVAILABLE15,__API_UNAVAILABLE14,__API_UNAVAILABLE13,__API_UNAVAILABLE12,__API_UNAVAILABLE11,__API_UNAVAILABLE10,__API_UNAVAILABLE9,__API_UNAVAILABLE8,__API_UNAVAILABLE7,__API_UNAVAILABLE6,__API_UNAVAILABLE5,__API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1,__API_UNAVAILABLE0,0)(__VA_ARGS__) |
| 181 | |
| 182 | #define API_UNAVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_UNAVAILABLE_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_UNAVAILABLE_BEGIN15,__API_UNAVAILABLE_BEGIN14,__API_UNAVAILABLE_BEGIN13,__API_UNAVAILABLE_BEGIN12,__API_UNAVAILABLE_BEGIN11,__API_UNAVAILABLE_BEGIN10,__API_UNAVAILABLE_BEGIN9,__API_UNAVAILABLE_BEGIN8,__API_UNAVAILABLE_BEGIN7,__API_UNAVAILABLE_BEGIN6,__API_UNAVAILABLE_BEGIN5,__API_UNAVAILABLE_BEGIN4,__API_UNAVAILABLE_BEGIN3,__API_UNAVAILABLE_BEGIN2,__API_UNAVAILABLE_BEGIN1,__API_UNAVAILABLE_BEGIN0,0)(__VA_ARGS__) |
| 183 | #define API_UNAVAILABLE_END _Pragma("clang attribute pop") |
| 184 | #endif /* __has_attribute(availability) */ |
| 185 | #endif /* #if defined(__has_feature) && defined(__has_attribute) */ |
| 186 | |
| 187 | /* |
| 188 | * Evaluate to nothing for compilers that don't support clang language extensions. |
| 189 | */ |
| 190 | |
| 191 | #ifndef API_AVAILABLE |
| 192 | #define API_AVAILABLE(...) |
| 193 | #endif |
| 194 | |
| 195 | #ifndef API_AVAILABLE_BEGIN |
| 196 | #define API_AVAILABLE_BEGIN(...) |
| 197 | #endif |
| 198 | |
| 199 | #ifndef API_AVAILABLE_END |
| 200 | #define API_AVAILABLE_END |
| 201 | #endif |
| 202 | |
| 203 | #ifndef API_DEPRECATED |
| 204 | #define API_DEPRECATED(...) |
| 205 | #endif |
| 206 | |
| 207 | #ifndef API_DEPRECATED_BEGIN |
| 208 | #define API_DEPRECATED_BEGIN(...) |
| 209 | #endif |
| 210 | |
| 211 | #ifndef API_DEPRECATED_END |
| 212 | #define API_DEPRECATED_END |
| 213 | #endif |
| 214 | |
| 215 | #ifndef API_DEPRECATED_WITH_REPLACEMENT |
| 216 | #define API_DEPRECATED_WITH_REPLACEMENT(...) |
| 217 | #endif |
| 218 | |
| 219 | #ifndef API_DEPRECATED_WITH_REPLACEMENT_BEGIN |
| 220 | #define API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...) |
| 221 | #endif |
| 222 | |
| 223 | #ifndef API_DEPRECATED_WITH_REPLACEMENT_END |
| 224 | #define API_DEPRECATED_WITH_REPLACEMENT_END |
| 225 | #endif |
| 226 | |
| 227 | #ifndef API_OBSOLETED |
| 228 | #define API_OBSOLETED(...) |
| 229 | #endif |
| 230 | |
| 231 | #ifndef API_OBSOLETED_BEGIN |
| 232 | #define API_OBSOLETED_BEGIN(...) |
| 233 | #endif |
| 234 | |
| 235 | #ifndef API_OBSOLETED_END |
| 236 | #define API_OBSOLETED_END |
| 237 | #endif |
| 238 | |
| 239 | #ifndef API_OBSOLETED_WITH_REPLACEMENT |
| 240 | #define API_OBSOLETED_WITH_REPLACEMENT(...) |
| 241 | #endif |
| 242 | |
| 243 | #ifndef API_OBSOLETED_WITH_REPLACEMENT_BEGIN |
| 244 | #define API_OBSOLETED_WITH_REPLACEMENT_BEGIN(...) |
| 245 | #endif |
| 246 | |
| 247 | #ifndef API_OBSOLETED_WITH_REPLACEMENT_END |
| 248 | #define API_OBSOLETED_WITH_REPLACEMENT_END |
| 249 | #endif |
| 250 | |
| 251 | #ifndef API_UNAVAILABLE |
| 252 | #define API_UNAVAILABLE(...) |
| 253 | #endif |
| 254 | |
| 255 | #ifndef API_UNAVAILABLE_BEGIN |
| 256 | #define API_UNAVAILABLE_BEGIN(...) |
| 257 | #endif |
| 258 | |
| 259 | #ifndef API_UNAVAILABLE_END |
| 260 | #define API_UNAVAILABLE_END |
| 261 | #endif |
| 262 | |
| 263 | #if __has_include(<AvailabilityProhibitedInternal.h>) |
| 264 | #include <AvailabilityProhibitedInternal.h> |
| 265 | #endif |
| 266 | |
| 267 | /* |
| 268 | * If SPI decorations have not been defined elsewhere, disable them. |
| 269 | */ |
| 270 | |
| 271 | #ifndef SPI_AVAILABLE |
| 272 | #define SPI_AVAILABLE(...) |
| 273 | #endif |
| 274 | |
| 275 | #ifndef SPI_AVAILABLE_BEGIN |
| 276 | #define SPI_AVAILABLE_BEGIN(...) |
| 277 | #endif |
| 278 | |
| 279 | #ifndef SPI_AVAILABLE_END |
| 280 | #define SPI_AVAILABLE_END |
| 281 | #endif |
| 282 | |
| 283 | #ifndef SPI_DEPRECATED |
| 284 | #define SPI_DEPRECATED(...) |
| 285 | #endif |
| 286 | |
| 287 | #ifndef SPI_DEPRECATED_WITH_REPLACEMENT |
| 288 | #define SPI_DEPRECATED_WITH_REPLACEMENT(...) |
| 289 | #endif |
| 290 | |
| 291 | #endif /* __OS_AVAILABILITY__ */ |
| 292 | |
| 293 | #ifndef __OPEN_SOURCE__ |
| 294 | // This is explicitly outside the header guard |
| 295 | #ifndef __AVAILABILITY_VERSIONS_VERSION_HASH |
| 296 | #define __AVAILABILITY_VERSIONS_VERSION_HASH 93585900U |
| 297 | #define __AVAILABILITY_VERSIONS_VERSION_STRING "Local" |
| 298 | #define __AVAILABILITY_FILE "os/availability.h" |
| 299 | #elif __AVAILABILITY_VERSIONS_VERSION_HASH != 93585900U |
| 300 | #pragma GCC error "Already found AvailabilityVersions version " __AVAILABILITY_FILE " from " __AVAILABILITY_VERSIONS_VERSION_STRING ", which is incompatible with os/availability.h from Local. Mixing and matching Availability from different SDKs is not supported" |
| 301 | #endif /* __AVAILABILITY_VERSIONS_VERSION_HASH */ |
| 302 | #endif /* __OPEN_SOURCE__ */ |