make c_setmode compatible with Borland C; refs #5157
This commit is contained in:
parent
072f932575
commit
33b8ade07c
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue