zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 08b2fd46ab79e1f381e360c01a4f66abff8cb4b7 (tree)
parent bc7cdc2b6b08070e1983d6c38744d74c9dddf5da
Author: Linus Groh <mail@linusgroh.de>
Date:   Fri,  3 Oct 2025 22:15:38 +0100

std.c: Add missing SIG constants for serenity

Diffstat:
Mlib/std/c.zig | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/lib/std/c.zig b/lib/std/c.zig @@ -3121,8 +3121,17 @@ pub const SIG = switch (native_os) { pub const UNBLOCK = 2; pub const SETMASK = 3; }, + // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal.h // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h .serenity => struct { + pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0); + pub const ERR: ?Sigaction.handler_fn = @ptrFromInt(maxInt(usize)); + pub const IGN: ?Sigaction.handler_fn = @ptrFromInt(1); + + pub const BLOCK = 1; + pub const UNBLOCK = 2; + pub const SETMASK = 3; + pub const INVAL = 0; pub const HUP = 1; pub const INT = 2;