| ... | ... | @@ -1224,3 +1224,161 @@ pub const RTLD_NEXT = @intToPtr(*c_void, ~maxInt(usize)); |
| 1224 | 1224 | pub const RTLD_DEFAULT = @intToPtr(*c_void, ~maxInt(usize) - 1); |
| 1225 | 1225 | pub const RTLD_SELF = @intToPtr(*c_void, ~maxInt(usize) - 2); |
| 1226 | 1226 | pub const RTLD_MAIN_ONLY = @intToPtr(*c_void, ~maxInt(usize) - 4); |
| 1227 | |
| 1228 | /// duplicate file descriptor |
| 1229 | pub const F_DUPFD = 0; |
| 1230 | |
| 1231 | /// get file descriptor flags |
| 1232 | pub const F_GETFD = 1; |
| 1233 | |
| 1234 | /// set file descriptor flags |
| 1235 | pub const F_SETFD = 2; |
| 1236 | |
| 1237 | /// get file status flags |
| 1238 | pub const F_GETFL = 3; |
| 1239 | |
| 1240 | /// set file status flags |
| 1241 | pub const F_SETFL = 4; |
| 1242 | |
| 1243 | /// get SIGIO/SIGURG proc/pgrp |
| 1244 | pub const F_GETOWN = 5; |
| 1245 | |
| 1246 | /// set SIGIO/SIGURG proc/pgrp |
| 1247 | pub const F_SETOWN = 6; |
| 1248 | |
| 1249 | /// get record locking information |
| 1250 | pub const F_GETLK = 7; |
| 1251 | |
| 1252 | /// set record locking information |
| 1253 | pub const F_SETLK = 8; |
| 1254 | |
| 1255 | /// F_SETLK; wait if blocked |
| 1256 | pub const F_SETLKW = 9; |
| 1257 | |
| 1258 | /// F_SETLK; wait if blocked, return on timeout |
| 1259 | pub const F_SETLKWTIMEOUT = 10; |
| 1260 | pub const F_FLUSH_DATA = 40; |
| 1261 | |
| 1262 | /// Used for regression test |
| 1263 | pub const F_CHKCLEAN = 41; |
| 1264 | |
| 1265 | /// Preallocate storage |
| 1266 | pub const F_PREALLOCATE = 42; |
| 1267 | |
| 1268 | /// Truncate a file without zeroing space |
| 1269 | pub const F_SETSIZE = 43; |
| 1270 | |
| 1271 | /// Issue an advisory read async with no copy to user |
| 1272 | pub const F_RDADVISE = 44; |
| 1273 | |
| 1274 | /// turn read ahead off/on for this fd |
| 1275 | pub const F_RDAHEAD = 45; |
| 1276 | |
| 1277 | /// turn data caching off/on for this fd |
| 1278 | pub const F_NOCACHE = 48; |
| 1279 | |
| 1280 | /// file offset to device offset |
| 1281 | pub const F_LOG2PHYS = 49; |
| 1282 | |
| 1283 | /// return the full path of the fd |
| 1284 | pub const F_GETPATH = 50; |
| 1285 | |
| 1286 | /// fsync + ask the drive to flush to the media |
| 1287 | pub const F_FULLFSYNC = 51; |
| 1288 | |
| 1289 | /// find which component (if any) is a package |
| 1290 | pub const F_PATHPKG_CHECK = 52; |
| 1291 | |
| 1292 | /// "freeze" all fs operations |
| 1293 | pub const F_FREEZE_FS = 53; |
| 1294 | |
| 1295 | /// "thaw" all fs operations |
| 1296 | pub const F_THAW_FS = 54; |
| 1297 | |
| 1298 | /// turn data caching off/on (globally) for this file |
| 1299 | pub const F_GLOBAL_NOCACHE = 55; |
| 1300 | |
| 1301 | /// add detached signatures |
| 1302 | pub const F_ADDSIGS = 59; |
| 1303 | |
| 1304 | /// add signature from same file (used by dyld for shared libs) |
| 1305 | pub const F_ADDFILESIGS = 61; |
| 1306 | |
| 1307 | /// used in conjunction with F_NOCACHE to indicate that DIRECT, synchonous writes |
| 1308 | /// should not be used (i.e. its ok to temporaily create cached pages) |
| 1309 | pub const F_NODIRECT = 62; |
| 1310 | |
| 1311 | ///Get the protection class of a file from the EA, returns int |
| 1312 | pub const F_GETPROTECTIONCLASS = 63; |
| 1313 | |
| 1314 | ///Set the protection class of a file for the EA, requires int |
| 1315 | pub const F_SETPROTECTIONCLASS = 64; |
| 1316 | |
| 1317 | ///file offset to device offset, extended |
| 1318 | pub const F_LOG2PHYS_EXT = 65; |
| 1319 | |
| 1320 | ///get record locking information, per-process |
| 1321 | pub const F_GETLKPID = 66; |
| 1322 | |
| 1323 | ///Mark the file as being the backing store for another filesystem |
| 1324 | pub const F_SETBACKINGSTORE = 70; |
| 1325 | |
| 1326 | ///return the full path of the FD, but error in specific mtmd circumstances |
| 1327 | pub const F_GETPATH_MTMINFO = 71; |
| 1328 | |
| 1329 | ///Returns the code directory, with associated hashes, to the caller |
| 1330 | pub const F_GETCODEDIR = 72; |
| 1331 | |
| 1332 | ///No SIGPIPE generated on EPIPE |
| 1333 | pub const F_SETNOSIGPIPE = 73; |
| 1334 | |
| 1335 | ///Status of SIGPIPE for this fd |
| 1336 | pub const F_GETNOSIGPIPE = 74; |
| 1337 | |
| 1338 | ///For some cases, we need to rewrap the key for AKS/MKB |
| 1339 | pub const F_TRANSCODEKEY = 75; |
| 1340 | |
| 1341 | ///file being written to a by single writer... if throttling enabled, writes |
| 1342 | ///may be broken into smaller chunks with throttling in between |
| 1343 | pub const F_SINGLE_WRITER = 76; |
| 1344 | |
| 1345 | ///Get the protection version number for this filesystem |
| 1346 | pub const F_GETPROTECTIONLEVEL = 77; |
| 1347 | |
| 1348 | ///Add detached code signatures (used by dyld for shared libs) |
| 1349 | pub const F_FINDSIGS = 78; |
| 1350 | |
| 1351 | ///Add signature from same file, only if it is signed by Apple (used by dyld for simulator) |
| 1352 | pub const F_ADDFILESIGS_FOR_DYLD_SIM = 83; |
| 1353 | |
| 1354 | ///fsync + issue barrier to drive |
| 1355 | pub const F_BARRIERFSYNC = 85; |
| 1356 | |
| 1357 | ///Add signature from same file, return end offset in structure on success |
| 1358 | pub const F_ADDFILESIGS_RETURN = 97; |
| 1359 | |
| 1360 | ///Check if Library Validation allows this Mach-O file to be mapped into the calling process |
| 1361 | pub const F_CHECK_LV = 98; |
| 1362 | |
| 1363 | ///Deallocate a range of the file |
| 1364 | pub const F_PUNCHHOLE = 99; |
| 1365 | |
| 1366 | ///Trim an active file |
| 1367 | pub const F_TRIM_ACTIVE_FILE = 100; |
| 1368 | |
| 1369 | pub const FCNTL_FS_SPECIFIC_BASE = 0x00010000; |
| 1370 | |
| 1371 | ///mark the dup with FD_CLOEXEC |
| 1372 | pub const F_DUPFD_CLOEXEC = 67; |
| 1373 | |
| 1374 | ///close-on-exec flag |
| 1375 | pub const FD_CLOEXEC = 1; |
| 1376 | |
| 1377 | /// shared or read lock |
| 1378 | pub const F_RDLCK = 1; |
| 1379 | |
| 1380 | /// unlock |
| 1381 | pub const F_UNLCK = 2; |
| 1382 | |
| 1383 | /// exclusive or write lock |
| 1384 | pub const F_WRLCK = 3; |