Undo recent _FILE_OFFSET_BITS=64 changes.
We had several bugs filed saying "if I set _FILE_OFFSET_BITS=64 when
targeting an API < L, various functions are missing". Instead of
saying "yes, they are", we quietly just modified the header files to
expose the non-64-bit variants. This makes no sense. We can't just say
"oh, yeah, we don't have a version of this function that agrees with
your calling code about how large off_t is, but here's a version that
doesn't: I'm sure it'll be fine".
_FILE_OFFSET_BITS=64 on Android LP32 has always been a game of chance,
but that game should be "are all the functions my code needs available
at compile time?", not "will my code actually work at run time?".
Bug: https://github.com/android-ndk/ndk/issues/449
Bug: https://github.com/android-ndk/ndk/issues/442
Bug: https://github.com/android-ndk/ndk/issues/333
Bug: https://github.com/android-ndk/ndk/issues/332
Bug: https://github.com/android-ndk/ndk/issues/324
Test: builds
Change-Id: Ib095251d3e21e77ed50cc3575388107fecec4ecd
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 24916d6..ca56437 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -176,17 +176,17 @@
int fseek(FILE*, long, int);
long ftell(FILE*);
-#if defined(__USE_FILE_OFFSET64) && __ANDROID_API__ >= __ANDROID_API_N__
-int fgetpos(FILE*, fpos_t*) __RENAME(fgetpos64);
-int fsetpos(FILE*, const fpos_t*) __RENAME(fsetpos64);
-int fseeko(FILE*, off_t, int) __RENAME(fseeko64);
-off_t ftello(FILE*) __RENAME(ftello64);
+#if defined(__USE_FILE_OFFSET64)
+int fgetpos(FILE*, fpos_t*) __RENAME(fgetpos64) __INTRODUCED_IN(24);
+int fsetpos(FILE*, const fpos_t*) __RENAME(fsetpos64) __INTRODUCED_IN(24);
+int fseeko(FILE*, off_t, int) __RENAME(fseeko64) __INTRODUCED_IN(24);
+off_t ftello(FILE*) __RENAME(ftello64) __INTRODUCED_IN(24);
# if defined(__USE_BSD)
FILE* funopen(const void*,
int (*)(void*, char*, int),
int (*)(void*, const char*, int),
fpos_t (*)(void*, fpos_t, int),
- int (*)(void*)) __RENAME(funopen64);
+ int (*)(void*)) __RENAME(funopen64) __INTRODUCED_IN(24);
# endif
#else
int fgetpos(FILE*, fpos_t*);