diff options
Diffstat (limited to 'lib/std/os/windows.zig')
| -rw-r--r-- | lib/std/os/windows.zig | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index 66583d21b2..932e401758 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -749,7 +749,7 @@ pub const GetCurrentDirectoryError = error{ }; /// The result is a slice of `buffer`, indexed from 0. -/// The result is encoded as [WTF-8](https://simonsapin.github.io/wtf-8/). +/// The result is encoded as [WTF-8](https://wtf-8.codeberg.page/). pub fn GetCurrentDirectory(buffer: []u8) GetCurrentDirectoryError![]u8 { var wtf16le_buf: [PATH_MAX_WIDE:0]u16 = undefined; const result = kernel32.GetCurrentDirectoryW(wtf16le_buf.len + 1, &wtf16le_buf); @@ -976,7 +976,7 @@ pub fn ReadLink(dir: ?HANDLE, sub_path_w: []const u16, out_buffer: []u8) ReadLin } /// Asserts that there is enough space is `out_buffer`. -/// The result is encoded as [WTF-8](https://simonsapin.github.io/wtf-8/). +/// The result is encoded as [WTF-8](https://wtf-8.codeberg.page/). fn parseReadlinkPath(path: []const u16, is_relative: bool, out_buffer: []u8) []u8 { const win32_namespace_path = path: { if (is_relative) break :path path; @@ -1912,6 +1912,7 @@ pub const CreateProcessError = error{ NameTooLong, InvalidExe, SystemResources, + FileBusy, Unexpected, }; @@ -1982,6 +1983,7 @@ pub fn CreateProcessW( .INVALID_PARAMETER => unreachable, .INVALID_NAME => return error.InvalidName, .FILENAME_EXCED_RANGE => return error.NameTooLong, + .SHARING_VIOLATION => return error.FileBusy, // These are all the system errors that are mapped to ENOEXEC by // the undocumented _dosmaperr (old CRT) or __acrt_errno_map_os_error // (newer CRT) functions. Their code can be found in crt/src/dosmap.c (old SDK) @@ -2416,13 +2418,13 @@ pub const Wtf8ToPrefixedFileWError = error{InvalidWtf8} || Wtf16ToPrefixedFileWE /// Same as `sliceToPrefixedFileW` but accepts a pointer /// to a null-terminated WTF-8 encoded path. -/// https://simonsapin.github.io/wtf-8/ +/// https://wtf-8.codeberg.page/ pub fn cStrToPrefixedFileW(dir: ?HANDLE, s: [*:0]const u8) Wtf8ToPrefixedFileWError!PathSpace { return sliceToPrefixedFileW(dir, mem.sliceTo(s, 0)); } /// Same as `wToPrefixedFileW` but accepts a WTF-8 encoded path. -/// https://simonsapin.github.io/wtf-8/ +/// https://wtf-8.codeberg.page/ pub fn sliceToPrefixedFileW(dir: ?HANDLE, path: []const u8) Wtf8ToPrefixedFileWError!PathSpace { var temp_path: PathSpace = undefined; temp_path.len = try std.unicode.wtf8ToWtf16Le(&temp_path.data, path); @@ -2849,7 +2851,7 @@ pub fn unexpectedError(err: Win32Error) UnexpectedError { std.debug.print("error.Unexpected: GetLastError({d}): {f}\n", .{ err, std.unicode.fmtUtf16Le(buf_wstr[0..len]), }); - std.debug.dumpCurrentStackTrace(@returnAddress()); + std.debug.dumpCurrentStackTrace(.{ .first_address = @returnAddress() }); } return error.Unexpected; } @@ -2863,7 +2865,7 @@ pub fn unexpectedWSAError(err: ws2_32.WinsockError) UnexpectedError { pub fn unexpectedStatus(status: NTSTATUS) UnexpectedError { if (std.posix.unexpected_error_tracing) { std.debug.print("error.Unexpected NTSTATUS=0x{x}\n", .{@intFromEnum(status)}); - std.debug.dumpCurrentStackTrace(@returnAddress()); + std.debug.dumpCurrentStackTrace(.{ .first_address = @returnAddress() }); } return error.Unexpected; } |
