From e59c6ff448d40938f4f09042d6689d7d1aa655fe Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 30 May 2003 23:43:24 +0000 Subject: [PATCH] * path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok was actually valid. Fix it. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/path.cc | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 03f4eb7f8..a2049a252 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-05-30 Christopher Faylor + + * path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok + was actually valid. Fix it. + 2003-05-30 Christopher Faylor * cygheap.cc (init_cheap): Temporarily remove inline that newer gcc's diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index ae3f6e7ed..9c33e53ae 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -796,7 +796,9 @@ out: { set_has_acls (true); if (allow_ntsec && wincap.has_security ()) - set_exec (0); + set_exec (0); /* We really don't know if this is executable or not here + but set it to not executable since it will be figured out + later by anything which cares about this. */ } /* Known file systems with buggy open calls. Further explanation in fhandler.cc (fhandler_disk_file::open). */ @@ -1442,6 +1444,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, DWORD &devn, int &unit, unsigned *flags, bool no_normalize) { + bool chroot_ok = !cygheap->root.exists (); while (sys_mount_table_counter < cygwin_shared->sys_mount_table_counter) { init (); @@ -1585,8 +1588,6 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, break; } - bool chroot_ok; - chroot_ok = false; // sigh. stop gcc warning if (i >= nmounts) { backslashify (pathbuf, dst, 0); /* just convert */