Revert "fortify: allow diagnostics without run-time checks"

This reverts commit d7e11b88531665de59de466bbc9ee6c480b00a4f.

Reason for revert: Breaks aosp_x86_64-eng. Will look into it and
unbreak when it's not almost midnight. :)

Change-Id: I21f76efe4d19c70d0b14630e441376d359a45b49
diff --git a/libc/include/bits/fortify/fcntl.h b/libc/include/bits/fortify/fcntl.h
index 3c5a037..ded62ee 100644
--- a/libc/include/bits/fortify/fcntl.h
+++ b/libc/include/bits/fortify/fcntl.h
@@ -59,11 +59,11 @@
 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__ >= __ANDROID_API_J_MR1__ && __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
+#if __ANDROID_API__ >= __ANDROID_API_J_MR1__
     return __open_2(pathname, flags);
 #else
     return __open_real(pathname, flags);
-#endif
+#endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
 }
 
 __BIONIC_FORTIFY_INLINE
@@ -83,11 +83,11 @@
 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__ >= __ANDROID_API_J_MR1__ && __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
+#if __ANDROID_API__ >= __ANDROID_API_J_MR1__
     return __openat_2(dirfd, pathname, flags);
 #else
     return __openat_real(dirfd, pathname, flags);
-#endif
+#endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
 }
 
 __BIONIC_FORTIFY_INLINE
@@ -109,7 +109,7 @@
 int open64(const char* const __pass_object_size pathname, int flags)
         __overloadable
         __clang_error_if(__open_modes_useful(flags), "'open64' " __open_too_few_args_error) {
-    return open(pathname, flags);
+    return __open_2(pathname, flags);
 }
 
 __BIONIC_FORTIFY_INLINE
@@ -117,7 +117,7 @@
         __overloadable
         __clang_warning_if(!__open_modes_useful(flags) && modes,
                            "'open64' " __open_useless_modes_warning) {
-    return open(pathname, flags, modes);
+    return __open_real(pathname, flags, modes);
 }
 
 __BIONIC_ERROR_FUNCTION_VISIBILITY
@@ -129,7 +129,7 @@
 int openat64(int dirfd, const char* const __pass_object_size pathname, int flags)
         __overloadable
         __clang_error_if(__open_modes_useful(flags), "'openat64' " __open_too_few_args_error) {
-    return openat(dirfd, pathname, flags);
+    return __openat_2(dirfd, pathname, flags);
 }
 
 __BIONIC_FORTIFY_INLINE
@@ -137,7 +137,7 @@
         __overloadable
         __clang_warning_if(!__open_modes_useful(flags) && modes,
                            "'openat64' " __open_useless_modes_warning) {
-    return openat(dirfd, pathname, flags, modes);
+    return __openat_real(dirfd, pathname, flags, modes);
 }
 #endif /* __ANDROID_API__ >= __ANDROID_API_L__ */