From 5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f Mon Sep 17 00:00:00 2001 From: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Date: Wed, 21 Jun 2023 23:38:18 -0700 Subject: upgrade zig to `v0.11.0-dev.3737+9eb008717` (#3374) * progress * finish `@memset/@memcpy` update * Update build.zig * change `@enumToInt` to `@intFromEnum` and friends * update zig versions * it was 1 * add link to issue * add `compileError` reminder * fix merge * format * upgrade to llvm 16 * Revert "upgrade to llvm 16" This reverts commit cc930ceb1c5b4db9614a7638596948f704544ab8. --------- Co-authored-by: Jarred Sumner Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/linux_c.zig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/linux_c.zig') diff --git a/src/linux_c.zig b/src/linux_c.zig index dade43a32..12e3c9b73 100644 --- a/src/linux_c.zig +++ b/src/linux_c.zig @@ -148,7 +148,7 @@ pub const SystemErrno = enum(u8) { } if (code >= max) return null; - return @intToEnum(SystemErrno, code); + return @enumFromInt(SystemErrno, code); } pub fn label(this: SystemErrno) ?[]const u8 { @@ -385,9 +385,9 @@ pub fn splice(fd_in: std.os.fd_t, off_in: ?*i64, fd_out: std.os.fd_t, off_out: ? return std.os.linux.syscall6( .splice, @bitCast(usize, @as(isize, fd_in)), - @ptrToInt(off_in), + @intFromPtr(off_in), @bitCast(usize, @as(isize, fd_out)), - @ptrToInt(off_out), + @intFromPtr(off_out), len, flags, ); @@ -438,9 +438,9 @@ pub fn get_system_loadavg() [3]f64 { var info: struct_sysinfo = undefined; if (sysinfo(&info) == @as(c_int, 0)) { return [3]f64{ - std.math.ceil((@intToFloat(f64, info.loads[0]) / 65536.0) * 100.0) / 100.0, - std.math.ceil((@intToFloat(f64, info.loads[1]) / 65536.0) * 100.0) / 100.0, - std.math.ceil((@intToFloat(f64, info.loads[2]) / 65536.0) * 100.0) / 100.0, + std.math.ceil((@floatFromInt(f64, info.loads[0]) / 65536.0) * 100.0) / 100.0, + std.math.ceil((@floatFromInt(f64, info.loads[1]) / 65536.0) * 100.0) / 100.0, + std.math.ceil((@floatFromInt(f64, info.loads[2]) / 65536.0) * 100.0) / 100.0, }; } return [3]f64{ 0, 0, 0 }; -- cgit v1.2.3