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>2008-04-13 20:47:21 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-04-13 20:47:21 +0400
commit9bf7c7e96cf97fb10054775cfc84a92b4f45dea0 (patch)
treed528c007b7748d18400c7cec4ee9fa20665e9f9d /winsup/cygwin/syscalls.cc
parenta7ff2096f7f5ca58a2ea202033a579675e695199 (diff)
* fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Simplify
code which checks for symlinks. Fix problem with UNC paths. * environ.cc (struct parse_thing): Remove transparent_exe option. * syscalls.cc (transparent_exe): Remove. (unlink): Always add stat_suffixes, drop transparent_exe check. (open): Ditto. (link): Ditto. (pathconf): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::link): Ditto. * fhandler_process.cc (fhandler_process::fill_filebuf): Always remove .exe suffix. * path.cc (realpath): Never attach known_suffix.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 881b9d1eb..28533a58b 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -78,8 +78,6 @@ suffix_info stat_suffixes[] =
suffix_info (NULL)
};
-bool transparent_exe = false;
-
SYSTEM_INFO system_info;
static int __stdcall mknod_worker (const char *, mode_t, mode_t, _major_t,
@@ -517,8 +515,7 @@ unlink (const char *ourname)
DWORD devn;
NTSTATUS status;
- path_conv win32_name (ourname, PC_SYM_NOFOLLOW,
- transparent_exe ? stat_suffixes : NULL);
+ path_conv win32_name (ourname, PC_SYM_NOFOLLOW, stat_suffixes);
if (win32_name.error)
{
@@ -885,7 +882,7 @@ open (const char *unix_path, int flags, ...)
if (!(fh = build_fh_name (unix_path, NULL,
(flags & (O_NOFOLLOW | O_EXCL))
? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW,
- transparent_exe ? stat_suffixes : NULL)))
+ stat_suffixes)))
res = -1; // errno already set
else if ((flags & O_NOFOLLOW) && fh->issymlink ())
{
@@ -1010,8 +1007,7 @@ link (const char *oldpath, const char *newpath)
int res = -1;
fhandler_base *fh;
- if (!(fh = build_fh_name (oldpath, NULL, PC_SYM_NOFOLLOW,
- transparent_exe ? stat_suffixes : NULL)))
+ if (!(fh = build_fh_name (oldpath, NULL, PC_SYM_NOFOLLOW, stat_suffixes)))
goto error;
if (fh->error ())
@@ -1903,8 +1899,7 @@ pathconf (const char *file, int v)
set_errno (ENOENT);
return -1;
}
- if (!(fh = build_fh_name (file, NULL, PC_SYM_FOLLOW,
- transparent_exe ? stat_suffixes : NULL)))
+ if (!(fh = build_fh_name (file, NULL, PC_SYM_FOLLOW, stat_suffixes)))
return -1;
if (!fh->exists ())
{