aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-05-13 15:46:07 +0000
committerChristopher Faylor <me@cgf.cx>2005-05-13 15:46:07 +0000
commit063f1df2aa2689d45fd7fd7bd8445031338ec9cb (patch)
treed1dc01f28241869f35ad8c728ccaae9e0732d3c5 /winsup/cygwin/path.cc
parenteb6cd95fecef02c261ef266161f8dff6924efa4d (diff)
downloadnewlib-063f1df2aa2689d45fd7fd7bd8445031338ec9cb.zip
newlib-063f1df2aa2689d45fd7fd7bd8445031338ec9cb.tar.gz
newlib-063f1df2aa2689d45fd7fd7bd8445031338ec9cb.tar.bz2
Remove PC_FULL from path_conv usage throughout.
* path.h (enum pathconv_arg): Change PC_FULL to PC_NOUILL. * path.cc (path_conv::check): Test for PC_NOFULL rather than !PC_FULL. (cygwin_conv_to_win32_path): Use PC_NOFULL to force non-absolute path.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 09382da..1bdf75c 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -956,7 +956,7 @@ out:
devn = FH_SOCKET;
#endif
- if (!(opt & PC_FULL))
+ if (opt & PC_NOFULL)
{
if (is_relpath)
mkrelpath (this->path);
@@ -2679,7 +2679,7 @@ symlink_worker (const char *topath, const char *frompath, bool use_winsym,
strcpy (w32topath, reltopath);
if (use_winsym)
{
- win32_topath.check (topath, PC_FULL | PC_SYM_NOFOLLOW);
+ win32_topath.check (topath, PC_SYM_NOFOLLOW);
strcpy (w32topath, win32_topath);
}
if (cp)
@@ -2690,7 +2690,7 @@ symlink_worker (const char *topath, const char *frompath, bool use_winsym,
}
else
{
- win32_topath.check (topath, PC_FULL | PC_SYM_NOFOLLOW);
+ win32_topath.check (topath, PC_SYM_NOFOLLOW);
strcpy (w32topath, win32_topath);
}
create_how = CREATE_NEW;
@@ -3433,7 +3433,7 @@ chdir (const char *in_dir)
/* Convert path. First argument ensures that we don't check for NULL/empty/invalid
again. */
- path_conv path (PC_NONULLEMPTY, in_dir, PC_FULL | PC_SYM_FOLLOW | PC_POSIX);
+ path_conv path (PC_NONULLEMPTY, in_dir, PC_SYM_FOLLOW | PC_POSIX);
if (path.error)
{
set_errno (path.error);
@@ -3518,7 +3518,7 @@ fchdir (int fd)
extern "C" int
cygwin_conv_to_win32_path (const char *path, char *win32_path)
{
- path_conv p (path, PC_SYM_FOLLOW | PC_NO_ACCESS_CHECK);
+ path_conv p (path, PC_SYM_FOLLOW | PC_NO_ACCESS_CHECK | PC_NOFULL);
if (p.error)
{
win32_path[0] = '\0';
@@ -3533,7 +3533,7 @@ cygwin_conv_to_win32_path (const char *path, char *win32_path)
extern "C" int
cygwin_conv_to_full_win32_path (const char *path, char *win32_path)
{
- path_conv p (path, PC_SYM_FOLLOW | PC_FULL | PC_NO_ACCESS_CHECK);
+ path_conv p (path, PC_SYM_FOLLOW | PC_NO_ACCESS_CHECK);
if (p.error)
{
win32_path[0] = '\0';
@@ -3571,7 +3571,7 @@ realpath (const char *path, char *resolved)
extern suffix_info stat_suffixes[];
int err;
- path_conv real_path (path, PC_SYM_FOLLOW | PC_FULL, stat_suffixes);
+ path_conv real_path (path, PC_SYM_FOLLOW, stat_suffixes);
if (real_path.error)
err = real_path.error;
@@ -3624,7 +3624,7 @@ conv_path_list_buf_size (const char *path_list, bool to_posix)
int i, num_elms, max_mount_path_len, size;
const char *p;
- path_conv pc(".", PC_FULL | PC_POSIX);
+ path_conv pc(".", PC_POSIX);
/* The theory is that an upper bound is
current_size + (num_elms * max_mount_path_len) */