libc/include: remove easy __ANDROID_API__ tautologies.
The next NDK to take these headers only supports API 21 and later, so
clean up some of the trivial cruft.
This doesn't include the remaining "legacy inlines", since they're a bit
more complicated. I'll remove those in later changes.
Test: treehugger
Change-Id: I94c32f6393dd3ae831165917303ea591222baa0d
diff --git a/libc/include/bits/fortify/fcntl.h b/libc/include/bits/fortify/fcntl.h
index 7fe60f4..1f6ebad 100644
--- a/libc/include/bits/fortify/fcntl.h
+++ b/libc/include/bits/fortify/fcntl.h
@@ -59,7 +59,7 @@
int open(const char* const __pass_object_size pathname, int flags)
__overloadable
__clang_error_if(__open_modes_useful(flags), "'open' " __open_too_few_args_error) {
-#if __ANDROID_API__ >= 17 && __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
+#if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
return __open_2(pathname, flags);
#else
return __open_real(pathname, flags);
@@ -83,7 +83,7 @@
int openat(int dirfd, const char* const __pass_object_size pathname, int flags)
__overloadable
__clang_error_if(__open_modes_useful(flags), "'openat' " __open_too_few_args_error) {
-#if __ANDROID_API__ >= 17 && __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
+#if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
return __openat_2(dirfd, pathname, flags);
#else
return __openat_real(dirfd, pathname, flags);
@@ -98,7 +98,6 @@
return __openat_real(dirfd, pathname, flags, modes);
}
-#if __ANDROID_API__ >= 21
/* Note that open == open64, so we reuse those bits in the open64 variants below. */
__BIONIC_ERROR_FUNCTION_VISIBILITY
@@ -139,7 +138,6 @@
"'openat64' " __open_useless_modes_warning) {
return openat(dirfd, pathname, flags, modes);
}
-#endif /* __ANDROID_API__ >= 21 */
#undef __open_too_many_args_error
#undef __open_too_few_args_error