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
);
40 #define O_SEARCH O_PATH
43 #define O_ACCMODE (03|O_SEARCH)
48 #define F_OFD_GETLK 36
49 #define F_OFD_SETLK 37
50 #define F_OFD_SETLKW 38
52 #define F_DUPFD_CLOEXEC 1030
60 #define AT_FDCWD (-100)
61 #define AT_SYMLINK_NOFOLLOW 0x100
62 #define AT_REMOVEDIR 0x200
63 #define AT_SYMLINK_FOLLOW 0x400
64 #define AT_EACCESS 0x200
66 #define POSIX_FADV_NORMAL 0
67 #define POSIX_FADV_RANDOM 1
68 #define POSIX_FADV_SEQUENTIAL 2
69 #define POSIX_FADV_WILLNEED 3
70 #define POSIX_FADV_DONTNEED 4
71 #define POSIX_FADV_NOREUSE 5
98 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
99 #define AT_NO_AUTOMOUNT 0x800
100 #define AT_EMPTY_PATH 0x1000
102 #define FAPPEND O_APPEND
103 #define FFSYNC O_FSYNC
104 #define FASYNC O_ASYNC
105 #define FNONBLOCK O_NONBLOCK
106 #define FNDELAY O_NDELAY
117 #define F_SETLEASE 1024
118 #define F_GETLEASE 1025
119 #define F_NOTIFY 1026
120 #define F_CANCELLK 1029
121 #define F_SETPIPE_SZ 1031
122 #define F_GETPIPE_SZ 1032
123 #define F_ADD_SEALS 1033
124 #define F_GET_SEALS 1034
126 #define F_SEAL_SEAL 0x0001
127 #define F_SEAL_SHRINK 0x0002
128 #define F_SEAL_GROW 0x0004
129 #define F_SEAL_WRITE 0x0008
131 #define DN_ACCESS 0x00000001
132 #define DN_MODIFY 0x00000002
133 #define DN_CREATE 0x00000004
134 #define DN_DELETE 0x00000008
135 #define DN_RENAME 0x00000010
136 #define DN_ATTRIB 0x00000020
137 #define DN_MULTISHOT 0x80000000
139 int lockf(int, int, off_t
);
142 #if defined(_GNU_SOURCE)
143 #define F_OWNER_TID 0
144 #define F_OWNER_PID 1
145 #define F_OWNER_PGRP 2
146 #define F_OWNER_GID 2
151 #define FALLOC_FL_KEEP_SIZE 1
152 #define FALLOC_FL_PUNCH_HOLE 2
153 #define SYNC_FILE_RANGE_WAIT_BEFORE 1
154 #define SYNC_FILE_RANGE_WRITE 2
155 #define SYNC_FILE_RANGE_WAIT_AFTER 4
156 #define SPLICE_F_MOVE 1
157 #define SPLICE_F_NONBLOCK 2
158 #define SPLICE_F_MORE 4
159 #define SPLICE_F_GIFT 8
160 int fallocate(int, int, off_t
, off_t
);
161 #define fallocate64 fallocate
162 ssize_t
readahead(int, off_t
, size_t);
163 int sync_file_range(int, off_t
, off_t
, unsigned);
164 ssize_t
vmsplice(int, const struct iovec
*, size_t, unsigned);
165 ssize_t
splice(int, off_t
*, int, off_t
*, size_t, unsigned);
166 ssize_t
tee(int, int, size_t, unsigned);
170 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
171 #define F_GETLK64 F_GETLK
172 #define F_SETLK64 F_SETLK
173 #define F_SETLKW64 F_SETLKW
174 #define flock64 flock
176 #define openat64 openat
177 #define creat64 creat
178 #define lockf64 lockf
179 #define posix_fadvise64 posix_fadvise
180 #define posix_fallocate64 posix_fallocate
181 #define off64_t off_t