16 #define __NEED_ssize_t
17 #define __NEED_struct_iovec
20 #include <bits/alltypes.h>
22 #include <bits/fcntl.h>
33 int creat(const char *, mode_t);
34 int fcntl(int, int, ...);
35 int open(const char *, int, ...);
36 int openat(int, const char *, int, ...);
37 int posix_fadvise(int, off_t, off_t, int);
38 int posix_fallocate(int, off_t, off_t);
45 #define F_DUPFD_CLOEXEC 1030
53 #define AT_FDCWD (-100)
54 #define AT_SYMLINK_NOFOLLOW 0x100
55 #define AT_REMOVEDIR 0x200
56 #define AT_SYMLINK_FOLLOW 0x400
57 #define AT_EACCESS 0x200
59 #define POSIX_FADV_NORMAL 0
60 #define POSIX_FADV_RANDOM 1
61 #define POSIX_FADV_SEQUENTIAL 2
62 #define POSIX_FADV_WILLNEED 3
63 #define POSIX_FADV_DONTNEED 4
64 #define POSIX_FADV_NOREUSE 5
91 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
92 #define FAPPEND O_APPEND
93 #define FFSYNC O_FSYNC
94 #define FASYNC O_ASYNC
95 #define FNONBLOCK O_NONBLOCK
96 #define FNDELAY O_NDELAY
107 int lockf(int, int, off_t);
110 #if defined(_GNU_SOURCE)
111 #define F_OWNER_TID 0
112 #define F_OWNER_PID 1
113 #define F_OWNER_PGRP 2
114 #define F_OWNER_GID 2
119 #define FALLOC_FL_KEEP_SIZE 1
120 #define FALLOC_FL_PUNCH_HOLE 2
121 #define SPLICE_F_MOVE 1
122 #define SPLICE_F_NONBLOCK 2
123 #define SPLICE_F_MORE 4
124 #define SPLICE_F_GIFT 8
125 int fallocate(int, int, off_t, off_t);
126 ssize_t vmsplice(int, const struct iovec *, size_t, unsigned);
127 ssize_t splice(int, off_t *, int, off_t *, size_t, unsigned);
131 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
133 #define openat64 openat
134 #define creat64 creat
135 #define lockf64 lockf
136 #define posix_fadvise64 posix_fadvise
137 #define posix_fallocate64 posix_fallocate
138 #define off64_t off_t