zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 45f7c78bfcfe1ddef54ee2de05e9425b990de553 (tree)
parent 2c9effc101f2359f6233fefb47eb850001634b42
Author: daurnimator <quae@daurnimator.com>
Date:   Fri,  8 May 2020 22:11:03 +1000

std: fix RTLD_ constants on OSX

Diffstat:
Mlib/std/os/bits/darwin.zig | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/std/os/bits/darwin.zig b/lib/std/os/bits/darwin.zig @@ -1263,10 +1263,10 @@ pub const RTLD_NOLOAD = 0x10; pub const RTLD_NODELETE = 0x80; pub const RTLD_FIRST = 0x100; -pub const RTLD_NEXT = @intToPtr(*c_void, ~maxInt(usize)); -pub const RTLD_DEFAULT = @intToPtr(*c_void, ~maxInt(usize) - 1); -pub const RTLD_SELF = @intToPtr(*c_void, ~maxInt(usize) - 2); -pub const RTLD_MAIN_ONLY = @intToPtr(*c_void, ~maxInt(usize) - 4); +pub const RTLD_NEXT = @intToPtr(*c_void, @bitCast(usize, @as(isize, -1))); +pub const RTLD_DEFAULT = @intToPtr(*c_void, @bitCast(usize, @as(isize, -2))); +pub const RTLD_SELF = @intToPtr(*c_void, @bitCast(usize, @as(isize, -3))); +pub const RTLD_MAIN_ONLY = @intToPtr(*c_void, @bitCast(usize, @as(isize, -5))); /// duplicate file descriptor pub const F_DUPFD = 0;