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 19:38:22 +0300
committerCorinna Vinschen <corinna@vinschen.de>2005-12-14 19:38:22 +0300
commitba31e832be0bba89d8848aaea6e6eebbe7c56355 (patch)
treebf1d14a289bc179027fb597a8ee04174f1ab7015 /winsup/cygwin/fhandler_disk_file.cc
parente3d14af155fb84890a32fad7f7706967ac5bc7d9 (diff)
* fhandler.cc (ACCFLAGS): Remove macro.
(fhandler_base::get_default_fmode): Use O_ACCMODE instead of ACCFLAGS and or'ed read/write flags. (fhandler_base::open_9x): Use O_ACCMODE instead of or'ed read/write flags. (fhandler_base::open): Ditto. * fhandler_disk_file.cc (fhandler_base::open_fs): Ditto. * fhandler_mem.cc (fhandler_dev_mem::open): Ditto. * fhandler_raw.cc (fhandler_dev_raw::open): Ditto.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 51c4972ae..5b684e5e7 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -956,7 +956,7 @@ fhandler_base::open_fs (int flags, mode_t mode)
/* Unfortunately NT allows to open directories for writing, but that's
disallowed according to SUSv3. */
- if (pc.isdir () && (flags & (O_WRONLY | O_RDWR)))
+ if (pc.isdir () && (flags & O_ACCMODE) != O_RDONLY)
{
set_errno (EISDIR);
return 0;