diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-10-26 14:59:58 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-10-26 15:01:51 -0400 |
| commit | 2b395d4ede2d8ef356c54e1c7c09da88c634be11 (patch) | |
| tree | ddb9806afc26bc55554e20066b29d076bec71f79 /std/dynamic_library.zig | |
| parent | 40b7652a6da135aed68a0067f2de60b8b276713c (diff) | |
| download | zig-2b395d4ede2d8ef356c54e1c7c09da88c634be11.tar.gz zig-2b395d4ede2d8ef356c54e1c7c09da88c634be11.zip | |
remove @minValue,@maxValue; add std.math.minInt,maxInt
closes #1466
closes #1476
Diffstat (limited to 'std/dynamic_library.zig')
| -rw-r--r-- | std/dynamic_library.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/std/dynamic_library.zig b/std/dynamic_library.zig index 7ddb94f84f..30e6f4e974 100644 --- a/std/dynamic_library.zig +++ b/std/dynamic_library.zig @@ -10,6 +10,7 @@ const elf = std.elf; const linux = os.linux; const windows = os.windows; const win_util = @import("os/windows/util.zig"); +const maxInt = std.math.maxInt; pub const DynLib = switch (builtin.os) { Os.linux => LinuxDynLib, @@ -80,7 +81,7 @@ pub const ElfLib = struct.{ const elf_addr = @ptrToInt(bytes.ptr); var ph_addr: usize = elf_addr + eh.e_phoff; - var base: usize = @maxValue(usize); + var base: usize = maxInt(usize); var maybe_dynv: ?[*]usize = null; { var i: usize = 0; @@ -97,7 +98,7 @@ pub const ElfLib = struct.{ } } const dynv = maybe_dynv orelse return error.MissingDynamicLinkingInformation; - if (base == @maxValue(usize)) return error.BaseNotFound; + if (base == maxInt(usize)) return error.BaseNotFound; var maybe_strings: ?[*]u8 = null; var maybe_syms: ?[*]elf.Sym = null; |
