diff options
author | dzwdz | 2022-07-26 19:31:06 +0200 |
---|---|---|
committer | dzwdz | 2022-07-26 19:31:06 +0200 |
commit | a3e27d361919392eeb0086ed93b105d8301c7913 (patch) | |
tree | 91996a17172b650416bda82a472336b9d0edcdf0 /src/user/lib/stdlib.c | |
parent | 7a29c68ce0dc190cd6350746210441bc41d7da91 (diff) |
user: move the POSIX-y stuff to the proper header files
Diffstat (limited to 'src/user/lib/stdlib.c')
-rw-r--r-- | src/user/lib/stdlib.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/user/lib/stdlib.c b/src/user/lib/stdlib.c index 943af01..c998de7 100644 --- a/src/user/lib/stdlib.c +++ b/src/user/lib/stdlib.c @@ -1,12 +1,15 @@ #include <camellia/syscalls.h> #include <shared/printf.h> -#include <user/lib/stdlib.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> // TODO oh god this garbage - malloc, actually open, [...] static libc_file _stdin_null = { .fd = 0 }; static libc_file _stdout_null = { .fd = 1 }; -libc_file *stdin = &_stdin_null, *stdout = &_stdout_null; +libc_file *const stdin = &_stdin_null, *const stdout = &_stdout_null; static void backend_file(void *arg, const char *buf, size_t len) { file_write((libc_file*)arg, buf, len); |