| ... | @@ -389,26 +389,26 @@ pub const SYS = extern enum(usize) { | ... | @@ -389,26 +389,26 @@ pub const SYS = extern enum(usize) { |
| 389 | _, | 389 | _, |
| 390 | }; | 390 | }; |
| 391 | | 391 | |
| 392 | pub const O_CREAT = 0o100; | 392 | pub const O_CREAT = 0x200; |
| 393 | pub const O_EXCL = 0o200; | 393 | pub const O_EXCL = 0x800; |
| 394 | pub const O_NOCTTY = 0o400; | 394 | pub const O_NOCTTY = 0x8000; |
| 395 | pub const O_TRUNC = 0o1000; | 395 | pub const O_TRUNC = 0x400; |
| 396 | pub const O_APPEND = 0o2000; | 396 | pub const O_APPEND = 0x8; |
| 397 | pub const O_NONBLOCK = 0o4000; | 397 | pub const O_NONBLOCK = 0x4000; |
| 398 | pub const O_DSYNC = 0o10000; | 398 | pub const O_SYNC = 0x802000; |
| 399 | pub const O_SYNC = 0o4010000; | 399 | pub const O_DSYNC = 0x2000; |
| 400 | pub const O_RSYNC = 0o4010000; | 400 | pub const O_RSYNC = O_SYNC; |
| 401 | pub const O_DIRECTORY = 0o200000; | 401 | pub const O_DIRECTORY = 0x10000; |
| 402 | pub const O_NOFOLLOW = 0o400000; | 402 | pub const O_NOFOLLOW = 0x20000; |
| 403 | pub const O_CLOEXEC = 0o2000000; | 403 | pub const O_CLOEXEC = 0x400000; |
| 404 | | 404 | |
| 405 | pub const O_ASYNC = 0o20000; | 405 | pub const O_ASYNC = 0x40; |
| 406 | pub const O_DIRECT = 0o40000; | 406 | pub const O_DIRECT = 0x100000; |
| 407 | pub const O_LARGEFILE = 0o100000; | 407 | pub const O_LARGEFILE = 0; |
| 408 | pub const O_NOATIME = 0o1000000; | 408 | pub const O_NOATIME = 0x200000; |
| 409 | pub const O_PATH = 0o10000000; | 409 | pub const O_PATH = 0x1000000; |
| 410 | pub const O_TMPFILE = 0o20200000; | 410 | pub const O_TMPFILE = 0x2010000; |
| 411 | pub const O_NDELAY = O_NONBLOCK; | 411 | pub const O_NDELAY = O_NONBLOCK | 0x4; |
| 412 | | 412 | |
| 413 | pub const F_DUPFD = 0; | 413 | pub const F_DUPFD = 0; |
| 414 | pub const F_GETFD = 1; | 414 | pub const F_GETFD = 1; |
| ... | @@ -416,18 +416,15 @@ pub const F_SETFD = 2; | ... | @@ -416,18 +416,15 @@ pub const F_SETFD = 2; |
| 416 | pub const F_GETFL = 3; | 416 | pub const F_GETFL = 3; |
| 417 | pub const F_SETFL = 4; | 417 | pub const F_SETFL = 4; |
| 418 | | 418 | |
| 419 | pub const F_SETOWN = 8; | 419 | pub const F_SETOWN = 5; |
| 420 | pub const F_GETOWN = 9; | 420 | pub const F_GETOWN = 6; |
| 421 | pub const F_SETSIG = 10; | 421 | pub const F_GETLK = 7; |
| 422 | pub const F_GETSIG = 11; | 422 | pub const F_SETLK = 8; |
| | 423 | pub const F_SETLKW = 9; |
| 423 | | 424 | |
| 424 | pub const F_RDLCK = 0; | 425 | pub const F_RDLCK = 1; |
| 425 | pub const F_WRLCK = 1; | 426 | pub const F_WRLCK = 2; |
| 426 | pub const F_UNLCK = 2; | 427 | pub const F_UNLCK = 3; |
| 427 | | | |
| 428 | pub const F_GETLK = 5; | | |
| 429 | pub const F_SETLK = 6; | | |
| 430 | pub const F_SETLKW = 7; | | |
| 431 | | 428 | |
| 432 | pub const F_SETOWN_EX = 15; | 429 | pub const F_SETOWN_EX = 15; |
| 433 | pub const F_GETOWN_EX = 16; | 430 | pub const F_GETOWN_EX = 16; |
| ... | @@ -436,8 +433,8 @@ pub const F_GETOWNER_UIDS = 17; | ... | @@ -436,8 +433,8 @@ pub const F_GETOWNER_UIDS = 17; |
| 436 | | 433 | |
| 437 | pub const LOCK_SH = 1; | 434 | pub const LOCK_SH = 1; |
| 438 | pub const LOCK_EX = 2; | 435 | pub const LOCK_EX = 2; |
| 439 | pub const LOCK_UN = 8; | | |
| 440 | pub const LOCK_NB = 4; | 436 | pub const LOCK_NB = 4; |
| | 437 | pub const LOCK_UN = 8; |
| 441 | | 438 | |
| 442 | /// stack-like segment | 439 | /// stack-like segment |
| 443 | pub const MAP_GROWSDOWN = 0x0200; | 440 | pub const MAP_GROWSDOWN = 0x0200; |
| ... | @@ -457,8 +454,6 @@ pub const MAP_NORESERVE = 0x0040; | ... | @@ -457,8 +454,6 @@ pub const MAP_NORESERVE = 0x0040; |
| 457 | pub const VDSO_CGT_SYM = "__vdso_clock_gettime"; | 454 | pub const VDSO_CGT_SYM = "__vdso_clock_gettime"; |
| 458 | pub const VDSO_CGT_VER = "LINUX_2.6"; | 455 | pub const VDSO_CGT_VER = "LINUX_2.6"; |
| 459 | | 456 | |
| 460 | // TODO do this | | |
| 461 | | | |
| 462 | pub const Flock = extern struct { | 457 | pub const Flock = extern struct { |
| 463 | l_type: i16, | 458 | l_type: i16, |
| 464 | l_whence: i16, | 459 | l_whence: i16, |