aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/spawn.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2022-10-28 12:42:51 +0200
committerCorinna Vinschen <corinna@vinschen.de>2022-10-28 12:44:27 +0200
commit339bb6e932f4aef047dc6aa1a1894eec8b37063c (patch)
treefd726c38c518b4d76da6db35fa2fe1920d567012 /winsup/cygwin/spawn.cc
parent213b53ed355712b97d361a273a87f1162b8b7aab (diff)
downloadnewlib-339bb6e932f4aef047dc6aa1a1894eec8b37063c.zip
newlib-339bb6e932f4aef047dc6aa1a1894eec8b37063c.tar.gz
newlib-339bb6e932f4aef047dc6aa1a1894eec8b37063c.tar.bz2
Cygwin: stop handling files with .com suffix like .exe files
.com is a remnant from the past. There are only five executables left: chcp.com format.com mode.com more.com tree.com Calling them on the command line already requires to use the suffix anyway. So drop useless .com test from the execve test for scripts (they are handled earlier in the same function as executables) and do not handle them like .exe suffixes in other functions. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc3
1 files changed, 0 insertions, 3 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index f0ae739..01225af 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -34,7 +34,6 @@ static const suffix_info exe_suffixes[] =
{
suffix_info ("", 1),
suffix_info (".exe", 1),
- suffix_info (".com"),
suffix_info (NULL)
};
@@ -1366,8 +1365,6 @@ av::setup (const char *prog_arg, path_conv& real_path, const char *ext,
set_errno (ENOEXEC);
return -1;
}
- if (ascii_strcasematch (ext, ".com"))
- break;
pgm = (char *) "/bin/sh";
arg1 = NULL;
}