authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-19 20:51:06-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-19 20:51:06-07:00
log23c427b5fbd0e83b08d83a00cd343ff9bc4c1824
treeb0f20442fb5cf4a836cab98ef1d8f56ed4951945
parent59711becc74911ba251001de81bbac2a53e81b9f

windows: match the same error code for EBADF


2 files changed, 1 insertions(+), 4 deletions(-)

lib/std/os/windows.zig+1-1
...@@ -469,7 +469,7 @@ pub const WriteFileError = error{...@@ -469,7 +469,7 @@ pub const WriteFileError = error{
469 SystemResources,469 SystemResources,
470 OperationAborted,470 OperationAborted,
471 BrokenPipe,471 BrokenPipe,
472 InvalidFd,472 NotOpenForWriting,
473 Unexpected,473 Unexpected,
474};474};
475475
src-self-hosted/stage2.zig-3
...@@ -164,7 +164,6 @@ export fn stage2_render_ast(tree: *ast.Tree, output_file: *FILE) Error {...@@ -164,7 +164,6 @@ export fn stage2_render_ast(tree: *ast.Tree, output_file: *FILE) Error {
164 error.OutOfMemory => return .OutOfMemory,164 error.OutOfMemory => return .OutOfMemory,
165 error.Unexpected => return .Unexpected,165 error.Unexpected => return .Unexpected,
166 error.InputOutput => return .FileSystem,166 error.InputOutput => return .FileSystem,
167 error.InvalidFd => return .FileSystem,
168 };167 };
169 return .None;168 return .None;
170}169}
...@@ -636,7 +635,6 @@ export fn stage2_libc_parse(stage1_libc: *Stage2LibCInstallation, libc_file_z: [...@@ -636,7 +635,6 @@ export fn stage2_libc_parse(stage1_libc: *Stage2LibCInstallation, libc_file_z: [
636 error.NotDir => return .NotDir,635 error.NotDir => return .NotDir,
637 error.DeviceBusy => return .DeviceBusy,636 error.DeviceBusy => return .DeviceBusy,
638 error.FileLocksNotSupported => unreachable,637 error.FileLocksNotSupported => unreachable,
639 error.InvalidFd => return .FileSystem,
640 };638 };
641 stage1_libc.initFromStage2(libc);639 stage1_libc.initFromStage2(libc);
642 return .None;640 return .None;
...@@ -681,7 +679,6 @@ export fn stage2_libc_render(stage1_libc: *Stage2LibCInstallation, output_file:...@@ -681,7 +679,6 @@ export fn stage2_libc_render(stage1_libc: *Stage2LibCInstallation, output_file:
681 error.AccessDenied => return .AccessDenied,679 error.AccessDenied => return .AccessDenied,
682 error.Unexpected => return .Unexpected,680 error.Unexpected => return .Unexpected,
683 error.InputOutput => return .FileSystem,681 error.InputOutput => return .FileSystem,
684 error.InvalidFd => return .FileSystem,
685 };682 };
686 return .None;683 return .None;
687}684}