diff options
Diffstat (limited to 'libc/include/msdos/fcntl.h')
-rw-r--r-- | libc/include/msdos/fcntl.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/libc/include/msdos/fcntl.h b/libc/include/msdos/fcntl.h index 8cf076c..f92ff2a 100644 --- a/libc/include/msdos/fcntl.h +++ b/libc/include/msdos/fcntl.h @@ -1,16 +1,27 @@ #ifndef __MSDOS_FCNTL_H #define __MSDOS_FCNTL_H -/* Definitions taken from the i386 Linux kernel. */ +/* Definitions taken from Ralf Brown interrupt list and Linux kernel */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 +#define O_ACCMODE 0x03 +#define O_RDONLY 0x00 +#define O_WRONLY 0x01 +#define O_RDWR 0x02 + +#define O_DENYMODE 0x70 +#define O_DENYALL 0x10 +#define O_DENYWRITE 0x20 +#define O_DENYREAD 0x30 +#define O_DENYNONE 0x40 +#define O_SETFD 0x80 /* Close on exec flag for open */ + +#define O_CREAT 0x100 /* Moved on DOS to avoid DENY's */ +#define O_TRUNC 0x200 +#define O_APPEND 0x400 +#define O_EXCL 0x800 + +#define O_BINARY 0x0000 +#define O_TEXT 0x8000 /* This right ? Who cares! */ #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get f_flags */ |