diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-03-17 04:12:44 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-03-17 04:12:44 +0000 |
commit | c424f2da594c84d1d5891e7a1629b6b3381fc431 (patch) | |
tree | 336a81f9a9876d4b964a40b59f7315ffc15369bf /sysdeps/unix | |
parent | cac34d519abb06241f3130a17f508973ebc8de8a (diff) |
[__USE_GNU]: Add O_READ, O_WRITE and O_NORW.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/fcntlbits.h | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/fcntlbits.h | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h index e8697d9898..faf198393f 100644 --- a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h +++ b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h @@ -23,6 +23,12 @@ #include <sys/types.h> +/* In GNU, read and write are bits (unlike BSD). */ +#ifdef __USE_GNU +#define O_READ O_RDONLY /* Open for reading. */ +#define O_WRITE O_WRONLY /* Open for writing. */ +#define O_NORW 0 /* Open without R/W access. */ +#endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ #define O_ACCMODE 0003 @@ -38,7 +44,8 @@ #define O_APPEND 00010 #define O_NDELAY O_NONBLOCK #define O_SYNC 040000 -#define FASYNC 020000 /* fcntl, for BSD compatibility */ +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 /* fcntl, for BSD compatibility */ #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get f_flags */ @@ -86,6 +93,7 @@ struct flock #ifdef __USE_BSD #define FAPPEND O_APPEND #define FFSYNC O_FSYNC +#define FASYNC O_ASYNC #define FNONBLOCK O_NONBLOCK #define FNDELAY O_NDELAY #endif /* Use BSD. */ diff --git a/sysdeps/unix/sysv/linux/fcntlbits.h b/sysdeps/unix/sysv/linux/fcntlbits.h index d7e889fc5e..fdc67ce4eb 100644 --- a/sysdeps/unix/sysv/linux/fcntlbits.h +++ b/sysdeps/unix/sysv/linux/fcntlbits.h @@ -23,6 +23,12 @@ #include <sys/types.h> +/* In GNU, read and write are bits (unlike BSD). */ +#ifdef __USE_GNU +#define O_READ O_RDONLY /* Open for reading. */ +#define O_WRITE O_WRONLY /* Open for writing. */ +#define O_NORW 0 /* Open without R/W access. */ +#endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ #define O_ACCMODE 0003 @@ -37,7 +43,8 @@ #define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK #define O_SYNC 010000 -#define FASYNC 020000 /* fcntl, for BSD compatibility */ +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get f_flags */ @@ -85,6 +92,7 @@ struct flock #ifdef __USE_BSD #define FAPPEND O_APPEND #define FFSYNC O_FSYNC +#define FASYNC O_ASYNC #define FNONBLOCK O_NONBLOCK #define FNDELAY O_NDELAY #endif /* Use BSD. */ |