diff --git a/lib/std/c.zig b/lib/std/c.zig index c6af875df2cc3a251cf1d9de35544a268729f0fa..ae616664cb0cfc3699948431c50fd1d64936b8f7 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -1395,6 +1395,51 @@ pub const CPU = switch (native_os) { }, else => void, }; +pub const HW = switch (native_os) { + .freebsd => struct { + pub const MACHINE = 1; + pub const MODEL = 2; + pub const NCPU = 3; + pub const BYTEORDER = 4; + pub const PHYSMEM = 5; + pub const USERMEM = 6; + pub const PAGESIZE = 7; + pub const DISKNAMES = 8; + pub const DISKSTATS = 9; + pub const FLOATINGPT = 10; + pub const MACHINE_ARCH = 11; + pub const REALMEM = 12; + }, + .openbsd => struct { + pub const MACHINE = 1; + pub const MODEL = 2; + pub const NCPU = 3; + pub const BYTEORDER = 4; + pub const PHYSMEM = 5; + pub const USERMEM = 6; + pub const PAGESIZE = 7; + pub const DISKNAMES = 8; + pub const DISKSTATS = 9; + pub const DISKCOUNT = 10; + pub const SENSORS = 11; + pub const CPUSPEED = 12; + pub const SETPERF = 13; + pub const VENDOR = 14; + pub const PRODUCT = 15; + pub const VERSION = 16; + pub const SERIALNO = 17; + pub const UUID = 18; + pub const PHYSMEM64 = 19; + pub const USERMEM64 = 20; + pub const NCPUFOUND = 21; + pub const ALLOWPOWERDOWN = 22; + pub const PERFPOLICY = 23; + pub const SMT = 24; + pub const NCPUONLINE = 25; + pub const POWER = 26; + }, + else => void, +}; pub const KERN = switch (native_os) { .freebsd => struct { /// struct: process entries @@ -11333,7 +11378,6 @@ pub const writev_pos = haiku.writev_pos; pub const AUTH = openbsd.AUTH; pub const BI = openbsd.BI; -pub const HW = openbsd.HW; pub const PTHREAD_STACK_MIN = openbsd.PTHREAD_STACK_MIN; pub const TCFLUSH = openbsd.TCFLUSH; pub const TCIO = openbsd.TCIO; diff --git a/lib/std/c/openbsd.zig b/lib/std/c/openbsd.zig index 91ba8a8f5f76b85a2952c0a37421dcc11925a087..e6d277af9f4a613743d5d6fd1e29a739a7be6d93 100644 --- a/lib/std/c/openbsd.zig +++ b/lib/std/c/openbsd.zig @@ -273,35 +273,6 @@ pub const MAX_PAGE_SHIFT = switch (builtin.cpu.arch) { .sparc64 => 13, }; -pub const HW = struct { - pub const MACHINE = 1; - pub const MODEL = 2; - pub const NCPU = 3; - pub const BYTEORDER = 4; - pub const PHYSMEM = 5; - pub const USERMEM = 6; - pub const PAGESIZE = 7; - pub const DISKNAMES = 8; - pub const DISKSTATS = 9; - pub const DISKCOUNT = 10; - pub const SENSORS = 11; - pub const CPUSPEED = 12; - pub const SETPERF = 13; - pub const VENDOR = 14; - pub const PRODUCT = 15; - pub const VERSION = 16; - pub const SERIALNO = 17; - pub const UUID = 18; - pub const PHYSMEM64 = 19; - pub const USERMEM64 = 20; - pub const NCPUFOUND = 21; - pub const ALLOWPOWERDOWN = 22; - pub const PERFPOLICY = 23; - pub const SMT = 24; - pub const NCPUONLINE = 25; - pub const POWER = 26; -}; - pub const PTHREAD_STACK_MIN = switch (builtin.cpu.arch) { .sparc64 => 1 << 13, .mips64 => 1 << 14,