| ... | @@ -1435,7 +1435,9 @@ pub const AT = struct { | ... | @@ -1435,7 +1435,9 @@ pub const AT = struct { |
| 1435 | | 1435 | |
| 1436 | pub const O = struct { | 1436 | pub const O = struct { |
| 1437 | pub usingnamespace switch (builtin.target.cpu.arch) { | 1437 | pub usingnamespace switch (builtin.target.cpu.arch) { |
| | 1438 | // generic |
| 1438 | .x86_64, | 1439 | .x86_64, |
| | 1440 | .riscv64, |
| 1439 | => struct { | 1441 | => struct { |
| 1440 | pub const CREAT = 0o100; | 1442 | pub const CREAT = 0o100; |
| 1441 | pub const EXCL = 0o200; | 1443 | pub const EXCL = 0o200; |
| ... | @@ -1457,6 +1459,72 @@ pub const O = struct { | ... | @@ -1457,6 +1459,72 @@ pub const O = struct { |
| 1457 | pub const TMPFILE = 0o20200000; | 1459 | pub const TMPFILE = 0o20200000; |
| 1458 | pub const NDELAY = O.NONBLOCK; | 1460 | pub const NDELAY = O.NONBLOCK; |
| 1459 | }, | 1461 | }, |
| | 1462 | .aarch64, |
| | 1463 | => struct { |
| | 1464 | pub const CREAT = 0o100; |
| | 1465 | pub const EXCL = 0o200; |
| | 1466 | pub const NOCTTY = 0o400; |
| | 1467 | pub const TRUNC = 0o1000; |
| | 1468 | pub const APPEND = 0o2000; |
| | 1469 | pub const NONBLOCK = 0o4000; |
| | 1470 | pub const DSYNC = 0o10000; |
| | 1471 | pub const SYNC = 0o4010000; |
| | 1472 | pub const RSYNC = 0o4010000; |
| | 1473 | pub const DIRECTORY = 0o40000; |
| | 1474 | pub const NOFOLLOW = 0o100000; |
| | 1475 | pub const CLOEXEC = 0o2000000; |
| | 1476 | pub const ASYNC = 0o20000; |
| | 1477 | pub const DIRECT = 0o200000; |
| | 1478 | pub const LARGEFILE = 0o400000; |
| | 1479 | pub const NOATIME = 0o1000000; |
| | 1480 | pub const PATH = 0o10000000; |
| | 1481 | pub const TMPFILE = 0o20040000; |
| | 1482 | pub const NDELAY = O.NONBLOCK; |
| | 1483 | }, |
| | 1484 | .powerpc64le, |
| | 1485 | => struct { |
| | 1486 | pub const CREAT = 0o100; |
| | 1487 | pub const EXCL = 0o200; |
| | 1488 | pub const NOCTTY = 0o400; |
| | 1489 | pub const TRUNC = 0o1000; |
| | 1490 | pub const APPEND = 0o2000; |
| | 1491 | pub const NONBLOCK = 0o4000; |
| | 1492 | pub const DSYNC = 0o10000; |
| | 1493 | pub const SYNC = 0o4010000; |
| | 1494 | pub const RSYNC = 0o4010000; |
| | 1495 | pub const DIRECTORY = 0o40000; |
| | 1496 | pub const NOFOLLOW = 0o100000; |
| | 1497 | pub const CLOEXEC = 0o2000000; |
| | 1498 | pub const ASYNC = 0o20000; |
| | 1499 | pub const DIRECT = 0o400000; |
| | 1500 | pub const LARGEFILE = 0o200000; |
| | 1501 | pub const NOATIME = 0o1000000; |
| | 1502 | pub const PATH = 0o10000000; |
| | 1503 | pub const TMPFILE = 0o20040000; |
| | 1504 | pub const NDELAY = O.NONBLOCK; |
| | 1505 | }, |
| | 1506 | .mips64el, |
| | 1507 | => struct { |
| | 1508 | pub const CREAT = 0o400; |
| | 1509 | pub const EXCL = 0o2000; |
| | 1510 | pub const NOCTTY = 0o4000; |
| | 1511 | pub const TRUNC = 0o1000; |
| | 1512 | pub const APPEND = 0o010; |
| | 1513 | pub const NONBLOCK = 0o200; |
| | 1514 | pub const DSYNC = 0o020; |
| | 1515 | pub const SYNC = 0o40020; |
| | 1516 | pub const RSYNC = 0o40020; |
| | 1517 | pub const DIRECTORY = 0o200000; |
| | 1518 | pub const NOFOLLOW = 0o400000; |
| | 1519 | pub const CLOEXEC = 0o2000000; |
| | 1520 | pub const ASYNC = 0o10000; |
| | 1521 | pub const DIRECT = 0o100000; |
| | 1522 | pub const LARGEFILE = 0o20000; |
| | 1523 | pub const NOATIME = 0o1000000; |
| | 1524 | pub const PATH = 0o10000000; |
| | 1525 | pub const TMPFILE = 0o20200000; |
| | 1526 | pub const NDELAY = O.NONBLOCK; |
| | 1527 | }, |
| 1460 | else => @compileError("TODO"), | 1528 | else => @compileError("TODO"), |
| 1461 | }; | 1529 | }; |
| 1462 | pub const SEARCH = O.PATH; | 1530 | pub const SEARCH = O.PATH; |