diff options
author | Araq <rumpf_a@web.de> | 2015-04-10 14:17:07 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-04-10 14:17:07 +0200 |
commit | 8ddb58aecc6ddc4c7945258d55debd188c3b5692 (patch) | |
tree | d903c832453c197ac0d7786f6bf37c59dab3db2f /lib/system/sysio.nim | |
parent | 49471440eb4ca9d6afd1aed23c1581c0b8d262f1 (diff) | |
download | Nim-8ddb58aecc6ddc4c7945258d55debd188c3b5692.tar.gz |
fixes bootstrapping on windows
Diffstat (limited to 'lib/system/sysio.nim')
-rw-r--r-- | lib/system/sysio.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index 38a2132b2..3f860655e 100644 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -40,7 +40,8 @@ when defined(posix): proc funlockfile(stream: File) {.importc: "funlockfile", header: "<stdio.h>", tags: [ReadIOEffect].} -elif defined(windows): +elif false: + # doesn't work on Windows yet: proc getc_unlocked(stream: File): cint {.importc: "_fgetc_nolock", header: "<stdio.h>", tags: [ReadIOEffect].} @@ -85,7 +86,7 @@ const proc raiseEIO(msg: string) {.noinline, noreturn.} = sysFatal(IOError, msg) -when defined(posix) or defined(windows): +when declared(getc_unlocked): proc readLine(f: File, line: var TaintedString): bool = setLen(line.string, 0) # reuse the buffer! flockfile(f) |