diff options
author | Jacek Sieka <arnetheduck@gmail.com> | 2022-10-24 17:25:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-24 17:25:34 +0200 |
commit | e2f412145f30e3d68eb58fd1456f48de2e0b6614 (patch) | |
tree | 13aceb80e0e61eac79e8f1d9c4abf3a0ae570186 | |
parent | 7c2aa53e4423a56ed1bdb349a1248d0e8eb15b39 (diff) | |
download | Nim-e2f412145f30e3d68eb58fd1456f48de2e0b6614.tar.gz |
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>
-rw-r--r-- | lib/std/syncio.nim | 2 | ||||
-rw-r--r-- | lib/system/ansi_c.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/syncio.nim b/lib/std/syncio.nim index dadad9791..d406c254f 100644 --- a/lib/std/syncio.nim +++ b/lib/std/syncio.nim @@ -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: diff --git a/lib/system/ansi_c.nim b/lib/system/ansi_c.nim index ae4b90504..a8a4bd767 100644 --- a/lib/system/ansi_c.nim +++ b/lib/system/ansi_c.nim @@ -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 {. |