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).
This commit is contained in:
Alex Rønne Petersen 2026-01-15 09:51:07 +01:00
parent 4e99f095ae
commit fb66d7712c
No known key found for this signature in database

View file

@ -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 {