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) {...@@ -2683,6 +2683,7 @@ pub const SIG = switch (native_os) {
2683 ABRT = 22,2683 ABRT = 22,
2684 /// SIGABRT compatible with other platforms, same as SIGABRT2684 /// SIGABRT compatible with other platforms, same as SIGABRT
2685 ABRT_COMPAT = 6,2685 ABRT_COMPAT = 6,
2686 _,
26862687
2687 // Signal action codes2688 // Signal action codes
2688 /// default signal action2689 /// default signal action
...@@ -2776,6 +2777,7 @@ pub const SIG = switch (native_os) {...@@ -2776,6 +2777,7 @@ pub const SIG = switch (native_os) {
2776 USR1 = 30,2777 USR1 = 30,
2777 /// user defined signal 22778 /// user defined signal 2
2778 USR2 = 31,2779 USR2 = 31,
2780 _,
2779 },2781 },
2780 .freebsd => enum(u32) {2782 .freebsd => enum(u32) {
2781 pub const BLOCK = 1;2783 pub const BLOCK = 1;
...@@ -2841,6 +2843,7 @@ pub const SIG = switch (native_os) {...@@ -2841,6 +2843,7 @@ pub const SIG = switch (native_os) {
2841 USR2 = 31,2843 USR2 = 31,
2842 THR = 32,2844 THR = 32,
2843 LIBRT = 33,2845 LIBRT = 33,
2846 _,
2844 },2847 },
2845 .illumos => enum(u32) {2848 .illumos => enum(u32) {
2846 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);2849 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
...@@ -2916,6 +2919,7 @@ pub const SIG = switch (native_os) {...@@ -2916,6 +2919,7 @@ pub const SIG = switch (native_os) {
2916 JVM1 = 39,2919 JVM1 = 39,
2917 JVM2 = 40,2920 JVM2 = 40,
2918 INFO = 41,2921 INFO = 41,
2922 _,
2919 },2923 },
2920 .netbsd => enum(u32) {2924 .netbsd => enum(u32) {
2921 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);2925 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
...@@ -2979,6 +2983,7 @@ pub const SIG = switch (native_os) {...@@ -2979,6 +2983,7 @@ pub const SIG = switch (native_os) {
2979 USR1 = 30,2983 USR1 = 30,
2980 USR2 = 31,2984 USR2 = 31,
2981 PWR = 32,2985 PWR = 32,
2986 _,
2982 },2987 },
2983 .dragonfly => enum(u32) {2988 .dragonfly => enum(u32) {
2984 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);2989 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
...@@ -3027,6 +3032,7 @@ pub const SIG = switch (native_os) {...@@ -3027,6 +3032,7 @@ pub const SIG = switch (native_os) {
3027 THR = 32,3032 THR = 32,
3028 CKPT = 33,3033 CKPT = 33,
3029 CKPTEXIT = 34,3034 CKPTEXIT = 34,
3035 _,
3030 },3036 },
3031 .haiku => enum(u32) {3037 .haiku => enum(u32) {
3032 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);3038 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
...@@ -3073,6 +3079,7 @@ pub const SIG = switch (native_os) {...@@ -3073,6 +3079,7 @@ pub const SIG = switch (native_os) {
3073 BUS = 30,3079 BUS = 30,
3074 RESERVED1 = 31,3080 RESERVED1 = 31,
3075 RESERVED2 = 32,3081 RESERVED2 = 32,
3082 _,
3076 },3083 },
3077 .openbsd => enum(u32) {3084 .openbsd => enum(u32) {
3078 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);3085 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
...@@ -3119,6 +3126,7 @@ pub const SIG = switch (native_os) {...@@ -3119,6 +3126,7 @@ pub const SIG = switch (native_os) {
3119 USR1 = 30,3126 USR1 = 30,
3120 USR2 = 31,3127 USR2 = 31,
3121 PWR = 32,3128 PWR = 32,
3129 _,
3122 },3130 },
3123 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal.h3131 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal.h
3124 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h3132 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h
...@@ -3164,6 +3172,7 @@ pub const SIG = switch (native_os) {...@@ -3164,6 +3172,7 @@ pub const SIG = switch (native_os) {
3164 INFO = 30,3172 INFO = 30,
3165 SYS = 31,3173 SYS = 31,
3166 CANCEL = 32,3174 CANCEL = 32,
3175 _,
3167 },3176 },
3168 else => void,3177 else => void,
3169};3178};