authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-10-17 13:34:46-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-10-29 06:20:50-07:00
log43c2ba375db502be3d6ba45cd5e949482e14bfae
treee9c9d3bb362346fd2108f0f9724fc3fdf366d350
parent752d38612f97d7c9aa203615bdde772a71b1330f

std: accessZ -> access


3 files changed, 9 insertions(+), 9 deletions(-)

lib/std/Build/Step/Compile.zig+2-2
......@@ -1701,7 +1701,7 @@ fn getZigArgs(compile: *Compile, fuzz: bool) ![][]const u8 {
17011701 // This prevents a warning, that should probably be upgraded to an error in Zig's
17021702 // CLI parsing code, when the linker sees an -L directory that does not exist.
17031703
1704 if (prefix_dir.accessZ("lib", .{})) |_| {
1704 if (prefix_dir.access("lib", .{})) |_| {
17051705 try zig_args.appendSlice(&.{
17061706 "-L", b.pathJoin(&.{ search_prefix, "lib" }),
17071707 });
......@@ -1712,7 +1712,7 @@ fn getZigArgs(compile: *Compile, fuzz: bool) ![][]const u8 {
17121712 }),
17131713 }
17141714
1715 if (prefix_dir.accessZ("include", .{})) |_| {
1715 if (prefix_dir.access("include", .{})) |_| {
17161716 try zig_args.appendSlice(&.{
17171717 "-I", b.pathJoin(&.{ search_prefix, "include" }),
17181718 });
lib/std/os.zig+1-1
......@@ -57,7 +57,7 @@ pub var argv: [][*:0]u8 = if (builtin.link_libc) undefined else switch (native_o
5757};
5858
5959/// Call from Windows-specific code if you already have a WTF-16LE encoded, null terminated string.
60/// Otherwise use `access` or `accessZ`.
60/// Otherwise use `access`.
6161pub fn accessW(path: [*:0]const u16) windows.GetFileAttributesError!void {
6262 const ret = try windows.GetFileAttributesW(path);
6363 if (ret != windows.INVALID_FILE_ATTRIBUTES) {
lib/std/zig/LibCInstallation.zig+6-6
......@@ -329,7 +329,7 @@ fn findNativeIncludeDirPosix(self: *LibCInstallation, args: FindNativeOptions) F
329329 defer search_dir.close();
330330
331331 if (self.include_dir == null) {
332 if (search_dir.accessZ(include_dir_example_file, .{})) |_| {
332 if (search_dir.access(include_dir_example_file, .{})) |_| {
333333 self.include_dir = try allocator.dupeZ(u8, search_path);
334334 } else |err| switch (err) {
335335 error.FileNotFound => {},
......@@ -338,7 +338,7 @@ fn findNativeIncludeDirPosix(self: *LibCInstallation, args: FindNativeOptions) F
338338 }
339339
340340 if (self.sys_include_dir == null) {
341 if (search_dir.accessZ(sys_include_dir_example_file, .{})) |_| {
341 if (search_dir.access(sys_include_dir_example_file, .{})) |_| {
342342 self.sys_include_dir = try allocator.dupeZ(u8, search_path);
343343 } else |err| switch (err) {
344344 error.FileNotFound => {},
......@@ -382,7 +382,7 @@ fn findNativeIncludeDirWindows(
382382 };
383383 defer dir.close();
384384
385 dir.accessZ("stdlib.h", .{}) catch |err| switch (err) {
385 dir.access("stdlib.h", .{}) catch |err| switch (err) {
386386 error.FileNotFound => continue,
387387 else => return error.FileSystem,
388388 };
......@@ -429,7 +429,7 @@ fn findNativeCrtDirWindows(
429429 };
430430 defer dir.close();
431431
432 dir.accessZ("ucrt.lib", .{}) catch |err| switch (err) {
432 dir.access("ucrt.lib", .{}) catch |err| switch (err) {
433433 error.FileNotFound => continue,
434434 else => return error.FileSystem,
435435 };
......@@ -496,7 +496,7 @@ fn findNativeKernel32LibDir(
496496 };
497497 defer dir.close();
498498
499 dir.accessZ("kernel32.lib", .{}) catch |err| switch (err) {
499 dir.access("kernel32.lib", .{}) catch |err| switch (err) {
500500 error.FileNotFound => continue,
501501 else => return error.FileSystem,
502502 };
......@@ -531,7 +531,7 @@ fn findNativeMsvcIncludeDir(
531531 };
532532 defer dir.close();
533533
534 dir.accessZ("vcruntime.h", .{}) catch |err| switch (err) {
534 dir.access("vcruntime.h", .{}) catch |err| switch (err) {
535535 error.FileNotFound => return error.LibCStdLibHeaderNotFound,
536536 else => return error.FileSystem,
537537 };