aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-12-09 16:52:43 +0000
committerChristopher Faylor <me@cgf.cx>2009-12-09 16:52:43 +0000
commitd0f9de23a19f0cf588a848a2d7fa9c4c73f4c8eb (patch)
tree215c8f3b220c998c0286edbbfe538b2bc7b609ce /winsup/cygwin
parentad0ae5d83af50e747e727b361e6d97ecb0022e51 (diff)
downloadnewlib-d0f9de23a19f0cf588a848a2d7fa9c4c73f4c8eb.zip
newlib-d0f9de23a19f0cf588a848a2d7fa9c4c73f4c8eb.tar.gz
newlib-d0f9de23a19f0cf588a848a2d7fa9c4c73f4c8eb.tar.bz2
* fhandler_fifo.cc (fhandler_fifo::open): Avoid resetting errno after it has
been explicitly set. * include/cygwin/version.h: Bump DLL minor version number to 2.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/fhandler_fifo.cc11
-rw-r--r--winsup/cygwin/include/cygwin/version.h2
-rw-r--r--winsup/cygwin/pipe.cc2
4 files changed, 17 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 58f3dbf..8c39cea 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-09 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * fhandler_fifo.cc (fhandler_fifo::open): Avoid resetting errno after
+ it has been explicitly set.
+
+ * include/cygwin/version.h: Bump DLL minor version number to 2.
+
2009-12-06 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/version.h: Bump DLL minor version number to 1.
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index b612094..1955f87 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -1,6 +1,6 @@
/* fhandler_fifo.cc - See fhandler.h for a description of the fhandler classes.
- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
+ Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
This file is part of Cygwin.
@@ -95,6 +95,7 @@ fhandler_fifo::open (int flags, mode_t)
char char_sa_buf[1024];
LPSECURITY_ATTRIBUTES sa_buf =
sec_user ((PSECURITY_ATTRIBUTES) char_sa_buf, cygheap->user.sid());
+ bool do_seterrno = true;
HANDLE h;
bool nonblocking_write = !!((flags & (O_WRONLY | O_NONBLOCK)) == (O_WRONLY | O_NONBLOCK));
@@ -110,7 +111,10 @@ fhandler_fifo::open (int flags, mode_t)
if (h != INVALID_HANDLE_VALUE)
wait_state = fifo_ok;
else if (nonblocking_write)
- set_errno (ENXIO);
+ {
+ set_errno (ENXIO);
+ do_seterrno = false;
+ }
else if ((h = cnp (PIPE_ACCESS_DUPLEX, 1)) != INVALID_HANDLE_VALUE)
{
if ((dummy_client = open_nonserver (npname, low_flags, sa_buf))
@@ -130,7 +134,8 @@ fhandler_fifo::open (int flags, mode_t)
}
if (h == INVALID_HANDLE_VALUE)
{
- __seterrno ();
+ if (do_seterrno)
+ __seterrno ();
res = 0;
}
else if (!setup_overlapped ())
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index 02110eb..ce8b453 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -43,7 +43,7 @@ details. */
changes to the DLL and is mainly informative in nature. */
#define CYGWIN_VERSION_DLL_MAJOR 1007
-#define CYGWIN_VERSION_DLL_MINOR 1
+#define CYGWIN_VERSION_DLL_MINOR 2
/* Major numbers before CYGWIN_VERSION_DLL_EPOCH are
incompatible. */
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc
index aad1531..25fbd4c 100644
--- a/winsup/cygwin/pipe.cc
+++ b/winsup/cygwin/pipe.cc
@@ -1,7 +1,7 @@
/* pipe.cc: pipe for Cygwin.
Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008 Hat, Inc.
+ 2008, 2009 Hat, Inc.
This file is part of Cygwin.