diff options
author | Elliott Hughes <enh@google.com> | 2015-02-06 22:28:49 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-02-17 19:54:43 -0800 |
commit | 68dc20d41193831a94df04b994ff2f601dd38d10 (patch) | |
tree | 7706f742caa2ce1db9868baadf890187d7d02dbd /libc/include/fcntl.h | |
parent | d687905f11102a7f6bad461b6f501dc870c59999 (diff) | |
download | android_bionic-68dc20d41193831a94df04b994ff2f601dd38d10.tar.gz android_bionic-68dc20d41193831a94df04b994ff2f601dd38d10.tar.bz2 android_bionic-68dc20d41193831a94df04b994ff2f601dd38d10.zip |
Implement _FILE_OFFSET_BITS (mostly).
I still don't think we can make stdio's fseeko and ftello work, but we can
have everything else, and very few programs use fseeko/ftello (and they can
just refrain from using _FILE_OFFSET_BITS and be no worse off than they are
today).
Bug: 11865851
Change-Id: Ic3cb409aae6713f4b345de954bcc4241fcd969ec
Diffstat (limited to 'libc/include/fcntl.h')
-rw-r--r-- | libc/include/fcntl.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h index 4c4cfbd73..0f016d718 100644 --- a/libc/include/fcntl.h +++ b/libc/include/fcntl.h @@ -59,22 +59,29 @@ __BEGIN_DECLS extern int creat(const char*, mode_t); extern int creat64(const char*, mode_t); -extern int fallocate64(int, int, off64_t, off64_t); -extern int fallocate(int, int, off_t, off_t); extern int fcntl(int, int, ...); extern int openat(int, const char*, int, ...); extern int openat64(int, const char*, int, ...); extern int open(const char*, int, ...); extern int open64(const char*, int, ...); -extern int posix_fadvise64(int, off64_t, off64_t, int); -extern int posix_fadvise(int, off_t, off_t, int); -extern int posix_fallocate64(int, off64_t, off64_t); -extern int posix_fallocate(int, off_t, off_t); extern ssize_t splice(int, off64_t*, int, off64_t*, size_t, unsigned int); extern ssize_t tee(int, int, size_t, unsigned int); extern int unlinkat(int, const char*, int); extern ssize_t vmsplice(int, const struct iovec*, size_t, unsigned int); +#if defined(__USE_FILE_OFFSET64) +extern int fallocate(int, int, off_t, off_t) __RENAME(fallocate64); +extern int posix_fadvise(int, off_t, off_t, int) __RENAME(posix_fadvise64); +extern int posix_fallocate(int, off_t, off_t) __RENAME(posix_fallocate); +#else +extern int fallocate(int, int, off_t, off_t); +extern int posix_fadvise(int, off_t, off_t, int); +extern int posix_fallocate(int, off_t, off_t); +#endif +extern int fallocate64(int, int, off64_t, off64_t); +extern int posix_fadvise64(int, off64_t, off64_t, int); +extern int posix_fallocate64(int, off64_t, off64_t); + extern int __open_2(const char*, int); extern int __open_real(const char*, int, ...) __RENAME(open); extern int __openat_2(int, const char*, int); |