This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: src/winsup/cygwin ChangeLog

On Nov  5 13:08, Christopher Faylor wrote:
> On Thu, Nov 05, 2009 at 06:34:50PM +0100, Corinna Vinschen wrote:
> >Let's see:
> >
> >  rename ("foo.exe", "perl5.10.0.exe")  result: perl5.10.0.exe
> >  rename ("foo.exe", "perl5.10.0")      result: perl5.10.0
> >  rename ("foo", "perl5.10.0.exe")      result: perl5.10.0.exe
> >  rename ("foo", "perl5.10.0")          result: perl5.10.0
> >
> >The latter one is a problem, because that's what happens when calling
> >
> >  strip perl5.10.0
> >
> >so after strip the binary is missing a .exe suffix.
> >
> >Sigh.
> >
> >Is there any *reliable* solution to this problem, other than never to
> >add a .exe suffix?
> Isn't the reliable-but-slow method to check the magic at the beginning
> of the file to see if it actually is a .exe?  I'm not sure we want to do
> that though.

That's what already is done by calling GetBinaryTypeW on the source
file.  The problem is that the desired target name could actually
be "foo.sys" or "", as outlined in


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]