authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-07 20:02:21-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-08 20:52:42+01:00
log1face9ad781f3e162c709da0cab38391707b9696
treeaeb6f85a177dc31a546b42dc8d9c99561beb8258
parentd1be8b138e17ff72f5d3341e7718c72059886c4a

std.c.SIG: make it non-exhaustive

54a84964f8e3cd015688c6929612f7438b7e9553 did this for std.os.linux.SIG but I neglected to also do it for std.c.SIG

1 files changed, 9 insertions(+), 0 deletions(-)

lib/std/c.zig+9
......@@ -2683,6 +2683,7 @@ pub const SIG = switch (native_os) {
26832683 ABRT = 22,
26842684 /// SIGABRT compatible with other platforms, same as SIGABRT
26852685 ABRT_COMPAT = 6,
2686 _,
26862687
26872688 // Signal action codes
26882689 /// default signal action
......@@ -2776,6 +2777,7 @@ pub const SIG = switch (native_os) {
27762777 USR1 = 30,
27772778 /// user defined signal 2
27782779 USR2 = 31,
2780 _,
27792781 },
27802782 .freebsd => enum(u32) {
27812783 pub const BLOCK = 1;
......@@ -2841,6 +2843,7 @@ pub const SIG = switch (native_os) {
28412843 USR2 = 31,
28422844 THR = 32,
28432845 LIBRT = 33,
2846 _,
28442847 },
28452848 .illumos => enum(u32) {
28462849 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
......@@ -2916,6 +2919,7 @@ pub const SIG = switch (native_os) {
29162919 JVM1 = 39,
29172920 JVM2 = 40,
29182921 INFO = 41,
2922 _,
29192923 },
29202924 .netbsd => enum(u32) {
29212925 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
......@@ -2979,6 +2983,7 @@ pub const SIG = switch (native_os) {
29792983 USR1 = 30,
29802984 USR2 = 31,
29812985 PWR = 32,
2986 _,
29822987 },
29832988 .dragonfly => enum(u32) {
29842989 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
......@@ -3027,6 +3032,7 @@ pub const SIG = switch (native_os) {
30273032 THR = 32,
30283033 CKPT = 33,
30293034 CKPTEXIT = 34,
3035 _,
30303036 },
30313037 .haiku => enum(u32) {
30323038 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
......@@ -3073,6 +3079,7 @@ pub const SIG = switch (native_os) {
30733079 BUS = 30,
30743080 RESERVED1 = 31,
30753081 RESERVED2 = 32,
3082 _,
30763083 },
30773084 .openbsd => enum(u32) {
30783085 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
......@@ -3119,6 +3126,7 @@ pub const SIG = switch (native_os) {
31193126 USR1 = 30,
31203127 USR2 = 31,
31213128 PWR = 32,
3129 _,
31223130 },
31233131 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal.h
31243132 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h
......@@ -3164,6 +3172,7 @@ pub const SIG = switch (native_os) {
31643172 INFO = 30,
31653173 SYS = 31,
31663174 CANCEL = 32,
3175 _,
31673176 },
31683177 else => void,
31693178};