From 8fbe82ee2630b344fc855553eb882fe7dd32ef61 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Mar 1997 04:11:21 +0000 Subject: Update copyright. Define O_FSYNC as alias of O_SYNC. Add BSD compatibility macros FAPPEND, FFSYNC, FNONBLOCK, and FNDELAY. --- sysdeps/unix/sysv/fcntlbits.h | 12 ++++++++++- sysdeps/unix/sysv/irix4/fcntlbits.h | 40 ++++++++++++++++++++++++------------- 2 files changed, 37 insertions(+), 15 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 */ diff --git a/sysdeps/unix/sysv/irix4/fcntlbits.h b/sysdeps/unix/sysv/irix4/fcntlbits.h index a8bb776cf4..318e483279 100644 --- a/sysdeps/unix/sysv/irix4/fcntlbits.h +++ b/sysdeps/unix/sysv/irix4/fcntlbits.h @@ -1,21 +1,21 @@ /* O_*, F_*, FD_* bit values for SGI Irix 4. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _FCNTLBITS_H @@ -34,6 +34,7 @@ Cambridge, MA 02139, USA. */ #define O_TRUNC 01000 /* Truncate file to zero length. */ #ifdef __USE_MISC #define O_SYNC 00020 /* Synchronous writes. */ +#define O_FSYNC O_SYNC #define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */ #endif @@ -95,4 +96,15 @@ 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 FASYNC O_ASYNC +#define FNONBLOCK O_NONBLOCK +#define FNDELAY O_NDELAY +#endif /* Use BSD. */ + + #endif /* fcntlbits.h */ -- cgit v1.2.1