mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-03 04:24:45 +00:00
fixes to allow the usage of clang on windows with the msvc abi and ms headers (#6442)
This commit is contained in:
committed by
Andreas Rumpf
parent
9b1a23c554
commit
d55e02ddf1
@@ -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>".}
|
||||
|
||||
@@ -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 {.
|
||||
|
||||
Reference in New Issue
Block a user