| author | |
| committer | |
| log | 9bbb8e0d8e8ce413ad2a9125b1eb9ddbf32b6c87 |
| tree | 6a42782bc073303feb1157c705fb129fb1972b24 |
| parent | f078c7138f0dfbab95d8963e6c067515c6a54460 |
instead of void4 files changed, 12 insertions(+), 16 deletions(-)
lib/std/Io/Threaded.zig+2-2| ... | ... | @@ -2168,7 +2168,7 @@ fn fileStatWindows(userdata: ?*anyopaque, file: File) File.StatError!File.Stat { |
| 2168 | 2168 | .atime = windows.fromSysTime(info.BasicInformation.LastAccessTime), |
| 2169 | 2169 | .mtime = windows.fromSysTime(info.BasicInformation.LastWriteTime), |
| 2170 | 2170 | .ctime = windows.fromSysTime(info.BasicInformation.ChangeTime), |
| 2171 | .nlink = {}, | |
| 2171 | .nlink = 0, | |
| 2172 | 2172 | }; |
| 2173 | 2173 | } |
| 2174 | 2174 | |
| ... | ... | @@ -3763,7 +3763,7 @@ fn dirReadWindows(userdata: ?*anyopaque, dr: *Dir.Reader, buffer: []Dir.Entry) D |
| 3763 | 3763 | null, |
| 3764 | 3764 | &io_status_block, |
| 3765 | 3765 | unreserved_buffer.ptr, |
| 3766 | std.math.cast(w.ULONG, unreserved_buffer.len) orelse std.math.maxInt(w.ULONG), | |
| 3766 | std.math.lossyCast(w.ULONG, unreserved_buffer.len), | |
| 3767 | 3767 | .BothDirectory, |
| 3768 | 3768 | w.FALSE, |
| 3769 | 3769 | null, |
lib/std/Io/Writer.zig+3-3| ... | ... | @@ -2842,7 +2842,7 @@ test "discarding sendFile" { |
| 2842 | 2842 | try file_writer.interface.writeByte('h'); |
| 2843 | 2843 | try file_writer.interface.flush(); |
| 2844 | 2844 | |
| 2845 | var file_reader = file_writer.moveToReader(io); | |
| 2845 | var file_reader = file_writer.moveToReader(); | |
| 2846 | 2846 | try file_reader.seekTo(0); |
| 2847 | 2847 | |
| 2848 | 2848 | var w_buffer: [256]u8 = undefined; |
| ... | ... | @@ -2864,7 +2864,7 @@ test "allocating sendFile" { |
| 2864 | 2864 | try file_writer.interface.writeAll("abcd"); |
| 2865 | 2865 | try file_writer.interface.flush(); |
| 2866 | 2866 | |
| 2867 | var file_reader = file_writer.moveToReader(io); | |
| 2867 | var file_reader = file_writer.moveToReader(); | |
| 2868 | 2868 | try file_reader.seekTo(0); |
| 2869 | 2869 | try file_reader.interface.fill(2); |
| 2870 | 2870 | |
| ... | ... | @@ -2888,7 +2888,7 @@ test sendFileReading { |
| 2888 | 2888 | try file_writer.interface.writeAll("abcd"); |
| 2889 | 2889 | try file_writer.interface.flush(); |
| 2890 | 2890 | |
| 2891 | var file_reader = file_writer.moveToReader(io); | |
| 2891 | var file_reader = file_writer.moveToReader(); | |
| 2892 | 2892 | try file_reader.seekTo(0); |
| 2893 | 2893 | try file_reader.interface.fill(2); |
| 2894 | 2894 |
lib/std/fs/test.zig+6-11| ... | ... | @@ -24,7 +24,7 @@ const PathType = enum { |
| 24 | 24 | absolute, |
| 25 | 25 | unc, |
| 26 | 26 | |
| 27 | pub fn isSupported(self: PathType, target_os: std.Target.Os) bool { | |
| 27 | fn isSupported(self: PathType, target_os: std.Target.Os) bool { | |
| 28 | 28 | return switch (self) { |
| 29 | 29 | .relative => true, |
| 30 | 30 | .absolute => target_os.tag == .windows, // TODO: implement getPathForHandle for other targets |
| ... | ... | @@ -32,10 +32,10 @@ const PathType = enum { |
| 32 | 32 | }; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | pub const TransformError = Dir.RealPathError || error{OutOfMemory}; | |
| 36 | pub const TransformFn = fn (allocator: mem.Allocator, dir: Dir, relative_path: [:0]const u8) TransformError![:0]const u8; | |
| 35 | const TransformError = Dir.RealPathError || error{OutOfMemory}; | |
| 36 | const TransformFn = fn (allocator: mem.Allocator, dir: Dir, relative_path: [:0]const u8) TransformError![:0]const u8; | |
| 37 | 37 | |
| 38 | pub fn getTransformFn(comptime path_type: PathType) TransformFn { | |
| 38 | fn getTransformFn(comptime path_type: PathType) TransformFn { | |
| 39 | 39 | switch (path_type) { |
| 40 | 40 | .relative => return struct { |
| 41 | 41 | fn transform(allocator: mem.Allocator, dir: Dir, relative_path: [:0]const u8) TransformError![:0]const u8 { |
| ... | ... | @@ -1623,7 +1623,7 @@ test "copyFile" { |
| 1623 | 1623 | try ctx.dir.copyFile(src_file, ctx.dir, dest_file, io, .{}); |
| 1624 | 1624 | defer ctx.dir.deleteFile(io, dest_file) catch {}; |
| 1625 | 1625 | |
| 1626 | try ctx.dir.copyFile(src_file, ctx.dir, dest_file2, io, .{ .permissions = .default_file }); | |
| 1626 | try ctx.dir.copyFile(src_file, ctx.dir, dest_file2, io, .{}); | |
| 1627 | 1627 | defer ctx.dir.deleteFile(io, dest_file2) catch {}; |
| 1628 | 1628 | |
| 1629 | 1629 | try expectFileContents(io, ctx.dir, dest_file, data); |
| ... | ... | @@ -1740,12 +1740,7 @@ test "open file with exclusive lock twice, make sure second lock waits" { |
| 1740 | 1740 | var started: std.Thread.ResetEvent = .unset; |
| 1741 | 1741 | var locked: std.Thread.ResetEvent = .unset; |
| 1742 | 1742 | |
| 1743 | const t = try std.Thread.spawn(.{}, S.checkFn, .{ | |
| 1744 | ctx, | |
| 1745 | filename, | |
| 1746 | &started, | |
| 1747 | &locked, | |
| 1748 | }); | |
| 1743 | const t = try std.Thread.spawn(.{}, S.checkFn, .{ ctx, filename, &started, &locked }); | |
| 1749 | 1744 | defer t.join(); |
| 1750 | 1745 | |
| 1751 | 1746 | // Wait for the spawned thread to start trying to acquire the exclusive file lock. |
lib/std/posix.zig+1| ... | ... | @@ -54,6 +54,7 @@ else switch (native_os) { |
| 54 | 54 | pub const uid_t = void; |
| 55 | 55 | pub const gid_t = void; |
| 56 | 56 | pub const mode_t = u0; |
| 57 | pub const nlink_t = u0; | |
| 57 | 58 | pub const ino_t = void; |
| 58 | 59 | pub const IFNAMESIZE = {}; |
| 59 | 60 | pub const SIG = void; |