commit fb66d7712ca5d41b408f35835d8b796e1d9c0e73 (tree)
parent 4e99f095aeeb5eb503a629eca33f8649dfa0dd30
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Thu, 15 Jan 2026 09:51:07 +0100
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).
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/std/c.zig b/lib/std/c.zig
@@ -3863,11 +3863,11 @@ pub const W = switch (native_os) {
}
pub fn IFCONTINUED(s: u32) bool {
- return ((s & 0x7f) == 0xffff);
+ return (s == CONTINUED);
}
pub fn IFSTOPPED(s: u32) bool {
- return ((s & 0x7f != 0x7f) and !IFCONTINUED(s));
+ return (((s & 0x7f) == STOPPED) and !IFCONTINUED(s));
}
pub fn IFSIGNALED(s: u32) bool {