mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std.c: openbsd does not have SIGRTMIN/SIGRTMAX
This commit is contained in:
+28
-16
@@ -10468,24 +10468,36 @@ pub const sigaction = switch (native_os) {
|
||||
};
|
||||
|
||||
/// Zig's version of SIGRTMIN. Actually a function.
|
||||
pub fn sigrtmin() u8 {
|
||||
return switch (native_os) {
|
||||
.freebsd => 65,
|
||||
.netbsd => 33,
|
||||
.illumos => @truncate(sysconf(@intFromEnum(_SC.SIGRT_MIN))),
|
||||
else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmin()))),
|
||||
};
|
||||
}
|
||||
pub const sigrtmin = switch (native_os) {
|
||||
.openbsd => {},
|
||||
else => sigrt_private.sigrtmin,
|
||||
};
|
||||
|
||||
/// Zig's version of SIGRTMAX. Actually a function.
|
||||
pub fn sigrtmax() u8 {
|
||||
return switch (native_os) {
|
||||
.freebsd => 126,
|
||||
.netbsd => 63,
|
||||
.illumos => @truncate(sysconf(@intFromEnum(_SC.SIGRT_MAX))),
|
||||
else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmax()))),
|
||||
};
|
||||
}
|
||||
pub const sigrtmax = switch (native_os) {
|
||||
.openbsd => {},
|
||||
else => sigrt_private.sigrtmax,
|
||||
};
|
||||
|
||||
const sigrt_private = struct {
|
||||
pub fn sigrtmin() u8 {
|
||||
return switch (native_os) {
|
||||
.freebsd => 65,
|
||||
.netbsd => 33,
|
||||
.illumos => @truncate(sysconf(@intFromEnum(_SC.SIGRT_MIN))),
|
||||
else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmin()))),
|
||||
};
|
||||
}
|
||||
|
||||
pub fn sigrtmax() u8 {
|
||||
return switch (native_os) {
|
||||
.freebsd => 126,
|
||||
.netbsd => 63,
|
||||
.illumos => @truncate(sysconf(@intFromEnum(_SC.SIGRT_MAX))),
|
||||
else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmax()))),
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
pub const sigfillset = switch (native_os) {
|
||||
.netbsd => private.__sigfillset14,
|
||||
|
||||
Reference in New Issue
Block a user