/** *@def__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ * *ControlswhethercallingAPIsnewerthanthedeveloper'sminSdkVersionarea *builderror(whennotdefined)orallowedasaweakreferencewitha *__builtin_available()guard(whendefined). * *Seehttps://developer.android.com/ndk/guides/using-newer-apis for more *details.
*/ #ifdefined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__) // In this mode, Clang will emit weak references to the APIs if the // minSdkVersion is less than the __what argument. This allows the libraries to // load even on systems too old to contain the API, but calls must be guarded // with `__builtin_available(android api_level, *)` to avoid segfaults. #define __BIONIC_AVAILABILITY(__what, ...) __attribute__((__availability__(android,__what __VA_OPT__(,) __VA_ARGS__)))
// When the caller is using weak API references, we should expose the decls for // APIs which are not available in the caller's minSdkVersion, otherwise there's // no way to take advantage of the weak references. #define __BIONIC_AVAILABILITY_GUARD(api_level) 1 #else // The 'strict' flag is required for NDK clients where the code was not written // to handle the case where the API was available at build-time but not at // run-time. Most 3p code ported to Android was not written to use // `__builtin_available()` for run-time availability checking, and so would not // compile in this mode (or worse, if the build doesn't use // -Werror=unguarded-availability, it would build but crash at runtime). #define __BIONIC_AVAILABILITY(__what, ...) __attribute__((__availability__(android,strict,__what __VA_OPT__(,) __VA_ARGS__)))
// When the caller is using strict API references, we hide APIs which are not // available in the caller's minSdkVersion. This is a bionic-only deviation in // behavior from the rest of the NDK headers, but it's necessary to maintain // source compatibility with 3p libraries that either can't correctly detect API // availability (either incorrectly detecting as always-available or as // never-available, but neither is true), or define their own polyfills which // conflict with our declarations. // // https://github.com/android/ndk/issues/2081 #define __BIONIC_AVAILABILITY_GUARD(api_level) (__ANDROID_MIN_SDK_VERSION__ >= (api_level)) #endif
#pragma clang diagnostic push #pragma clang diagnostic ignored "-Wc23-extensions" // Passing no argument for the '...' parameter of a variadic macro is a C23 extension #define __INTRODUCED_IN(api_level) __BIONIC_AVAILABILITY(introduced=api_level) #pragma clang diagnostic pop
// The same availability attribute can't be annotated multiple times. Therefore, the macros are // defined for the configuration that it is valid for so that declarations like the below doesn't // cause inconsistent availability values which is an error with -Wavailability: // // void foo() __INTRODUCED_IN_32(30) __INTRODUCED_IN_64(31); // #if !defined(__LP64__) #define __INTRODUCED_IN_32(api_level) __BIONIC_AVAILABILITY(introduced=api_level) #define __INTRODUCED_IN_64(api_level) #else #define __INTRODUCED_IN_32(api_level) #define __INTRODUCED_IN_64(api_level) __BIONIC_AVAILABILITY(introduced=api_level) #endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-06-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.