authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-12-01 07:37:34+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-12-16 06:24:58+01:00
log18db762bb8385bb468a3d479c715f6ec906f7d2a
tree26822f3ec01ae44a63e3c0f2caec411412fb1f9a
parent56add8374c43291c99505aa6d7bb80a5ff08723d
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.c: openbsd does not have SIGRTMIN/SIGRTMAX


1 files changed, 28 insertions(+), 16 deletions(-)

lib/std/c.zig+28-16
...@@ -10468,24 +10468,36 @@ pub const sigaction = switch (native_os) {...@@ -10468,24 +10468,36 @@ pub const sigaction = switch (native_os) {
10468};10468};
1046910469
10470/// Zig's version of SIGRTMIN. Actually a function.10470/// Zig's version of SIGRTMIN. Actually a function.
10471pub fn sigrtmin() u8 {10471pub const sigrtmin = switch (native_os) {
10472 return switch (native_os) {10472 .openbsd => {},
10473 .freebsd => 65,10473 else => sigrt_private.sigrtmin,
10474 .netbsd => 33,10474};
10475 .illumos => @truncate(sysconf(@intFromEnum(_SC.SIGRT_MIN))),
10476 else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmin()))),
10477 };
10478}
1047910475
10480/// Zig's version of SIGRTMAX. Actually a function.10476/// Zig's version of SIGRTMAX. Actually a function.
10481pub fn sigrtmax() u8 {10477pub const sigrtmax = switch (native_os) {
10482 return switch (native_os) {10478 .openbsd => {},
10483 .freebsd => 126,10479 else => sigrt_private.sigrtmax,
10484 .netbsd => 63,10480};
10485 .illumos => @truncate(sysconf(@intFromEnum(_SC.SIGRT_MAX))),10481
10486 else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmax()))),10482const sigrt_private = struct {
10487 };10483 pub fn sigrtmin() u8 {
10488}10484 return switch (native_os) {
10485 .freebsd => 65,
10486 .netbsd => 33,
10487 .illumos => @truncate(sysconf(@intFromEnum(_SC.SIGRT_MIN))),
10488 else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmin()))),
10489 };
10490 }
10491
10492 pub fn sigrtmax() u8 {
10493 return switch (native_os) {
10494 .freebsd => 126,
10495 .netbsd => 63,
10496 .illumos => @truncate(sysconf(@intFromEnum(_SC.SIGRT_MAX))),
10497 else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmax()))),
10498 };
10499 }
10500};
1048910501
10490pub const sigfillset = switch (native_os) {10502pub const sigfillset = switch (native_os) {
10491 .netbsd => private.__sigfillset14,10503 .netbsd => private.__sigfillset14,