mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
libstd: use windows.GetStdHandle() with stage2_x86_64 backend for now
This commit is contained in:
parent
e0167ae0e3
commit
423f424c27
@ -36,6 +36,10 @@ pub const default_mode: ModeOverride = if (is_async) Mode.evented else .blocking
|
||||
|
||||
fn getStdOutHandle() os.fd_t {
|
||||
if (builtin.os.tag == .windows) {
|
||||
if (builtin.zig_backend == .stage2_x86_64) {
|
||||
// TODO: this is just a temporary workaround until we advance x86 backend further along.
|
||||
return os.windows.GetStdHandle(os.windows.STD_OUTPUT_HANDLE) catch os.windows.INVALID_HANDLE_VALUE;
|
||||
}
|
||||
return os.windows.peb().ProcessParameters.hStdOutput;
|
||||
}
|
||||
|
||||
@ -58,6 +62,10 @@ pub fn getStdOut() File {
|
||||
|
||||
fn getStdErrHandle() os.fd_t {
|
||||
if (builtin.os.tag == .windows) {
|
||||
if (builtin.zig_backend == .stage2_x86_64) {
|
||||
// TODO: this is just a temporary workaround until we advance x86 backend further along.
|
||||
return os.windows.GetStdHandle(os.windows.STD_ERROR_HANDLE) catch os.windows.INVALID_HANDLE_VALUE;
|
||||
}
|
||||
return os.windows.peb().ProcessParameters.hStdError;
|
||||
}
|
||||
|
||||
@ -80,6 +88,10 @@ pub fn getStdErr() File {
|
||||
|
||||
fn getStdInHandle() os.fd_t {
|
||||
if (builtin.os.tag == .windows) {
|
||||
if (builtin.zig_backend == .stage2_x86_64) {
|
||||
// TODO: this is just a temporary workaround until we advance x86 backend further along.
|
||||
return os.windows.GetStdHandle(os.windows.STD_INPUT_HANDLE) catch os.windows.INVALID_HANDLE_VALUE;
|
||||
}
|
||||
return os.windows.peb().ProcessParameters.hStdInput;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user