fixes to allow the usage of clang on windows with the msvc abi and ms headers (#6442)
This commit is contained in:
parent
9b1a23c554
commit
d55e02ddf1
5 changed files with 20 additions and 18 deletions
|
|
@ -103,8 +103,12 @@ proc c_sprintf(buf, frmt: cstring): cint {.
|
|||
importc: "sprintf", header: "<stdio.h>", varargs, noSideEffect.}
|
||||
# we use it only in a way that cannot lead to security issues
|
||||
|
||||
proc c_fileno(f: File): cint {.
|
||||
importc: "fileno", header: "<fcntl.h>".}
|
||||
when defined(windows):
|
||||
proc c_fileno(f: File): cint {.
|
||||
importc: "_fileno", header: "<stdio.h>".}
|
||||
else:
|
||||
proc c_fileno(f: File): cint {.
|
||||
importc: "fileno", header: "<fcntl.h>".}
|
||||
|
||||
proc c_malloc(size: csize): pointer {.
|
||||
importc: "malloc", header: "<stdlib.h>".}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue