From a61b9d1c9ee85ec08ff3b8a61e80dc33e71f3472 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Sat, 24 Feb 2024 00:59:40 +0000 Subject: cleanup --- api/posix/fcntl.h | 4 ++++ api/posix/sys/types.h | 1 + api/posix/unistd.h | 5 +++++ 3 files changed, 10 insertions(+) (limited to 'api/posix') 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 +#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); + -- cgit v1.3.1-1-g115d