* fhandler.cc (fhandler_base::open_9x): Handle O_SYNC and O_DIRECT

flags.
	(fhandler_base::open): Ditto.
	* fhandler_floppy.cc (fhandler_dev_floppy::open): Don't allocate devbuf
	in O_DIRECT case.
	* fhandler_raw.cc (fhandler_dev_raw::ioctl): Don't allow buffer
	changes in O_DIRECT case.  Allow returning a buffer size 0, which
	indicates O_DIRECT.
	* fhandler_tape.cc (fhandler_dev_tape::open): Use O_SYNC flag to
	hand down the !buffer_writes case.  Don't allocate devbuf in O_DIRECT
	case.
	(fhandler_dev_tape::raw_read): Don't mess with devbuf if it's NULL.
	* include/fcntl.h: Define _FDIRECT, O_DIRECT, O_DSYNC and O_RSYNC.
	* include/cygwin/version.h: Bump API minor version.
This commit is contained in:
Corinna Vinschen
2005-12-14 15:54:33 +00:00
parent 10cba930d4
commit e3d14af155
7 changed files with 127 additions and 78 deletions

View File

@ -282,12 +282,13 @@ details. */
for this?
147: Eliminate problematic d_ino from dirent structure. unsetenv now returns
int, as per linux.
148: Add open(2) flags O_SYNC, O_RSYNC, O_DSYNC and O_DIRECT.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
#define CYGWIN_VERSION_API_MINOR 147
#define CYGWIN_VERSION_API_MINOR 148
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible