From 527e20fd3a0f2cc13afcfb0d402b77087c94c3ee Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 16 Oct 2017 19:52:22 +0200 Subject: [PATCH] fixes the Windows build --- lib/system/sysio.nim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index c0da983f1c..a40fcc67d4 100644 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -406,14 +406,16 @@ proc setStdIoUnbuffered() = when declared(stdout): proc echoBinSafe(args: openArray[string]) {.compilerProc.} = - proc flockfile(f: File) {.importc, noDecl.} - proc funlockfile(f: File) {.importc, noDecl.} - flockfile(stdout) + when not defined(windows): + proc flockfile(f: File) {.importc, noDecl.} + proc funlockfile(f: File) {.importc, noDecl.} + flockfile(stdout) for s in args: discard c_fwrite(s.cstring, s.len, 1, stdout) const linefeed = "\n" # can be 1 or more chars discard c_fwrite(linefeed.cstring, linefeed.len, 1, stdout) discard c_fflush(stdout) - funlockfile(stdout) + when not defined(windows): + funlockfile(stdout) {.pop.}