Source
pub const _SC = if (builtin.abi.isAndroid()) enum(c_int) {
PAGESIZE = 39,
NPROCESSORS_ONLN = 97,
} else switch (native_os) {
.driverkit, .ios, .macos, .tvos, .visionos, .watchos => enum(c_int) {
PAGESIZE = 29,
},
.dragonfly => enum(c_int) {
PAGESIZE = 47,
},
.freebsd => enum(c_int) {
PAGESIZE = 47,
},
.fuchsia => enum(c_int) {
PAGESIZE = 30,
},
.haiku => enum(c_int) {
PAGESIZE = 27,
},
.linux => enum(c_int) {
PAGESIZE = 30,
},
.netbsd => enum(c_int) {
PAGESIZE = 28,
},
.openbsd => enum(c_int) {
PAGESIZE = 28,
},
.solaris, .illumos => enum(c_int) {
PAGESIZE = 11,
NPROCESSORS_ONLN = 15,
},
// https://github.com/SerenityOS/serenity/blob/1dfc9e2df39dd23f1de92530677c845aae4345f2/Kernel/API/POSIX/unistd.h#L36-L52
.serenity => enum(c_int) {
MONOTONIC_CLOCK = 0,
NPROCESSORS_CONF = 1,
NPROCESSORS_ONLN = 2,
OPEN_MAX = 3,
HOST_NAME_MAX = 4,
TTY_NAME_MAX = 5,
PAGESIZE = 6,
GETPW_R_SIZE_MAX = 7,
GETGR_R_SIZE_MAX = 8,
CLK_TCK = 9,
SYMLOOP_MAX = 10,
MAPPED_FILES = 11,
ARG_MAX = 12,
IOV_MAX = 13,
PHYS_PAGES = 14,
},
else => void,
}