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>
(cherry picked from commit e2f412145f)
This commit is contained in:
Jacek Sieka
2022-10-24 17:25:34 +02:00
committed by narimiran
parent 999a4bb750
commit 38730862fc
2 changed files with 2 additions and 2 deletions

View File

@@ -205,7 +205,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 {.

View File

@@ -93,7 +93,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: