diff options
| author | Ada Christine <adachristine18@gmail.com> | 2024-02-24 00:59:40 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2024-02-24 00:59:40 +0000 |
| commit | a61b9d1c9ee85ec08ff3b8a61e80dc33e71f3472 (patch) | |
| tree | ed3c6ecaa88d82f422cc73fea30183b9575d7ba3 /api/posix | |
| parent | cadd8266b02035065559ddd27aa0b37051bf16e9 (diff) | |
cleanup
Diffstat (limited to 'api/posix')
| -rw-r--r-- | api/posix/fcntl.h | 4 | ||||
| -rw-r--r-- | api/posix/sys/types.h | 1 | ||||
| -rw-r--r-- | api/posix/unistd.h | 5 |
3 files changed, 10 insertions, 0 deletions
diff --git a/api/posix/fcntl.h b/api/posix/fcntl.h index 7e55e02..8a6ee7a 100644 --- a/api/posix/fcntl.h +++ b/api/posix/fcntl.h @@ -1,4 +1,8 @@ #pragma once +#include "sys/types.h" + #define O_RDONLY 0 +int open(const char *path, int flags, mode_t mode); + diff --git a/api/posix/sys/types.h b/api/posix/sys/types.h index 2be0ef8..81a5f13 100644 --- a/api/posix/sys/types.h +++ b/api/posix/sys/types.h @@ -4,4 +4,5 @@ typedef int64_t ssize_t; typedef int64_t off_t; +typedef int mode_t; diff --git a/api/posix/unistd.h b/api/posix/unistd.h index e440a4a..7487001 100644 --- a/api/posix/unistd.h +++ b/api/posix/unistd.h @@ -1,5 +1,8 @@ #pragma once +#include <stddef.h> +#include "sys/types.h" + #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 @@ -11,3 +14,5 @@ enum seek_whence SEEK_END }; +ssize_t write(int fd, const void *buf, size_t length); + |
