about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/fcntlbits.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/fcntlbits.h')
-rw-r--r--sysdeps/unix/sysv/fcntlbits.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/fcntlbits.h b/sysdeps/unix/sysv/fcntlbits.h
index d04901406a..7f38422707 100644
--- a/sysdeps/unix/sysv/fcntlbits.h
+++ b/sysdeps/unix/sysv/fcntlbits.h
@@ -32,8 +32,9 @@
 #define	O_CREAT		00400	/* Create file if it doesn't exist.  */
 #define	O_EXCL		02000	/* Fail if file already exists.  */
 #define	O_TRUNC		01000	/* Truncate file to zero length.  */
-#if	defined (__USE_BSD) || defined (__USE_SVID)
+#if defined __USE_BSD || defined __USE_SVID
 #define	O_SYNC		00020	/* Synchronous writes.  */
+#define	O_FSYNC		O_SYNC
 #endif
 
 /* File status flags for `open' and `fcntl'.  */
@@ -83,4 +84,13 @@ struct flock
 #define	F_UNLCK	3	/* Remove lock.  */
 
 
+/* Define some more compatibility macros to be backward compatible with
+   BSD systems which did not managed to hide these kernel macros.  */
+#ifdef	__USE_BSD
+#define	FAPPEND		O_APPEND
+#define	FFSYNC		O_FSYNC
+#define	FNONBLOCK	O_NONBLOCK
+#define	FNDELAY		O_NDELAY
+#endif /* Use BSD.  */
+
 #endif	/* fcntlbits.h */