public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH] Cygwin: syscalls.cc: remove ".dll" from, blessed_executable_suffixes
Date: Thu, 4 Aug 2022 20:37:24 +0200	[thread overview]
Message-ID: <YuwR5KZs5lsiqe+j@calimero.vinschen.de> (raw)
In-Reply-To: <59f6be7b-73ee-4b96-64c5-f31e0bd475a0@cornell.edu>

On Aug  4 08:00, Ken Brown wrote:
> Patch attached.  I'm not 100% sure of this since it does change behavior
> (but in a weird case).
> 
> Ken

> From 97a2fc0d07c8f9045b73716ac5a05f972d5bd75c Mon Sep 17 00:00:00 2001
> From: Ken Brown <kbrown@cornell.edu>
> Date: Wed, 3 Aug 2022 16:45:23 -0400
> Subject: [PATCH] Cygwin: syscalls.cc: remove ".dll" from
>  blessed_executable_suffixes
> 
> This reverts commit d9e9c7b5a7.  The latter added ".dll" to the
> blessed_executable_suffixes array because on 32-bit Windows, the
> GetBinaryType function would report that a 64-bit DLL is an
> executable, contrary to the documentation of that function.
> 
> That anomaly does not exist on 64-bit Windows, so we can remove ".dll"
> from the list.  Reverting the commit does, however, change the
> behavior of the rename(2) syscall in the following unlikely situation:
> Suppose we have an executable foo.exe and we make the call
> 
>   rename ("foo", "bar.dll");
> 
> Previously, foo.exe would be renamed to bar.dll.  So bar.dll would
> then be an executable without the .exe extension.  The new behavior is
> that foo.exe will be renamed to bar.dll.exe.  [Exception: If there
> already existed an executable (not a DLL!) with the name bar.dll, then
> .exe will not be appended.]
> ---
>  winsup/cygwin/globals.cc  | 1 -
>  winsup/cygwin/syscalls.cc | 6 ------
>  2 files changed, 7 deletions(-)

LGTM.


Thanks,
Corinna

      reply	other threads:[~2022-08-04 18:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 12:00 Ken Brown
2022-08-04 18:37 ` Corinna Vinschen [this message]

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=YuwR5KZs5lsiqe+j@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-patches@cygwin.com \
    /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: link
Be 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).