4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-19 15:32:10 +08:00
Corinna Vinschen e3d14af155 * 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.
2005-12-14 15:54:33 +00:00

25 lines
504 B
C

/* fcntl.h
Copyright 1996, 1998, 2001, 2005 Red Hat, Inc.
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#ifndef _FCNTL_H
#define _FCNTL_H
#include <sys/fcntl.h>
#define O_NDELAY _FNDELAY
/* sys/fcntl defines values up to 0x40000 (O_NOINHERIT). */
#define _FDIRECT 0x80000
#define O_DIRECT _FDIRECT
#define O_DSYNC _FSYNC
#define O_RSYNC _FSYNC
#endif /* _FCNTL_H */