public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: stop handling files with .com suffix like .exe files Date: Fri, 28 Oct 2022 10:49:35 +0000 (GMT) [thread overview] Message-ID: <20221028104935.4D73E385D0FC@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=339bb6e932f4aef047dc6aa1a1894eec8b37063c commit 339bb6e932f4aef047dc6aa1a1894eec8b37063c Author: Corinna Vinschen <corinna@vinschen.de> Date: Fri Oct 28 12:42:51 2022 +0200 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> Diff: --- winsup/cygwin/fhandler/disk_file.cc | 3 +-- winsup/cygwin/globals.cc | 1 - winsup/cygwin/release/3.4.0 | 3 +++ winsup/cygwin/spawn.cc | 3 --- winsup/cygwin/syscalls.cc | 1 - 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/fhandler/disk_file.cc b/winsup/cygwin/fhandler/disk_file.cc index 62c18e5e4..6eb466e9c 100644 --- a/winsup/cygwin/fhandler/disk_file.cc +++ b/winsup/cygwin/fhandler/disk_file.cc @@ -518,8 +518,7 @@ fhandler_base::fstat_helper (struct stat *buf) PUNICODE_STRING path = pc.get_nt_native_path (); if (RtlEqualUnicodePathSuffix (path, &ro_u_exe, TRUE) - || RtlEqualUnicodePathSuffix (path, &ro_u_lnk, TRUE) - || RtlEqualUnicodePathSuffix (path, &ro_u_com, TRUE)) + || RtlEqualUnicodePathSuffix (path, &ro_u_lnk, TRUE)) pc.set_exec (); } /* No known suffix, check file header. This catches binaries and diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc index e909d0f8f..aef4a687d 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -120,7 +120,6 @@ const int __collate_load_error = 0; extern UNICODE_STRING _RDATA ro_u_empty = _ROU (L""); extern UNICODE_STRING _RDATA ro_u_lnk = _ROU (L".lnk"); extern UNICODE_STRING _RDATA ro_u_exe = _ROU (L".exe"); - extern UNICODE_STRING _RDATA ro_u_com = _ROU (L".com"); extern UNICODE_STRING _RDATA ro_u_scr = _ROU (L".scr"); extern UNICODE_STRING _RDATA ro_u_sys = _ROU (L".sys"); extern UNICODE_STRING _RDATA ro_u_proc = _ROU (L"proc"); diff --git a/winsup/cygwin/release/3.4.0 b/winsup/cygwin/release/3.4.0 index e3b3072b4..a5e9a8ae3 100644 --- a/winsup/cygwin/release/3.4.0 +++ b/winsup/cygwin/release/3.4.0 @@ -5,6 +5,9 @@ What's new: - Drop support for 32 bit Windows and WOW64. +- Remove any special handling for the .com filename suffix. It has to + be used always explicitely. + - Add code to handle setrlimit(RLIMIT_AS). - Add code to handle signal masks in /proc/<PID>/status. diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index f0ae73999..01225afe2 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; } diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 1338853df..fff8af009 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -2097,7 +2097,6 @@ nt_path_has_executable_suffix (PUNICODE_STRING upath) { static const PUNICODE_STRING blessed_executable_suffixes[] = { - &ro_u_com, &ro_u_exe, &ro_u_scr, &ro_u_sys,
reply other threads:[~2022-10-28 10:49 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221028104935.4D73E385D0FC@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).