diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-09 21:17:12 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-09 21:17:12 +0100 |
| commit | b5cd18739a64c8d923a55b61c89ae3900faafd84 (patch) | |
| tree | d192f7b25257ae9a8a4760c68f5314dcbc0d9b91 /lib/libc/stdio/setvbuf.c | |
| parent | 119aed5bc787ccbf23d2f151759ec1f3a80977e1 (diff) | |
Fix include paths and formatting inconsistencies
Diffstat (limited to 'lib/libc/stdio/setvbuf.c')
| -rw-r--r-- | lib/libc/stdio/setvbuf.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/libc/stdio/setvbuf.c b/lib/libc/stdio/setvbuf.c index 56d7196c..02928a35 100644 --- a/lib/libc/stdio/setvbuf.c +++ b/lib/libc/stdio/setvbuf.c @@ -1,5 +1,7 @@ -#include <io.h> -#include <stdio.h> +#include "stddef.h" // for NULL + +#include <libc.h> // for __IMPL +#include <stdio.h> // for _IONBF, FILE, _IOFBF, _IOLBF, setvbuf, size_t int setvbuf(FILE *restrict stream, char *restrict buf, int type, size_t size) { @@ -8,13 +10,13 @@ int setvbuf(FILE *restrict stream, char *restrict buf, int type, size_t size) if (type != _IONBF && (buf == NULL || size == 0)) return -1; - if (stream->fd < 0) + if (__IMPL(stream)->fd < 0) return -1; - stream->buf = buf; - stream->buf_size = size; - stream->buf_pos = 0; - stream->type = type; + __IMPL(stream)->buf = buf; + __IMPL(stream)->buf_size = size; + __IMPL(stream)->buf_pos = 0; + __IMPL(stream)->type = type; return 0; } |
