2 * D header file for POSIX.
4 * Copyright: Public Domain
5 * License: Public Domain
7 * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
9 module stdc.posix.fcntl;
11 private import stdc.posix.config;
12 private import stdc.stdint;
13 public import stdc.stddef; // for size_t
14 public import stdc.posix.sys.types; // for off_t, mode_t
15 public import stdc.posix.sys.stat; // for S_IFMT, etc.
65 int creat(in char*, mode_t);
66 int fcntl(int, int, ...);
67 int open(in char*, int, ...);
76 static if( __USE_FILE_OFFSET64 )
99 const O_NOCTTY = 0400;
100 const O_TRUNC = 01000;
102 const O_APPEND = 02000;
103 const O_NONBLOCK = 04000;
104 const O_SYNC = 010000;
105 const O_DSYNC = O_SYNC;
106 const O_RSYNC = O_SYNC;
108 const O_ACCMODE = 0003;
122 static if( __USE_LARGEFILE64 )
124 int creat64(in char*, mode_t);
127 int open64(in char*, int, ...);
132 int creat(in char*, mode_t);
133 int open(in char*, int, ...);
136 else version( darwin )
149 const FD_CLOEXEC = 1;
155 const O_CREAT = 0x0200;
156 const O_EXCL = 0x0800;
158 const O_TRUNC = 0x0400;
160 const O_RDONLY = 0x0000;
161 const O_WRONLY = 0x0001;
162 const O_RDWR = 0x0002;
163 const O_ACCMODE = 0x0003;
165 const O_NONBLOCK = 0x0004;
166 const O_APPEND = 0x0008;
167 const O_SYNC = 0x0080;
180 int creat(in char*, mode_t);
181 int open(in char*, int, ...);
183 else version( freebsd )
196 const FD_CLOEXEC = 1;
202 const O_CREAT = 0x0200;
203 const O_EXCL = 0x0800;
205 const O_TRUNC = 0x0400;
207 const O_RDONLY = 0x0000;
208 const O_WRONLY = 0x0001;
209 const O_RDWR = 0x0002;
210 const O_ACCMODE = 0x0003;
212 const O_NONBLOCK = 0x0004;
213 const O_APPEND = 0x0008;
214 const O_SYNC = 0x0080;
227 int creat(in char*, mode_t);
228 int open(in char*, int, ...);
231 //int creat(in char*, mode_t);
232 int fcntl(int, int, ...);
233 //int open(in char*, int, ...);
236 // Advisory Information (ADV)
240 POSIX_FADV_SEQUENTIAL
246 int posix_fadvise(int, off_t, off_t, int);
247 int posix_fallocate(int, off_t, off_t);