16 #define __NEED_ssize_t
17 #define __NEED_struct_iovec
20 #include <bits/alltypes.h>
22 #include <bits/fcntl.h>
32 int creat(const char *, mode_t
);
33 int fcntl(int, int, ...);
34 int open(const char *, int, ...);
35 int openat(int, const char *, int, ...);
36 int posix_fadvise(int, off_t
, off_t
, int);
37 int posix_fallocate(int, off_t
, off_t
);
39 #define O_SEARCH O_PATH
42 #define O_ACCMODE (03|O_SEARCH)
47 #define F_OFD_GETLK 36
48 #define F_OFD_SETLK 37
49 #define F_OFD_SETLKW 38
51 #define F_DUPFD_CLOEXEC 1030
59 #define AT_FDCWD (-100)
60 #define AT_SYMLINK_NOFOLLOW 0x100
61 #define AT_REMOVEDIR 0x200
62 #define AT_SYMLINK_FOLLOW 0x400
63 #define AT_EACCESS 0x200
65 #define POSIX_FADV_NORMAL 0
66 #define POSIX_FADV_RANDOM 1
67 #define POSIX_FADV_SEQUENTIAL 2
68 #define POSIX_FADV_WILLNEED 3
69 #ifndef POSIX_FADV_DONTNEED
70 #define POSIX_FADV_DONTNEED 4
71 #define POSIX_FADV_NOREUSE 5
99 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
100 #define AT_NO_AUTOMOUNT 0x800
101 #define AT_EMPTY_PATH 0x1000
103 #define FAPPEND O_APPEND
104 #define FFSYNC O_SYNC
105 #define FASYNC O_ASYNC
106 #define FNONBLOCK O_NONBLOCK
107 #define FNDELAY O_NDELAY
118 #define F_SETLEASE 1024
119 #define F_GETLEASE 1025
120 #define F_NOTIFY 1026
121 #define F_CANCELLK 1029
122 #define F_SETPIPE_SZ 1031
123 #define F_GETPIPE_SZ 1032
124 #define F_ADD_SEALS 1033
125 #define F_GET_SEALS 1034
127 #define F_SEAL_SEAL 0x0001
128 #define F_SEAL_SHRINK 0x0002
129 #define F_SEAL_GROW 0x0004
130 #define F_SEAL_WRITE 0x0008
132 #define F_GET_RW_HINT 1035
133 #define F_SET_RW_HINT 1036
134 #define F_GET_FILE_RW_HINT 1037
135 #define F_SET_FILE_RW_HINT 1038
137 #define RWF_WRITE_LIFE_NOT_SET 0
138 #define RWH_WRITE_LIFE_NONE 1
139 #define RWH_WRITE_LIFE_SHORT 2
140 #define RWH_WRITE_LIFE_MEDIUM 3
141 #define RWH_WRITE_LIFE_LONG 4
142 #define RWH_WRITE_LIFE_EXTREME 5
144 #define DN_ACCESS 0x00000001
145 #define DN_MODIFY 0x00000002
146 #define DN_CREATE 0x00000004
147 #define DN_DELETE 0x00000008
148 #define DN_RENAME 0x00000010
149 #define DN_ATTRIB 0x00000020
150 #define DN_MULTISHOT 0x80000000
152 int lockf(int, int, off_t
);
155 #if defined(_GNU_SOURCE)
156 #define F_OWNER_TID 0
157 #define F_OWNER_PID 1
158 #define F_OWNER_PGRP 2
159 #define F_OWNER_GID 2
161 unsigned handle_bytes
;
163 unsigned char f_handle
[];
169 #define FALLOC_FL_KEEP_SIZE 1
170 #define FALLOC_FL_PUNCH_HOLE 2
171 #define MAX_HANDLE_SZ 128
172 #define SYNC_FILE_RANGE_WAIT_BEFORE 1
173 #define SYNC_FILE_RANGE_WRITE 2
174 #define SYNC_FILE_RANGE_WAIT_AFTER 4
175 #define SPLICE_F_MOVE 1
176 #define SPLICE_F_NONBLOCK 2
177 #define SPLICE_F_MORE 4
178 #define SPLICE_F_GIFT 8
179 int fallocate(int, int, off_t
, off_t
);
180 #define fallocate64 fallocate
181 int name_to_handle_at(int, const char *, struct file_handle
*, int *, int);
182 int open_by_handle_at(int, struct file_handle
*, int);
183 ssize_t
readahead(int, off_t
, size_t);
184 int sync_file_range(int, off_t
, off_t
, unsigned);
185 ssize_t
vmsplice(int, const struct iovec
*, size_t, unsigned);
186 ssize_t
splice(int, off_t
*, int, off_t
*, size_t, unsigned);
187 ssize_t
tee(int, int, size_t, unsigned);
191 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
192 #define F_GETLK64 F_GETLK
193 #define F_SETLK64 F_SETLK
194 #define F_SETLKW64 F_SETLKW
195 #define flock64 flock
197 #define openat64 openat
198 #define creat64 creat
199 #define lockf64 lockf
200 #define posix_fadvise64 posix_fadvise
201 #define posix_fallocate64 posix_fallocate
202 #define off64_t off_t