diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-08 17:14:31 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:08 -0800 |
| commit | 950d18ef695bb7a28397e080dc3c201559ec4ee2 (patch) | |
| tree | 253209139275932ed503a5ea4529594ab70df8cc /src/libs/mingw.zig | |
| parent | 314c906dba32e72317947a15254519b22745b13f (diff) | |
| download | zig-950d18ef695bb7a28397e080dc3c201559ec4ee2.tar.gz zig-950d18ef695bb7a28397e080dc3c201559ec4ee2.zip | |
update all access() to access(io)
Diffstat (limited to 'src/libs/mingw.zig')
| -rw-r--r-- | src/libs/mingw.zig | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libs/mingw.zig b/src/libs/mingw.zig index b3ca51e833..93f88b9689 100644 --- a/src/libs/mingw.zig +++ b/src/libs/mingw.zig @@ -242,7 +242,7 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void { defer arena_allocator.deinit(); const arena = arena_allocator.allocator(); - const def_file_path = findDef(arena, comp.getTarget(), comp.dirs.zig_lib, lib_name) catch |err| switch (err) { + const def_file_path = findDef(arena, io, comp.getTarget(), comp.dirs.zig_lib, lib_name) catch |err| switch (err) { error.FileNotFound => { log.debug("no {s}.def file available to make a DLL import {s}.lib", .{ lib_name, lib_name }); // In this case we will end up putting foo.lib onto the linker line and letting the linker @@ -402,11 +402,12 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void { pub fn libExists( allocator: Allocator, + io: Io, target: *const std.Target, zig_lib_directory: Cache.Directory, lib_name: []const u8, ) !bool { - const s = findDef(allocator, target, zig_lib_directory, lib_name) catch |err| switch (err) { + const s = findDef(allocator, io, target, zig_lib_directory, lib_name) catch |err| switch (err) { error.FileNotFound => return false, else => |e| return e, }; @@ -418,6 +419,7 @@ pub fn libExists( /// see if a .def file exists. fn findDef( allocator: Allocator, + io: Io, target: *const std.Target, zig_lib_directory: Cache.Directory, lib_name: []const u8, @@ -443,7 +445,7 @@ fn findDef( } else { try override_path.print(fmt_path, .{ lib_path, lib_name }); } - if (Io.Dir.cwd().access(override_path.items, .{})) |_| { + if (Io.Dir.cwd().access(io, override_path.items, .{})) |_| { return override_path.toOwnedSlice(); } else |err| switch (err) { error.FileNotFound => {}, @@ -460,7 +462,7 @@ fn findDef( } else { try override_path.print(fmt_path, .{lib_name}); } - if (Io.Dir.cwd().access(override_path.items, .{})) |_| { + if (Io.Dir.cwd().access(io, override_path.items, .{})) |_| { return override_path.toOwnedSlice(); } else |err| switch (err) { error.FileNotFound => {}, @@ -477,7 +479,7 @@ fn findDef( } else { try override_path.print(fmt_path, .{lib_name}); } - if (Io.Dir.cwd().access(override_path.items, .{})) |_| { + if (Io.Dir.cwd().access(io, override_path.items, .{})) |_| { return override_path.toOwnedSlice(); } else |err| switch (err) { error.FileNotFound => {}, |
