diff options
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); + |
