fix assumption about std handles in os2/file.odin

This commit is contained in:
jason
2024-06-28 07:55:33 -04:00
parent a15cbc474d
commit dc954307d7
2 changed files with 7 additions and 5 deletions

View File

@@ -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) {

View File

@@ -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 {