aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/bits/fcntl.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits/fcntl.h')
-rw-r--r--sysdeps/unix/sysv/linux/bits/fcntl.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/fcntl.h b/sysdeps/unix/sysv/linux/bits/fcntl.h
index 4222631129..f63e8ce4eb 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl.h
@@ -24,12 +24,6 @@
#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. */
-#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0003
@@ -47,6 +41,14 @@
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
+/* For now Linux has synchronisity options for data and read operations.
+ We define the symbols here but let them do the same as O_SYNS since
+ this is a superset. */
+#ifdef __USE_UNIX98
+# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
+#endif
+
/* XXX missing */
#ifdef __USE_LARGEFILE64
# define O_LARGEFILE 0