diff options
author | Elliott Hughes <enh@google.com> | 2019-10-14 12:19:29 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2019-10-15 13:30:12 -0700 |
commit | 80e9f65c040873c2aa016bfb0db5984e9db46f18 (patch) | |
tree | 4999055583e9f535e4f514d1534834d7c47d074c /libc/include/android/api-level.h | |
parent | 95712059371aa522c80f1cab3cc3eb5431cc7f71 (diff) |
Remove __ANDROID_NDK__ from bionic, and document our #defines.
__ANDROID_NDK__ is moving into the NDK's <android/ndk-version.h>
instead.
Test: treehugger
Change-Id: I192016165a929547009d15dbcc30e8f6dad1ac88
Diffstat (limited to 'libc/include/android/api-level.h')
-rw-r--r-- | libc/include/android/api-level.h | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/libc/include/android/api-level.h b/libc/include/android/api-level.h index 4a3d05207..577fb0027 100644 --- a/libc/include/android/api-level.h +++ b/libc/include/android/api-level.h @@ -31,6 +31,9 @@ /** * @file android/api-level.h * @brief Functions and constants for dealing with multiple API levels. + * + * See + * https://android.googlesource.com/platform/bionic/+/master/docs/defines.md. */ #include <sys/cdefs.h> @@ -38,9 +41,9 @@ __BEGIN_DECLS /** - * Magic version number for an Android OS build which has - * not yet turned into an official release, - * for comparison against `__ANDROID_API__`. + * Magic version number for an Android OS build which has not yet turned + * into an official release, for comparison against `__ANDROID_API__`. See + * https://android.googlesource.com/platform/bionic/+/master/docs/defines.md. */ #define __ANDROID_API_FUTURE__ 10000 @@ -49,27 +52,12 @@ __BEGIN_DECLS /** * `__ANDROID_API__` is the API level being targeted. For the OS, * this is `__ANDROID_API_FUTURE__`. For the NDK, this is set by the - * compiler system based on the API level you claimed to target. + * compiler system based on the API level you claimed to target. See + * https://android.googlesource.com/platform/bionic/+/master/docs/defines.md. */ #define __ANDROID_API__ __ANDROID_API_FUTURE__ #endif -#if __ANDROID_API__ != __ANDROID_API_FUTURE__ -/** - * `__ANDROID_NDK__` is defined for code that's built by the NDK - * rather than as part of the OS. "Built by the NDK" is an ambiguous idea, - * so you might prefer to check `__ANDROID__`, `__BIONIC__`, `__linux__`, - * or `__NDK_MAJOR__` instead, depending on exactly what you're trying to say. - * - * `__ANDROID_NDK__` is intended to capture "this code is being built for - * Android, but targeting a specific API level". This is true for all code built - * by the NDK proper, but also for OS code that sets `sdk_version` in its build - * file. This distinction might matter to you if, for example, your code could - * be built as part of an app *or* as part of the OS. - */ -#define __ANDROID_NDK__ 1 -#endif - /** Names the Gingerbread API level (9), for comparison against `__ANDROID_API__`. */ #define __ANDROID_API_G__ 9 |