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,7 +2725,8 @@ when not defined(JS): #and not defined(nimscript):
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
# work-around C's sucking abstraction:
|
# work-around C's sucking abstraction:
|
||||||
# BUGFIX: stdin and stdout should be binary files!
|
# BUGFIX: stdin and stdout should be binary files!
|
||||||
proc c_setmode(handle, mode: cint) {.importc: "_setmode",
|
proc c_setmode(handle, mode: cint) {.
|
||||||
|
importc: when defined(bcc): "setmode" else: "_setmode",
|
||||||
header: "<io.h>".}
|
header: "<io.h>".}
|
||||||
var
|
var
|
||||||
O_BINARY {.importc: "O_BINARY", nodecl.}: cint
|
O_BINARY {.importc: "O_BINARY", nodecl.}: cint
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue