summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-05-30 23:43:24 +0000
committerChristopher Faylor <me@cgf.cx>2003-05-30 23:43:24 +0000
commite59c6ff448d40938f4f09042d6689d7d1aa655fe (patch)
treeb0a0c305510fd43609cd5bf6a0249b151b3170a1
parent102861c9a6bf740801e08939a975ab97c9ede26c (diff)
downloadcygnal-e59c6ff448d40938f4f09042d6689d7d1aa655fe.tar.gz
cygnal-e59c6ff448d40938f4f09042d6689d7d1aa655fe.tar.bz2
cygnal-e59c6ff448d40938f4f09042d6689d7d1aa655fe.zip
* path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok was
actually valid. Fix it.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc7
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,5 +1,10 @@
2003-05-30 Christopher Faylor <cgf@redhat.com>
+ * path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok
+ was actually valid. Fix it.
+
+2003-05-30 Christopher Faylor <cgf@redhat.com>
+
* cygheap.cc (init_cheap): Temporarily remove inline that newer gcc's
have problems with.
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 */