Home | History | Annotate | Download | only in expected
      1 #if defined(__cplusplus)
      2 extern "C" {
      3 #endif
      4 
      5 typedef int off_t;
      6 typedef int ssize_t;
      7 typedef unsigned size_t;
      8 
      9 #if !defined(__LP64__) && defined(_FILE_OFFSET_BITS)
     10 #if _FILE_OFFSET_BITS == 64
     11 #define __USE_FILE_OFFSET64 1
     12 #endif
     13 #endif
     14 
     15 #define __RENAME(x) __asm__(#x)
     16 
     17 #if defined(__USE_FILE_OFFSET64) && __ANDROID_API__ >= 21
     18 int truncate(const char* __path, off_t __length) __RENAME(truncate64) __INTRODUCED_IN(21);
     19 #else
     20 int truncate(const char* __path, off_t __length);
     21 #endif
     22 
     23 #if defined(__USE_FILE_OFFSET64)
     24 
     25 #if __ANDROID_API__ >= 12
     26 ssize_t pread(int __fd, void* __buf, size_t __count, off_t __offset) __RENAME(pread64)
     27     __INTRODUCED_IN(12);
     28 #endif /* __ANDROID_API__ >= 12 */
     29 
     30 #else
     31 ssize_t pread(int __fd, void* __buf, size_t __count, off_t __offset);
     32 #endif
     33 
     34 #if defined(__USE_FILE_OFFSET64)
     35 off_t lseek(int __fd, off_t __offset, int __whence) __RENAME(lseek64);
     36 #else
     37 off_t lseek(int __fd, off_t __offset, int __whence);
     38 #endif
     39 
     40 #if defined(__cplusplus)
     41 }
     42 #endif
     43