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:
authorChristopher Faylor <me@cgf.cx>2002-07-03 22:02:54 +0400
committerChristopher Faylor <me@cgf.cx>2002-07-03 22:02:54 +0400
commit58b43c8d91e03e7bca9b60047e1e79255b2cc12b (patch)
treeb29dc456bafa486c679ad73c588b02e9e46b9107
parentbd86408f5893ab5369f9e4eebbfce1fa8424ce51 (diff)
* dtable.cc (cygwin_attach_handle_to_fd): Default to implicit bin mode if none
specified. * fhandler.cc (fhandler_base::init): Make bin argument a guarantee rather than a suggestion. * path.cc (path_conv::check): Load flag returned from cygwin_conv_to_win32_path into path_flags.
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/dtable.cc2
-rw-r--r--winsup/cygwin/fhandler.cc2
-rw-r--r--winsup/cygwin/path.cc1
4 files changed, 12 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c4ed4aa6e..54cb50b66 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,12 @@
+2002-07-03 Christopher Faylor <cgf@redhat.com>
+
+ * dtable.cc (cygwin_attach_handle_to_fd): Default to implicit bin mode
+ if none specified.
+ * fhandler.cc (fhandler_base::init): Make bin argument a guarantee
+ rather than a suggestion.
+ * path.cc (path_conv::check): Load flag returned from
+ cygwin_conv_to_win32_path into path_flags.
+
2002-07-03 Conrad Scott <conrad.scott@dsl.pipex.com>
* tty.cc (tty::common_init): Reverse logic of cygserver check in
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index bb9db8a4a..4e8c6f792 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -206,7 +206,7 @@ cygwin_attach_handle_to_fd (char *name, int fd, HANDLE handle, mode_t bin,
path_conv pc;
fhandler_base *res = cygheap->fdtab.build_fhandler_from_name (fd, name, handle,
pc);
- res->init (handle, myaccess, bin);
+ res->init (handle, myaccess, bin ?: pc.binmode ());
return fd;
}
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 1b8d4583e..96da497a0 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -866,7 +866,7 @@ fhandler_base::init (HANDLE f, DWORD a, mode_t bin)
flags = O_WRONLY;
else if (a == (GENERIC_READ | GENERIC_WRITE))
flags = O_RDWR;
- set_flags (flags, bin);
+ set_flags (flags | bin);
set_open_status ();
debug_printf ("created new fhandler_base for handle %p, bin %d", f, get_r_binary ());
}
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 2e8626b2d..ed76f941e 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -549,6 +549,7 @@ path_conv::check (const char *src, unsigned opt,
else if (devn != FH_BAD)
{
fileattr = 0;
+ path_flags = sym.pflags;
if (component)
{
error = ENOTDIR;