mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-14 23:33:28 +00:00
fix fwrite prototype (#20644)
* fix fwrite prototype * Update lib/std/syncio.nim Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
This commit is contained in:
@@ -105,7 +105,7 @@ proc c_feof(f: File): cint {.
|
||||
importc: "feof", header: "<stdio.h>".}
|
||||
|
||||
when not declared(c_fwrite):
|
||||
proc c_fwrite(buf: pointer, size, n: csize_t, f: File): cint {.
|
||||
proc c_fwrite(buf: pointer, size, n: csize_t, f: File): csize_t {.
|
||||
importc: "fwrite", header: "<stdio.h>".}
|
||||
|
||||
# C routine that is used here:
|
||||
|
||||
@@ -211,7 +211,7 @@ else:
|
||||
proc c_realloc*(p: pointer, newsize: csize_t): pointer {.
|
||||
importc: "realloc", header: "<stdlib.h>".}
|
||||
|
||||
proc c_fwrite*(buf: pointer, size, n: csize_t, f: CFilePtr): cint {.
|
||||
proc c_fwrite*(buf: pointer, size, n: csize_t, f: CFilePtr): csize_t {.
|
||||
importc: "fwrite", header: "<stdio.h>".}
|
||||
|
||||
proc c_fflush*(f: CFilePtr): cint {.
|
||||
|
||||
Reference in New Issue
Block a user