| ... | ... | @@ -2759,12 +2759,7 @@ fn dirCreateDirPathOpenWasi( |
| 2759 | 2759 | |
| 2760 | 2760 | fn dirStat(userdata: ?*anyopaque, dir: Dir) Dir.StatError!Dir.Stat { |
| 2761 | 2761 | const t: *Threaded = @ptrCast(@alignCast(userdata)); |
| 2762 | | const file: File = if (is_windows) .{ |
| 2763 | | .handle = dir.handle, |
| 2764 | | .flags = .{ .nonblocking = false }, |
| 2765 | | } else .{ |
| 2766 | | .handle = dir.handle, |
| 2767 | | }; |
| 2762 | const file: File = .{ .handle = dir.handle }; |
| 2768 | 2763 | return fileStat(t, file); |
| 2769 | 2764 | } |
| 2770 | 2765 | |
| ... | ... | @@ -3686,10 +3681,7 @@ fn dirCreateFileWindows( |
| 3686 | 3681 | errdefer windows.CloseHandle(handle); |
| 3687 | 3682 | |
| 3688 | 3683 | const exclusive = switch (flags.lock) { |
| 3689 | | .none => return .{ |
| 3690 | | .handle = handle, |
| 3691 | | .flags = .{ .nonblocking = false }, |
| 3692 | | }, |
| 3684 | .none => return .{ .handle = handle }, |
| 3693 | 3685 | .shared => false, |
| 3694 | 3686 | .exclusive => true, |
| 3695 | 3687 | }; |
| ... | ... | @@ -3709,10 +3701,7 @@ fn dirCreateFileWindows( |
| 3709 | 3701 | )) { |
| 3710 | 3702 | .SUCCESS => { |
| 3711 | 3703 | syscall.finish(); |
| 3712 | | return .{ |
| 3713 | | .handle = handle, |
| 3714 | | .flags = .{ .nonblocking = false }, |
| 3715 | | }; |
| 3704 | return .{ .handle = handle }; |
| 3716 | 3705 | }, |
| 3717 | 3706 | .INSUFFICIENT_RESOURCES => return syscall.fail(error.SystemResources), |
| 3718 | 3707 | .LOCK_NOT_GRANTED => return syscall.fail(error.WouldBlock), |
| ... | ... | @@ -4287,10 +4276,7 @@ pub fn dirOpenFileWtf16( |
| 4287 | 4276 | errdefer w.CloseHandle(handle); |
| 4288 | 4277 | |
| 4289 | 4278 | const exclusive = switch (flags.lock) { |
| 4290 | | .none => return .{ |
| 4291 | | .handle = handle, |
| 4292 | | .flags = .{ .nonblocking = false }, |
| 4293 | | }, |
| 4279 | .none => return .{ .handle = handle }, |
| 4294 | 4280 | .shared => false, |
| 4295 | 4281 | .exclusive => true, |
| 4296 | 4282 | }; |
| ... | ... | @@ -4313,10 +4299,7 @@ pub fn dirOpenFileWtf16( |
| 4313 | 4299 | .ACCESS_VIOLATION => |err| return syscall.ntstatusBug(err), // bad io_status_block pointer |
| 4314 | 4300 | else => |status| return syscall.unexpectedNtstatus(status), |
| 4315 | 4301 | }; |
| 4316 | | return .{ |
| 4317 | | .handle = handle, |
| 4318 | | .flags = .{ .nonblocking = false }, |
| 4319 | | }; |
| 4302 | return .{ .handle = handle }; |
| 4320 | 4303 | } |
| 4321 | 4304 | |
| 4322 | 4305 | fn dirOpenFileWasi( |
| ... | ... | @@ -8271,7 +8254,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8271 | 8254 | try syscall.checkCancel(); |
| 8272 | 8255 | continue; |
| 8273 | 8256 | }, |
| 8274 | | .INVALID_PARAMETER => |err| return syscall.ntstatusBug(err), // wrong value for flags.nonblocking |
| 8257 | .INVALID_PARAMETER => |err| return syscall.ntstatusBug(err), // streaming read of async mode file |
| 8275 | 8258 | else => |status| return syscall.unexpectedNtstatus(status), |
| 8276 | 8259 | } |
| 8277 | 8260 | } |
| ... | ... | @@ -14363,9 +14346,9 @@ fn processSpawnWindows(userdata: ?*anyopaque, options: process.SpawnOptions) pro |
| 14363 | 14346 | return .{ |
| 14364 | 14347 | .id = piProcInfo.hProcess, |
| 14365 | 14348 | .thread_handle = piProcInfo.hThread, |
| 14366 | | .stdin = if (g_hChildStd_IN_Wr) |h| .{ .handle = h, .flags = .{ .nonblocking = true } } else null, |
| 14367 | | .stdout = if (g_hChildStd_OUT_Rd) |h| .{ .handle = h, .flags = .{ .nonblocking = true } } else null, |
| 14368 | | .stderr = if (g_hChildStd_ERR_Rd) |h| .{ .handle = h, .flags = .{ .nonblocking = true } } else null, |
| 14349 | .stdin = if (g_hChildStd_IN_Wr) |h| .{ .handle = h } else null, |
| 14350 | .stdout = if (g_hChildStd_OUT_Rd) |h| .{ .handle = h } else null, |
| 14351 | .stderr = if (g_hChildStd_ERR_Rd) |h| .{ .handle = h } else null, |
| 14369 | 14352 | .request_resource_usage_statistics = options.request_resource_usage_statistics, |
| 14370 | 14353 | }; |
| 14371 | 14354 | } |
| ... | ... | @@ -15499,7 +15482,6 @@ fn progressParentFile(userdata: ?*anyopaque) std.Progress.ParentFileError!File { |
| 15499 | 15482 | .pointer => @ptrFromInt(int), |
| 15500 | 15483 | else => return error.UnsupportedOperation, |
| 15501 | 15484 | }, |
| 15502 | | .flags = if (is_windows) .{ .nonblocking = true } else .{}, |
| 15503 | 15485 | }; |
| 15504 | 15486 | } |
| 15505 | 15487 | |