fixes to allow the usage of clang on windows with the msvc abi and ms headers (#6442)

This commit is contained in:
Charlie Barto 2017-10-09 11:26:53 -04:00 • committed by Andreas Rumpf
commit d55e02ddf1
5 changed files with 20 additions and 18 deletions

View file

@ -15,9 +15,12 @@
{.push debugger:off .} # the user does not want to trace a part
# of the standard library!
proc c_fdopen(filehandle: cint, mode: cstring): File {.
importc: "fdopen", header: "<stdio.h>".}
when defined(windows):
proc c_fdopen(filehandle: cint, mode: cstring): File {.
importc: "_fdopen", header: "<stdio.h>".}
else:
proc c_fdopen(filehandle: cint, mode: cstring): File {.
importc: "fdopen", header: "<stdio.h>".}
proc c_fputs(c: cstring, f: File): cint {.
importc: "fputs", header: "<stdio.h>", tags: [WriteIOEffect].}
proc c_fgets(c: cstring, n: cint, f: File): cstring {.