Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-12-14 18:54:33 +0300
committerCorinna Vinschen <corinna@vinschen.de>2005-12-14 18:54:33 +0300
commite3d14af155fb84890a32fad7f7706967ac5bc7d9 (patch)
tree05df3064a2c24a1542e182a3aa2d5ff4e3df8f56 /winsup/cygwin/include/fcntl.h
parent10cba930d401056aed4b2fb360b5e084d61ecabb (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/include/fcntl.h')
-rw-r--r--winsup/cygwin/include/fcntl.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/include/fcntl.h b/winsup/cygwin/include/fcntl.h
index 774966e9a..33b0692b3 100644
--- a/winsup/cygwin/include/fcntl.h
+++ b/winsup/cygwin/include/fcntl.h
@@ -1,6 +1,6 @@
/* fcntl.h
- Copyright 1996, 1998, 2001 Red Hat, Inc.
+ Copyright 1996, 1998, 2001, 2005 Red Hat, Inc.
This file is part of Cygwin.
@@ -14,4 +14,11 @@ details. */
#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 */