posix: fix test on netbsd

This commit is contained in:
Laytan Laats
2024-08-14 01:44:37 +02:00
parent 726891588f
commit 4a61bac100
3 changed files with 18 additions and 7 deletions
+1 -1
View File
@@ -408,7 +408,7 @@ SA_Flags_Bits :: enum c.int {
RESTART = log2(SA_RESTART),
// Cause extra information to be passed to signal handlers at the time of receipt of a signal.
SIGINFO = log2(SA_SIGINFO),
// Cause implemention not to create zombie processes or status information on child termination.
// Cause implementation not to create zombie processes or status information on child termination.
NOCLDWAIT = log2(SA_NOCLDWAIT),
// Cause signal not to be automatically blocked on entry to signal handler.
SA_NODEFER = log2(SA_NODEFER),
+2 -2
View File
@@ -290,7 +290,7 @@ when ODIN_OS == .Darwin {
@(private)
_WEXITSTATUS :: #force_inline proc "contextless" (x: c.int) -> c.int {
return (x >> 8) & 0x000000ff
return c.int((c.uint(x) >> 8) & 0xff)
}
@(private)
@@ -310,7 +310,7 @@ when ODIN_OS == .Darwin {
@(private)
_WSTOPSIG :: #force_inline proc "contextless" (x: c.int) -> Signal {
return Signal((x >> 8) & 0xff)
return Signal(c.int((c.uint(x) >> 8) & 0xff))
}
@(private)