Corrected setStdIoUnbuffered for systems without stdout, stderr or stdin declared.
This commit is contained in:
parent
52b4e8f661
commit
5327cd0a84
1 changed files with 6 additions and 3 deletions
|
|
@ -355,8 +355,11 @@ proc writeFile(filename, content: string) =
|
||||||
sysFatal(IOError, "cannot open: ", filename)
|
sysFatal(IOError, "cannot open: ", filename)
|
||||||
|
|
||||||
proc setStdIoUnbuffered() =
|
proc setStdIoUnbuffered() =
|
||||||
discard setvbuf(stdout, nil, IONBF, 0)
|
when declared(stdout):
|
||||||
discard setvbuf(stderr, nil, IONBF, 0)
|
discard setvbuf(stdout, nil, IONBF, 0)
|
||||||
discard setvbuf(stdin, nil, IONBF, 0)
|
when declared(stderr):
|
||||||
|
discard setvbuf(stderr, nil, IONBF, 0)
|
||||||
|
when declared(stdin):
|
||||||
|
discard setvbuf(stdin, nil, IONBF, 0)
|
||||||
|
|
||||||
{.pop.}
|
{.pop.}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue