mirror of git://sourceware.org/git/glibc.git
[__USE_GNU]: Add O_READ, O_WRITE and O_NORW.
This commit is contained in:
parent
bd0059411f
commit
de806c59bb
|
@ -23,6 +23,12 @@
|
||||||
#include <sys/types.h>
|
#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
|
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
|
||||||
located on an ext2 file system */
|
located on an ext2 file system */
|
||||||
#define O_ACCMODE 0003
|
#define O_ACCMODE 0003
|
||||||
|
@ -38,7 +44,8 @@
|
||||||
#define O_APPEND 00010
|
#define O_APPEND 00010
|
||||||
#define O_NDELAY O_NONBLOCK
|
#define O_NDELAY O_NONBLOCK
|
||||||
#define O_SYNC 040000
|
#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_DUPFD 0 /* dup */
|
||||||
#define F_GETFD 1 /* get f_flags */
|
#define F_GETFD 1 /* get f_flags */
|
||||||
|
@ -86,6 +93,7 @@ struct flock
|
||||||
#ifdef __USE_BSD
|
#ifdef __USE_BSD
|
||||||
#define FAPPEND O_APPEND
|
#define FAPPEND O_APPEND
|
||||||
#define FFSYNC O_FSYNC
|
#define FFSYNC O_FSYNC
|
||||||
|
#define FASYNC O_ASYNC
|
||||||
#define FNONBLOCK O_NONBLOCK
|
#define FNONBLOCK O_NONBLOCK
|
||||||
#define FNDELAY O_NDELAY
|
#define FNDELAY O_NDELAY
|
||||||
#endif /* Use BSD. */
|
#endif /* Use BSD. */
|
||||||
|
|
Loading…
Reference in New Issue