From 1a492d5156df400d33a00c5717e049e17f514153 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 31 Aug 2021 19:19:35 -0700 Subject: [PATCH] re-apply a commit dropped in this branch due to conflicts This commit reapplies 4f0aa7d639e099b18df583cb984412037fbb1dbe. --- lib/std/c/dragonfly.zig | 2 +- lib/std/c/freebsd.zig | 2 +- lib/std/os/linux.zig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/std/c/dragonfly.zig b/lib/std/c/dragonfly.zig index ca9a8b847f..82e50a5002 100644 --- a/lib/std/c/dragonfly.zig +++ b/lib/std/c/dragonfly.zig @@ -204,7 +204,7 @@ pub const W = struct { return TERMSIG(s) == 0; } pub fn IFSTOPPED(s: u32) bool { - return @intCast(u16, (((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00; + return @truncate(u16, (((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00; } pub fn IFSIGNALED(s: u32) bool { return (s & 0xffff) -% 1 < 0xff; diff --git a/lib/std/c/freebsd.zig b/lib/std/c/freebsd.zig index 1d0812ccd4..f65af3f915 100644 --- a/lib/std/c/freebsd.zig +++ b/lib/std/c/freebsd.zig @@ -431,7 +431,7 @@ pub const W = struct { return TERMSIG(s) == 0; } pub fn IFSTOPPED(s: u32) bool { - return @intCast(u16, (((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00; + return @truncate(u16, (((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00; } pub fn IFSIGNALED(s: u32) bool { return (s & 0xffff) -% 1 < 0xff; diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index adce478cb8..c4309e288d 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -1788,7 +1788,7 @@ pub const W = struct { return TERMSIG(s) == 0; } pub fn IFSTOPPED(s: u32) bool { - return @intCast(u16, ((s & 0xffff) *% 0x10001) >> 8) > 0x7f00; + return @truncate(u16, ((s & 0xffff) *% 0x10001) >> 8) > 0x7f00; } pub fn IFSIGNALED(s: u32) bool { return (s & 0xffff) -% 1 < 0xff;