mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-06 02:34:05 +00:00
fix assumption about std handles in os2/file.odin
This commit is contained in:
@@ -45,11 +45,9 @@ O_TRUNC :: File_Flags{.Trunc}
|
||||
O_SPARSE :: File_Flags{.Sparse}
|
||||
O_CLOEXEC :: File_Flags{.Close_On_Exec}
|
||||
|
||||
|
||||
stdin: ^File = &_stdin
|
||||
stdout: ^File = &_stdout
|
||||
stderr: ^File = &_stderr
|
||||
|
||||
stdin: ^File = nil // OS-Specific
|
||||
stdout: ^File = nil // OS-Specific
|
||||
stderr: ^File = nil // OS-Specific
|
||||
|
||||
@(require_results)
|
||||
create :: proc(name: string) -> (^File, Error) {
|
||||
|
||||
@@ -49,6 +49,10 @@ _standard_stream_init :: proc() {
|
||||
_stdin.stream.data = &_stdin
|
||||
_stdout.stream.data = &_stdout
|
||||
_stderr.stream.data = &_stderr
|
||||
|
||||
stdin = &_stdin
|
||||
stdout = &_stdout
|
||||
stderr = &_stderr
|
||||
}
|
||||
|
||||
_file_allocator :: proc() -> runtime.Allocator {
|
||||
|
||||
Reference in New Issue
Block a user