From 642b5fb0007b64c77d186fcb018d571152ee1d47 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 14 Aug 2023 18:51:07 +0200 Subject: reorganization: first steps --- src/libc/include/fcntl.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/libc/include/fcntl.h (limited to 'src/libc/include/fcntl.h') diff --git a/src/libc/include/fcntl.h b/src/libc/include/fcntl.h new file mode 100644 index 0000000..6338d1f --- /dev/null +++ b/src/libc/include/fcntl.h @@ -0,0 +1,25 @@ +#pragma once + +#define F_SETFL 1 +#define F_GETFL 2 +#define F_DUPFD 3 +#define F_SETFD 4 + +#define FD_CLOEXEC 1 + +#define O_APPEND 0 +#define O_CREAT 0 +#define O_EXCL 0 +#define O_NONBLOCK 0 +#define O_RDONLY 0 +#define O_RDWR 0 +#define O_TRUNC 0 +#define O_WRONLY 0 + +#define R_OK 1 +#define W_OK 2 +#define X_OK 4 + +/* it can either take an additonal mode_t argument or none */ +int open(const char *path, int flags, ...); +int fcntl(int fd, int cmd, ...); -- cgit v1.2.3