summaryrefslogtreecommitdiff
path: root/libc/stdio/stdio.cpp
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2020-08-10 13:35:05 +0900
committerJiyong Park <jiyong@google.com>2021-01-15 10:40:47 +0900
commit23bfed2a10b9b228c63ce70526108ead7b5f8d67 (patch)
tree760501400892a42ec6e60c45fa3aef80b4b0d12d /libc/stdio/stdio.cpp
parentb1ba762e34850582a1156ac56d280c8ce1980b28 (diff)
__INTRODUCED_IN macros add the availability attribute
__INTRODUCED_IN (and its variants) macro is used to mark the availability of an API symbol. The macros were used by the versioner tool for the NDK clients. When the Bionic headers are processed by the tool, APIs with the macros are guarded with __ANDROID_API__. e.g., void foo() __INTRDUCED_IN(30); is processed into \#if __ANDROID_API__ >= 30 void foo(); \#endif by the versioner. The macros however didn't play a role for other cases, e.g. OS components. This is too strict for NDK clients and too loose for the non-NDK clients. For the former, this completely hides the APIs that are newer than the min sdk version (__ANDROID_API__). For the latter, a call to such an API can be made without being guarded. This change is the first step towards a better way of handling the native APIs availability. The plan is that every NDK APIs are annotated with the availability attribute and callers are required to guard their API calls with a runtime check if the API is newer than the min sdk version of the caller. In this change, the macros now emits the availability attribute for the non-NDK clients (i.e. when not processed by versioner). Bug: 163288375 Bug: 134795810 Test: m Change-Id: I6eb2bce2bc2770cbfd69815e6816b6f25b3d6127
Diffstat (limited to 'libc/stdio/stdio.cpp')
0 files changed, 0 insertions, 0 deletions