summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-10-16 19:52:22 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-10-16 19:52:32 +0200
commit527e20fd3a0f2cc13afcfb0d402b77087c94c3ee (patch)
treeabf84d945dfdce97fc8e540f1e4b6aeef5c5e042 /lib
parent098bf809b9bc2d58e6271e950d3caff7d19bfa64 (diff)
downloadNim-527e20fd3a0f2cc13afcfb0d402b77087c94c3ee.tar.gz
fixes the Windows build
Diffstat (limited to 'lib')
-rw-r--r--lib/system/sysio.nim10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim
index c0da983f1..a40fcc67d 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.}