authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-15 01:59:14+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-22 22:15:31+02:00
log8a8aab3ed92ac0e4223950917eb36e668783ef61
treee0428958f736153892b33fd0acc07115f23b4645
parentb030fe4fef11092ec095a2ade9b1b29e06a192cb
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.c: fix RLIM constants for haiku


1 files changed, 8 insertions(+), 1 deletions(-)

lib/std/c.zig+8-1
...@@ -1978,13 +1978,20 @@ pub const RLIM = switch (native_os) {...@@ -1978,13 +1978,20 @@ pub const RLIM = switch (native_os) {
1978 .linux => linux.RLIM,1978 .linux => linux.RLIM,
1979 .emscripten => emscripten.RLIM,1979 .emscripten => emscripten.RLIM,
1980 // https://github.com/SerenityOS/serenity/blob/aae106e37b48f2158e68902293df1e4bf7b80c0f/Userland/Libraries/LibC/sys/resource.h#L521980 // https://github.com/SerenityOS/serenity/blob/aae106e37b48f2158e68902293df1e4bf7b80c0f/Userland/Libraries/LibC/sys/resource.h#L52
1981 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => struct {1981 .openbsd, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => struct {
1982 /// No limit1982 /// No limit
1983 pub const INFINITY: rlim_t = (1 << 63) - 1;1983 pub const INFINITY: rlim_t = (1 << 63) - 1;
19841984
1985 pub const SAVED_MAX = INFINITY;1985 pub const SAVED_MAX = INFINITY;
1986 pub const SAVED_CUR = INFINITY;1986 pub const SAVED_CUR = INFINITY;
1987 },1987 },
1988 .haiku => struct {
1989 /// No limit
1990 pub const INFINITY: rlim_t = 0xffffffff;
1991
1992 pub const SAVED_MAX = INFINITY;
1993 pub const SAVED_CUR = INFINITY;
1994 },
1988 .illumos => struct {1995 .illumos => struct {
1989 /// No limit1996 /// No limit
1990 pub const INFINITY: rlim_t = (1 << 63) - 3;1997 pub const INFINITY: rlim_t = (1 << 63) - 3;