summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/dtable.cc4
-rw-r--r--winsup/cygwin/fhandler.h1
3 files changed, 10 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 5372e40dd..688045d81 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
2003-11-24 Christopher Faylor <cgf@redhat.com>
+ * dtable.cc (build_fh_name): Set error in dummy fhandler when one is
+ noted during path_conv.
+ * fhandler.h (fhandler_base::set_error): New method.
+
+2003-11-24 Christopher Faylor <cgf@redhat.com>
+
* configure.in: Avoid using cygserver unless hosting on cygwin.
2003-11-23 Christopher Faylor <cgf@redhat.com>
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index b2291c7d5..27c543fa4 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -294,8 +294,10 @@ build_fh_name (const char *name, HANDLE h, unsigned opt, suffix_info *si)
path_conv pc (name, opt | PC_NULLEMPTY | PC_FULL | PC_POSIX, si);
if (pc.error)
{
+ fhandler_base *fh = cnew (fhandler_nodevice) ();
+ fh->set_error (pc.error);
set_errno (pc.error);
- return cnew (fhandler_nodevice) ();
+ return fh;
}
if (!pc.exists () && h)
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index d88bb1b94..b0fb90405 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -125,6 +125,7 @@ class fhandler_base
public:
void set_name (path_conv &pc);
int error () const {return pc.error;}
+ void set_error (int error) {pc.error = error;}
bool exists () const {return pc.exists ();}
int pc_binmode () const {return pc.binmode ();}
device& dev () {return pc.dev;}