This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: 'cp' utility bug when <dest-name>.exe file exist.
- From: Stephen Morton <stephen dot c dot morton at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 9 Jun 2010 10:50:34 -0400
- Subject: Re: 'cp' utility bug when <dest-name>.exe file exist.
Eric Blake wrote:
> Alexander T wrote:
>
> > Why not just do the exe magic for executing the files only? When
> > opening, stating, copying, moving etc, you could leave it out. This
> > seems the most reasonable compromise to me, but there could of course
> > be cases which I am overseeing, but I wouldn't expect any script to
> > rely on exe magic when opening a file for editing.
>
> Have you ever encountered a makefile that doesn't consistently use
> $(EXEEXT) everywhere?? Too many people just expect 'gcc -o foo ...' to
> produce foo, then 'strip foo' to work, without realizing that on cygwin,
> gcc created 'foo.exe' and strip _has_ to have .exe magic.? Yet that is
> exactly the case of executable images being opened for editing.? So the
> question then is whether the magic should be centralized in cygwin1.dll
> (preferable) or repeatedly patched into every program that needs it (a
> maintenance nightmare).
>
> Perhaps it does make sense to drop .exe suffixes; teaching gcc that -o
> foo means we really want a suffix-less file, and teaching users that
> they want to modify PATHEXE to include . if they are working from the
> windows side of things.? But it won't be an overnight switch, and will
> come with its share of complaints on the list.
>
> Meanwhile, we can't get away from .lnk magic, but that produces orders
> of magnitude less complaints on the list, so I'm not as worried about it.
I have to agree with Eric and Corrinna on this one, though I'll
provide a less reasoned explanation.
Cygwin is a crazy thing. Who would want to try to run unix/linux/POSIX
stuff on Windows? No really, what a foolish idea. Especially now that
linux is really good (at least for servers, and the desktop is debatable).
Why does my company use cygwin? Historical reasons and people's attachment
to the Windows desktop. We're moving as much as we can to linux now.
And looking at ways to have the Windows desktop do as little of the
work as possible and farm the real work out to linux servers.
We use a make environment that is part cygwin and part pure windows
executables (long story). And it all works in linux too. I suspect
it would break in the worst ugly ways if the .exe magic did not exist.
So if you're going to do this crazy thing, you've got to be prepared
to accommodate Windows's various quirks, one of which is this .com
.exe and .lnk business.
Steve
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple