mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
std: fix compilation errors on macos
This commit is contained in:
parent
f14c4c3db8
commit
7b1502f327
2 changed files with 5 additions and 9 deletions
|
|
@ -29,6 +29,10 @@ pub fn main() !void {
|
|||
const arena = arena_instance.allocator();
|
||||
const gpa = arena;
|
||||
|
||||
var threaded: std.Io.Threaded = .init(gpa);
|
||||
defer threaded.deinit();
|
||||
const io = threaded.io();
|
||||
|
||||
const args = try std.process.argsAlloc(arena);
|
||||
const zig_lib_directory = args[1];
|
||||
|
||||
|
|
@ -66,7 +70,7 @@ pub fn main() !void {
|
|||
const target_query = std.zig.parseTargetQueryOrReportFatalError(gpa, .{
|
||||
.arch_os_abi = target_arch_os_abi,
|
||||
});
|
||||
const target = std.zig.resolveTargetQueryOrFatal(target_query);
|
||||
const target = std.zig.resolveTargetQueryOrFatal(io, target_query);
|
||||
|
||||
if (print_includes) {
|
||||
const libc_installation: ?*LibCInstallation = libc: {
|
||||
|
|
|
|||
|
|
@ -1433,14 +1433,6 @@ test "setEndPos" {
|
|||
try testing.expectEqual(0, try f.getEndPos());
|
||||
try reader.seekTo(0);
|
||||
try testing.expectEqual(0, try reader.interface.readSliceShort(&buffer));
|
||||
|
||||
// Invalid file length should error gracefully. Actual limit is host
|
||||
// and file-system dependent, but 1PB should fail on filesystems like
|
||||
// EXT4 and NTFS. But XFS or Btrfs support up to 8EiB files.
|
||||
try testing.expectError(error.FileTooBig, f.setEndPos(0x4_0000_0000_0000));
|
||||
try testing.expectError(error.FileTooBig, f.setEndPos(std.math.maxInt(u63)));
|
||||
try testing.expectError(error.FileTooBig, f.setEndPos(std.math.maxInt(u63) + 1));
|
||||
try testing.expectError(error.FileTooBig, f.setEndPos(std.math.maxInt(u64)));
|
||||
}
|
||||
|
||||
test "access file" {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue