mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
make c_setmode compatible with Borland C; refs #5157
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user