summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-12-31 03:04:10 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-12-31 03:04:10 +0100
commit33b8ade07c9baa5620b1e066caa6006c76a105d3 (patch)
tree89684d6cab4348de5f858bc7daf285875b43cc79 /lib/system.nim
parent072f932575965b55adc55beb1bb8d61e10122257 (diff)
downloadNim-33b8ade07c9baa5620b1e066caa6006c76a105d3.tar.gz
make c_setmode compatible with Borland C; refs #5157
Diffstat (limited to 'lib/system.nim')
-rw-r--r--lib/system.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 405d93f50..309df7f84 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -2725,8 +2725,9 @@ when not defined(JS): #and not defined(nimscript):
     when defined(windows):
       # work-around C's sucking abstraction:
       # BUGFIX: stdin and stdout should be binary files!
-      proc c_setmode(handle, mode: cint) {.importc: "_setmode",
-                                           header: "<io.h>".}
+      proc c_setmode(handle, mode: cint) {.
+        importc: when defined(bcc): "setmode" else: "_setmode",
+        header: "<io.h>".}
       var
         O_BINARY {.importc: "O_BINARY", nodecl.}: cint