• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 ssize_t pread(int __fd, void* __buf, size_t __count, off_t __offset) __RENAME(pread64)
25     __INTRODUCED_IN(12);
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 
36 #if defined(__cplusplus)
37 }
38 #endif
39