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:
authorCorinna Vinschen <corinna@vinschen.de>2015-02-15 11:59:55 +0300
committerCorinna Vinschen <corinna@vinschen.de>2015-02-15 11:59:55 +0300
commitd2bd82aa921c109853b80adde21f40ba95bbfd32 (patch)
tree0bf2ad636a9cec62d6457e0306c9eed8b688d296 /winsup/cygwin/syscalls.cc
parent6b14f3988c52874a01845d49e03486cc3336bd4f (diff)
* path.h (path_conv): Make path_flags private. Rename known_suffix to
suffix and make private. Rename normalized_path to posix_path and make privtae. Accommodate name changes throughout in path_conv methods. (path_conv::known_suffix): New method. Use throughout instead of accessing suffix directly. (path_conv::get_win32): Constify. (path_conv::get_posix): New method to read posix_path. Use throughout instead of accessing normalized_path directly. (path_conv::set_posix): Rename from set_normalized_path. Accommodate name change throughout. * spawn.cc (find_exec): Return POSIX path, not Win32 path.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 780302b49..210061605 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1,7 +1,7 @@
/* syscalls.cc: syscalls
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
This file is part of Cygwin.
@@ -2201,7 +2201,7 @@ rename (const char *oldpath, const char *newpath)
set_errno (ENOTDIR);
__leave;
}
- if (oldpc.known_suffix
+ if (oldpc.known_suffix ()
&& (ascii_strcasematch (oldpath + olen - 4, ".lnk")
|| ascii_strcasematch (oldpath + olen - 4, ".exe")))
old_explicit_suffix = true;
@@ -2248,7 +2248,7 @@ rename (const char *oldpath, const char *newpath)
set_errno (newpc.isdir () ? EISDIR : ENOTDIR);
__leave;
}
- if (newpc.known_suffix
+ if (newpc.known_suffix ()
&& (ascii_strcasematch (newpath + nlen - 4, ".lnk")
|| ascii_strcasematch (newpath + nlen - 4, ".exe")))
new_explicit_suffix = true;
@@ -2313,7 +2313,7 @@ rename (const char *oldpath, const char *newpath)
&ro_u_lnk, TRUE))
rename_append_suffix (newpc, newpath, nlen, ".lnk");
else if (oldpc.is_binary () && !old_explicit_suffix
- && oldpc.known_suffix
+ && oldpc.known_suffix ()
&& !nt_path_has_executable_suffix
(newpc.get_nt_native_path ()))
/* Never append .exe suffix if oldpath had .exe suffix given
@@ -2353,7 +2353,7 @@ rename (const char *oldpath, const char *newpath)
explicitely, or if newfile is a binary (in which case the given
name probably makes sense as it is), or if the destination
filename has one of the blessed executable suffixes. */
- if (!old_explicit_suffix && oldpc.known_suffix
+ if (!old_explicit_suffix && oldpc.known_suffix ()
&& !newpc.is_binary ()
&& !nt_path_has_executable_suffix
(newpc.get_nt_native_path ()))
@@ -3664,7 +3664,7 @@ chroot (const char *newroot)
else
{
getwinenv("PATH="); /* Save the native PATH */
- cygheap->root.set (path.normalized_path, path.get_win32 (),
+ cygheap->root.set (path.get_posix (), path.get_win32 (),
!!path.objcaseinsensitive ());
ret = 0;
}
@@ -4714,7 +4714,7 @@ linkat (int olddirfd, const char *oldpathname,
set_errno (old_name.error);
__leave;
}
- strcpy (oldpath, old_name.normalized_path);
+ strcpy (oldpath, old_name.get_posix ());
}
return link (oldpath, newpath);
}