From d7c8e1e6df0fe89c4719c647d4b908a76520178e Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 23 Mar 2013 19:20:06 +0100 Subject: [PATCH] Add O_ACCMODE. --- libc/include/fcntl.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h index dc0e97ea..397d1ebf 100644 --- a/libc/include/fcntl.h +++ b/libc/include/fcntl.h @@ -1,6 +1,6 @@ /******************************************************************************* - Copyright(C) Jonas 'Sortie' Termansen 2011. + Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2013. This file is part of the Sortix C Library. @@ -24,8 +24,8 @@ /* TODO: POSIX-1.2008 compliance is only partial */ -#ifndef _FCNTL_H -#define _FCNTL_H 1 +#ifndef INCLUDE_FCNTL_H +#define INCLUDE_FCNTL_H #include #include @@ -42,6 +42,9 @@ __BEGIN_DECLS #define O_WRONLY O_WRITE #define O_RDWR (O_READ | O_WRITE) +/* Compatibility with Linux and other systems that have this. */ +#define O_ACCMODE (O_READ | O_WRITE | O_EXEC | O_SEARCH) + /* TODO: F_* missing here */ /* TODO: F_RDLCK, F_UNLCK, F_WRLCK missing here */