| ... | ... | @@ -2764,12 +2764,7 @@ fn dirCreateDirPathOpenWasi( |
| 2764 | 2764 | |
| 2765 | 2765 | fn dirStat(userdata: ?*anyopaque, dir: Dir) Dir.StatError!Dir.Stat { |
| 2766 | 2766 | const t: *Threaded = @ptrCast(@alignCast(userdata)); |
| 2767 | | const file: File = if (is_windows) .{ |
| 2768 | | .handle = dir.handle, |
| 2769 | | .flags = .{ .nonblocking = false }, |
| 2770 | | } else .{ |
| 2771 | | .handle = dir.handle, |
| 2772 | | }; |
| 2767 | const file: File = .{ .handle = dir.handle }; |
| 2773 | 2768 | return fileStat(t, file); |
| 2774 | 2769 | } |
| 2775 | 2770 | |
| ... | ... | @@ -3692,10 +3687,7 @@ fn dirCreateFileWindows( |
| 3692 | 3687 | errdefer windows.CloseHandle(handle); |
| 3693 | 3688 | |
| 3694 | 3689 | const exclusive = switch (flags.lock) { |
| 3695 | | .none => return .{ |
| 3696 | | .handle = handle, |
| 3697 | | .flags = .{ .nonblocking = false }, |
| 3698 | | }, |
| 3690 | .none => return .{ .handle = handle }, |
| 3699 | 3691 | .shared => false, |
| 3700 | 3692 | .exclusive => true, |
| 3701 | 3693 | }; |
| ... | ... | @@ -3715,10 +3707,7 @@ fn dirCreateFileWindows( |
| 3715 | 3707 | )) { |
| 3716 | 3708 | .SUCCESS => { |
| 3717 | 3709 | syscall.finish(); |
| 3718 | | return .{ |
| 3719 | | .handle = handle, |
| 3720 | | .flags = .{ .nonblocking = false }, |
| 3721 | | }; |
| 3710 | return .{ .handle = handle }; |
| 3722 | 3711 | }, |
| 3723 | 3712 | .INSUFFICIENT_RESOURCES => return syscall.fail(error.SystemResources), |
| 3724 | 3713 | .LOCK_NOT_GRANTED => return syscall.fail(error.WouldBlock), |
| ... | ... | @@ -4289,10 +4278,7 @@ pub fn dirOpenFileWtf16( |
| 4289 | 4278 | errdefer w.CloseHandle(handle); |
| 4290 | 4279 | |
| 4291 | 4280 | const exclusive = switch (flags.lock) { |
| 4292 | | .none => return .{ |
| 4293 | | .handle = handle, |
| 4294 | | .flags = .{ .nonblocking = false }, |
| 4295 | | }, |
| 4281 | .none => return .{ .handle = handle }, |
| 4296 | 4282 | .shared => false, |
| 4297 | 4283 | .exclusive => true, |
| 4298 | 4284 | }; |
| ... | ... | @@ -4315,10 +4301,7 @@ pub fn dirOpenFileWtf16( |
| 4315 | 4301 | .ACCESS_VIOLATION => |err| return syscall.ntstatusBug(err), // bad io_status_block pointer |
| 4316 | 4302 | else => |status| return syscall.unexpectedNtstatus(status), |
| 4317 | 4303 | }; |
| 4318 | | return .{ |
| 4319 | | .handle = handle, |
| 4320 | | .flags = .{ .nonblocking = false }, |
| 4321 | | }; |
| 4304 | return .{ .handle = handle }; |
| 4322 | 4305 | } |
| 4323 | 4306 | |
| 4324 | 4307 | fn dirOpenFileWasi( |
| ... | ... | @@ -8414,7 +8397,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8414 | 8397 | try syscall.checkCancel(); |
| 8415 | 8398 | continue; |
| 8416 | 8399 | }, |
| 8417 | | .INVALID_PARAMETER => |err| return syscall.ntstatusBug(err), // wrong value for flags.nonblocking |
| 8400 | .INVALID_PARAMETER => |err| return syscall.ntstatusBug(err), // streaming read of async mode file |
| 8418 | 8401 | else => |status| return syscall.unexpectedNtstatus(status), |
| 8419 | 8402 | } |
| 8420 | 8403 | } |
| ... | ... | @@ -14602,9 +14585,9 @@ fn processSpawnWindows(userdata: ?*anyopaque, options: process.SpawnOptions) pro |
| 14602 | 14585 | return .{ |
| 14603 | 14586 | .id = piProcInfo.hProcess, |
| 14604 | 14587 | .thread_handle = piProcInfo.hThread, |
| 14605 | | .stdin = if (g_hChildStd_IN_Wr) |h| .{ .handle = h, .flags = .{ .nonblocking = true } } else null, |
| 14606 | | .stdout = if (g_hChildStd_OUT_Rd) |h| .{ .handle = h, .flags = .{ .nonblocking = true } } else null, |
| 14607 | | .stderr = if (g_hChildStd_ERR_Rd) |h| .{ .handle = h, .flags = .{ .nonblocking = true } } else null, |
| 14588 | .stdin = if (g_hChildStd_IN_Wr) |h| .{ .handle = h } else null, |
| 14589 | .stdout = if (g_hChildStd_OUT_Rd) |h| .{ .handle = h } else null, |
| 14590 | .stderr = if (g_hChildStd_ERR_Rd) |h| .{ .handle = h } else null, |
| 14608 | 14591 | .request_resource_usage_statistics = options.request_resource_usage_statistics, |
| 14609 | 14592 | }; |
| 14610 | 14593 | } |
| ... | ... | @@ -15738,7 +15721,6 @@ fn progressParentFile(userdata: ?*anyopaque) std.Progress.ParentFileError!File { |
| 15738 | 15721 | .pointer => @ptrFromInt(int), |
| 15739 | 15722 | else => return error.UnsupportedOperation, |
| 15740 | 15723 | }, |
| 15741 | | .flags = if (is_windows) .{ .nonblocking = true } else .{}, |
| 15742 | 15724 | }; |
| 15743 | 15725 | } |
| 15744 | 15726 | |