authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-01-15 09:51:07+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-01-19 13:15:57+01:00
logfb66d7712ca5d41b408f35835d8b796e1d9c0e73
treebb90b952b9eff6cea78fdb08b8fa4391dc23a689
parent4e99f095aeeb5eb503a629eca33f8649dfa0dd30
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.c: fix W functions for NetBSD

I'm not sure where the old logic came from but it certainly didn't match NetBSD 10.1 system headers, and was causing the build system to see incorrect exit status information for processes that were expected to crash (e.g. SIGABRT).

1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/c.zig+2-2
...@@ -3863,11 +3863,11 @@ pub const W = switch (native_os) {...@@ -3863,11 +3863,11 @@ pub const W = switch (native_os) {
3863 }3863 }
38643864
3865 pub fn IFCONTINUED(s: u32) bool {3865 pub fn IFCONTINUED(s: u32) bool {
3866 return ((s & 0x7f) == 0xffff);3866 return (s == CONTINUED);
3867 }3867 }
38683868
3869 pub fn IFSTOPPED(s: u32) bool {3869 pub fn IFSTOPPED(s: u32) bool {
3870 return ((s & 0x7f != 0x7f) and !IFCONTINUED(s));3870 return (((s & 0x7f) == STOPPED) and !IFCONTINUED(s));
3871 }3871 }
38723872
3873 pub fn IFSIGNALED(s: u32) bool {3873 pub fn IFSIGNALED(s: u32) bool {