From 8fd4943b2721696f86783d22dd2e8d593a22a766 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 2 Jun 2023 15:25:11 +0200 Subject: libc: stub out sltar's requirements --- src/user/lib/include/unistd.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/user/lib/include/unistd.h') diff --git a/src/user/lib/include/unistd.h b/src/user/lib/include/unistd.h index a1c18e8..8c0eab0 100644 --- a/src/user/lib/include/unistd.h +++ b/src/user/lib/include/unistd.h @@ -1,18 +1,30 @@ #pragma once #include // TODO only needed because of hid_t +#include #include +// TODO custom stdint.h, ssize_t doesn't belong here +typedef long long ssize_t; + int fork(void); int close(hid_t h); _Noreturn void _exit(int); +ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); +int link(const char *path1, const char *path2); int unlink(const char *path); +int symlink(const char *path1, const char *path2); int isatty(int fd); int execv(const char *path, char *const argv[]); int chdir(const char *path); char *getcwd(char *buf, size_t size); + +uid_t getuid(void); +int chown(const char *path, uid_t owner, gid_t group); + + /* Converts a relative path to an absolute one, simplifying it if possible. * If in == NULL - return the length of cwd. Doesn't include the trailing slash, * except for the root dir. Includes the null byte. -- cgit v1.2.3