aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/fhandler.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-04-28 03:41:09 +0000
committerChristopher Faylor <me@cgf.cx>2005-04-28 03:41:09 +0000
commit5c70f2f92e610ea1504e62db0a08469b4864424e (patch)
treecc99d52ce06de244cb631c3e14bd4f2bd5b0f463 /winsup/cygwin/fhandler.cc
parentfaae8c50a563e507fc32dd129d1f83fb2835deca (diff)
downloadnewlib-5c70f2f92e610ea1504e62db0a08469b4864424e.zip
newlib-5c70f2f92e610ea1504e62db0a08469b4864424e.tar.gz
newlib-5c70f2f92e610ea1504e62db0a08469b4864424e.tar.bz2
(check in files that should have been checked in previously)
* fhandler.cc (fhandler_base::open_9x): Remove (broken) check for O_CREAT|O_EXCL. * syscalls.cc (open): Do O_CREAT|O_EXCL check here first.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index e2d0344..ba81cd3 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -520,9 +520,7 @@ fhandler_base::open_9x (int flags, mode_t mode)
{
if (pc.isdir ())
{
- if (flags & (O_CREAT | O_EXCL) == (O_CREAT | O_EXCL))
- set_errno (EEXIST);
- else if (flags & (O_WRONLY | O_RDWR))
+ if (flags & (O_WRONLY | O_RDWR))
set_errno (EISDIR);
else
nohandle (true);