| ... | ... | @@ -9,6 +9,7 @@ pub use @import("errno.zig"); |
| 9 | 9 | |
| 10 | 10 | const std = @import("../../index.zig"); |
| 11 | 11 | const c = std.c; |
| 12 | const maxInt = std.math.maxInt; |
| 12 | 13 | pub const Kevent = c.Kevent; |
| 13 | 14 | |
| 14 | 15 | pub const PATH_MAX = 1024; |
| ... | ... | @@ -22,7 +23,7 @@ pub const PROT_READ = 1; |
| 22 | 23 | pub const PROT_WRITE = 2; |
| 23 | 24 | pub const PROT_EXEC = 4; |
| 24 | 25 | |
| 25 | | pub const MAP_FAILED = @maxValue(usize); |
| 26 | pub const MAP_FAILED = maxInt(usize); |
| 26 | 27 | pub const MAP_SHARED = 0x0001; |
| 27 | 28 | pub const MAP_PRIVATE = 0x0002; |
| 28 | 29 | pub const MAP_FIXED = 0x0010; |
| ... | ... | @@ -700,7 +701,7 @@ pub fn sigaction(sig: u6, noalias act: *const Sigaction, noalias oact: ?*Sigacti |
| 700 | 701 | |
| 701 | 702 | const NSIG = 65; |
| 702 | 703 | const sigset_t = [128 / @sizeOf(usize)]usize; |
| 703 | | const all_mask = []usize{@maxValue(usize)}; |
| 704 | const all_mask = []usize{maxInt(usize)}; |
| 704 | 705 | const app_mask = []usize{0xfffffffc7fffffff}; |
| 705 | 706 | |
| 706 | 707 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| ... | ... | @@ -711,7 +712,7 @@ pub const Sigaction = struct { |
| 711 | 712 | flags: u32, |
| 712 | 713 | }; |
| 713 | 714 | |
| 714 | | pub const SIG_ERR = @intToPtr(extern fn (i32) void, @maxValue(usize)); |
| 715 | pub const SIG_ERR = @intToPtr(extern fn (i32) void, maxInt(usize)); |
| 715 | 716 | pub const SIG_DFL = @intToPtr(extern fn (i32) void, 0); |
| 716 | 717 | pub const SIG_IGN = @intToPtr(extern fn (i32) void, 1); |
| 717 | 718 | pub const empty_sigset = []usize{0} ** sigset_t.len; |