Update copyright.

Define O_FSYNC as alias of O_SYNC.  Add BSD compatibility macros
FAPPEND, FFSYNC, FNONBLOCK, and FNDELAY.
This commit is contained in:
Ulrich Drepper 1997-03-16 19:31:13 +00:00
parent 6b05d409ee
commit c6f4ab1a9c

View File

@ -1,21 +1,21 @@
/* O_*, F_*, FD_* bit values for SGI Irix 4. /* O_*, F_*, FD_* bit values for SGI Irix 4.
Copyright (C) 1994 Free Software Foundation, Inc. Copyright (C) 1994, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or 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 modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version. License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful, The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
You should have received a copy of the GNU Library General Public 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 License along with the GNU C Library; see the file COPYING.LIB. If not,
not, write to the Free Software Foundation, Inc., 675 Mass Ave, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Cambridge, MA 02139, USA. */ Boston, MA 02111-1307, USA. */
#ifndef _FCNTLBITS_H #ifndef _FCNTLBITS_H
@ -34,6 +34,7 @@ Cambridge, MA 02139, USA. */
#define O_TRUNC 01000 /* Truncate file to zero length. */ #define O_TRUNC 01000 /* Truncate file to zero length. */
#ifdef __USE_MISC #ifdef __USE_MISC
#define O_SYNC 00020 /* Synchronous writes. */ #define O_SYNC 00020 /* Synchronous writes. */
#define O_FSYNC O_SYNC
#define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */ #define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */
#endif #endif
@ -95,4 +96,15 @@ struct flock
#define F_UNLCK 3 /* Remove lock. */ #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 */ #endif /* fcntlbits.h */