aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-11-11 11:45:05 +0000
committerCorinna Vinschen <corinna@vinschen.de>2008-11-11 11:45:05 +0000
commit2348e4f3c61775ad596456bde503f6ae2387cba0 (patch)
treeba2a3e421e94ee0cf7b415d520e9e6fb74c669a9 /winsup
parent9df1dbeac6d7512ca301c84802b6d17cc9556911 (diff)
downloadnewlib-2348e4f3c61775ad596456bde503f6ae2387cba0.zip
newlib-2348e4f3c61775ad596456bde503f6ae2387cba0.tar.gz
newlib-2348e4f3c61775ad596456bde503f6ae2387cba0.tar.bz2
* mount.cc (mount_info::cygdrive_win32_path): Always upper case
DOS drive letter to accommodate case sensitivity. (cygdrive_getmntent): Ditto. * path.cc (path_conv::check): Invalidate wide_path after making path relative.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/mount.cc5
-rw-r--r--winsup/cygwin/path.cc9
3 files changed, 19 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 607d6af..1a21594 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,13 @@
2008-11-11 Corinna Vinschen <corinna@vinschen.de>
+ * mount.cc (mount_info::cygdrive_win32_path): Always upper case
+ DOS drive letter to accommodate case sensitivity.
+ (cygdrive_getmntent): Ditto.
+ * path.cc (path_conv::check): Invalidate wide_path after making path
+ relative.
+
+2008-11-11 Corinna Vinschen <corinna@vinschen.de>
+
* environ.cc (create_upcaseenv): New static variable.
(renv_arr): New static array to keep track of environment variables
which have to be always uppercased.
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index 2ba4599..d070788 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -403,7 +403,8 @@ mount_info::cygdrive_win32_path (const char *src, char *dst, int& unit)
}
else
{
- dst[0] = cyg_tolower (*p);
+ /* drive letter must always be uppercase for casesensitive native NT. */
+ dst[0] = cyg_toupper (*p);
dst[1] = ':';
strcpy (dst + 2, p + 1);
backslashify (dst, dst, !dst[2]);
@@ -1211,7 +1212,7 @@ cygdrive_getmntent ()
if (_my_tls.locals.available_drives & mask)
break;
- __small_sprintf (native_path, "%c:\\", drive);
+ __small_sprintf (native_path, "%c:\\", cyg_toupper (drive));
if (GetFileAttributes (native_path) == INVALID_FILE_ATTRIBUTES)
{
_my_tls.locals.available_drives &= ~mask;
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index d0eab02..265712f 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1231,7 +1231,14 @@ out:
if (opt & PC_NOFULL)
{
if (is_relpath)
- mkrelpath (this->path, !!caseinsensitive);
+ {
+ mkrelpath (this->path, !!caseinsensitive);
+ /* Invalidate wide_path so that wide relpath can be created
+ in later calls to get_nt_native_path or get_wide_win32_path. */
+ if (wide_path)
+ cfree (wide_path);
+ wide_path = NULL;
+ }
if (need_directory)
{
size_t n = strlen (this->path);