authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2026-09-14 09:25:37+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-09-14 22:49:40+02:00
logbafc56143298c9af7686408852928cb634c851b1
treed4f1d75950b40340b3d771f3b7aaa7fe8f1d4491
parent22e99d8a158c9b80f9b0fd2177b9cae7817d2583

std.c: Add CTL and KERN defs targeting Darwin


1 files changed, 85 insertions(+), 0 deletions(-)

lib/std/c.zig+85
...@@ -1372,6 +1372,18 @@ pub const CTL = switch (native_os) {...@@ -1372,6 +1372,18 @@ pub const CTL = switch (native_os) {
1372 pub const DDB = 9;1372 pub const DDB = 9;
1373 pub const VFS = 10;1373 pub const VFS = 10;
1374 },1374 },
1375 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
1376 pub const UNSPEC = 0;
1377 pub const KERN = 1;
1378 pub const VM = 2;
1379 pub const VFS = 3;
1380 pub const NET = 4;
1381 pub const DEBUG = 5;
1382 pub const HW = 6;
1383 pub const MACHDEP = 7;
1384 pub const USER = 8;
1385 pub const MAXID = 9;
1386 },
1375 else => void,1387 else => void,
1376};1388};
1377pub const CPU = switch (native_os) {1389pub const CPU = switch (native_os) {
...@@ -1612,6 +1624,79 @@ pub const KERN = switch (native_os) {...@@ -1612,6 +1624,79 @@ pub const KERN = switch (native_os) {
1612 pub const PROC_ENV = 3;1624 pub const PROC_ENV = 3;
1613 pub const PROC_NENV = 4;1625 pub const PROC_NENV = 4;
1614 },1626 },
1627 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
1628 pub const OSTYPE = 1;
1629 pub const OSRELEASE = 2;
1630 pub const OSREV = 3;
1631 pub const VERSION = 4;
1632 pub const MAXVNODES = 5;
1633 pub const MAXPROC = 6;
1634 pub const MAXFILES = 7;
1635 pub const ARGMAX = 8;
1636 pub const SECURELVL = 9;
1637 pub const HOSTNAME = 10;
1638 pub const HOSTID = 11;
1639 pub const CLOCKRATE = 12;
1640 pub const VNODE = 13;
1641 pub const PROC = 14;
1642 pub const FILE = 15;
1643 pub const PROF = 16;
1644 pub const POSIX1 = 17;
1645 pub const NGROUPS = 18;
1646 pub const JOB_CONTROL = 19;
1647 pub const SAVED_IDS = 20;
1648 pub const BOOTTIME = 21;
1649 pub const NISDOMAINNAME = 22;
1650 pub const DOMAINNAME = 22;
1651 pub const MAXPARTITIONS = 23;
1652 pub const KDEBUG = 24;
1653 pub const UPDATEINTERVAL = 25;
1654 pub const OSRELDATE = 26;
1655 pub const NTP_PLL = 27;
1656 pub const BOOTFILE = 28;
1657 pub const MAXFILESPERPROC = 29;
1658 pub const MAXPROCPERUID = 30;
1659 pub const DUMPDEV = 31;
1660 pub const IPC = 32;
1661 pub const DUMMY = 33;
1662 pub const PS_STRINGS = 34;
1663 pub const USRSTACK32 = 35;
1664 pub const LOGSIGEXIT = 36;
1665 pub const SYMFILE = 37;
1666 pub const PROCARGS = 38;
1667 pub const NETBOOT = 40;
1668 pub const SYSV = 42;
1669 pub const AFFINITY = 43;
1670 pub const TRANSLATE = 44;
1671 pub const CLASSIC = 44;
1672 pub const EXEC = 45;
1673 pub const CLASSICHANDLER = 45;
1674 pub const AIOMAX = 46;
1675 pub const AIOPROCMAX = 47;
1676 pub const AIOTHREADS = 48;
1677 pub const PROCARGS2 = 49;
1678 pub const COREFILE = 50;
1679 pub const COREDUMP = 51;
1680 pub const SUGID_COREDUMP = 52;
1681 pub const PROCDELAYTERM = 53;
1682 pub const SHREG_PRIVATIZABLE = 54;
1683 pub const LOW_PRI_WINDOW = 56;
1684 pub const LOW_PRI_DELAY = 57;
1685 pub const POSIX = 58;
1686 pub const USRSTACK64 = 59;
1687 pub const NX_PROTECTION = 60;
1688 pub const TFP = 61;
1689 pub const PROCNAME = 62;
1690 pub const THALTSTACK = 63;
1691 pub const SPECULATIVE_READS = 64;
1692 pub const OSVERSION = 65;
1693 pub const SAFEBOOT = 66;
1694 pub const RAGEVNODE = 68;
1695 pub const TTY = 69;
1696 pub const CHECKOPENEVT = 70;
1697 pub const THREADNAME = 71;
1698 pub const MAXID = 72;
1699 },
1615 else => void,1700 else => void,
1616};1701};
1617pub const MADV = switch (native_os) {1702pub const MADV = switch (native_os) {