diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-08-29 20:19:23 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-08-30 00:48:50 -0700 |
| commit | 9a0970a12bdcae105b6f3f65c0a72d95a209bd35 (patch) | |
| tree | ab0de8f2447b5e52c2bb5c92a976a52fb4b613ee /lib/std/Build/Step/ConfigHeader.zig | |
| parent | 79f267f6b9e7f80a6fed3b1019f9de942841c3be (diff) | |
| download | zig-9a0970a12bdcae105b6f3f65c0a72d95a209bd35.tar.gz zig-9a0970a12bdcae105b6f3f65c0a72d95a209bd35.zip | |
rework std.Io.Writer.Allocating to support runtime-known alignment
Also, breaking API changes to:
* std.fs.Dir.readFileAlloc
* std.fs.Dir.readFileAllocOptions
Diffstat (limited to 'lib/std/Build/Step/ConfigHeader.zig')
| -rw-r--r-- | lib/std/Build/Step/ConfigHeader.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/Build/Step/ConfigHeader.zig b/lib/std/Build/Step/ConfigHeader.zig index 3c7f9a70c2..3f89bf8ec9 100644 --- a/lib/std/Build/Step/ConfigHeader.zig +++ b/lib/std/Build/Step/ConfigHeader.zig @@ -208,7 +208,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void { .autoconf_undef, .autoconf_at => |file_source| { try bw.writeAll(c_generated_line); const src_path = file_source.getPath2(b, step); - const contents = std.fs.cwd().readFileAlloc(arena, src_path, config_header.max_bytes) catch |err| { + const contents = std.fs.cwd().readFileAlloc(src_path, arena, .limited(config_header.max_bytes)) catch |err| { return step.fail("unable to read autoconf input file '{s}': {s}", .{ src_path, @errorName(err), }); @@ -222,7 +222,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void { .cmake => |file_source| { try bw.writeAll(c_generated_line); const src_path = file_source.getPath2(b, step); - const contents = std.fs.cwd().readFileAlloc(arena, src_path, config_header.max_bytes) catch |err| { + const contents = std.fs.cwd().readFileAlloc(src_path, arena, .limited(config_header.max_bytes)) catch |err| { return step.fail("unable to read cmake input file '{s}': {s}", .{ src_path, @errorName(err), }); |
