1 typedef int off_t; 2 typedef int ssize_t; 3 typedef unsigned size_t; 4 5 #if !defined(__LP64__) && defined(_FILE_OFFSET_BITS) 6 #if _FILE_OFFSET_BITS == 64 7 #define __USE_FILE_OFFSET64 1 8 #endif 9 #endif 10 11 #define __RENAME(x) __asm__(#x) 12 13 #if defined(__USE_FILE_OFFSET64) && __ANDROID_API__ >= 21 14 int truncate(const char* __path, off_t __length) __RENAME(truncate64) __INTRODUCED_IN(21); 15 #else 16 int truncate(const char* __path, off_t __length); 17 #endif 18 19 #if defined(__USE_FILE_OFFSET64) 20 21 #if __ANDROID_API__ >= 12 22 ssize_t pread(int __fd, void* __buf, size_t __count, off_t __offset) __RENAME(pread64) 23 __INTRODUCED_IN(12); 24 #endif /* __ANDROID_API__ >= 12 */ 25 26 #else 27 ssize_t pread(int __fd, void* __buf, size_t __count, off_t __offset); 28 #endif 29 30 #if defined(__USE_FILE_OFFSET64) 31 off_t lseek(int __fd, off_t __offset, int __whence) __RENAME(lseek64); 32 #else 33 off_t lseek(int __fd, off_t __offset, int __whence); 34 #endif 35