delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/26/01:08:06

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: RE: cp/mv/rm problems with .exe extension filenames
26 Sep 1998 01:08:06 -0700 :
Message-ID: <Pine.SUN.3.93.980925101835.4605D-100000.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <199809241720 DOT KAA12546 AT cygnus DOT com>
Mime-Version: 1.0
To: "Parker, Ron" <rdparker AT butlermfg DOT org>
Cc: "'gnu-win32 AT cygnus DOT com'" <gnu-win32 AT cygnus DOT com>

On Thu, 24 Sep 1998, Parker, Ron wrote:

> Actually the .exe is appended to executable with or without a dot in the
> name.  I discovered this while building teTeX.  It built an xdvi.bin.exe
> and a couple others.

Odd. Here's the advertised behaviour in egcs-1.1 and what I see as well:
  
  % gcc -o foo.bin foo.c
  % ls foo.bin
  foo.bin
  % ./foo.bin
  Foo here
  %

What is the general consensus, if any, here? Here're the choices:
  
  1. add .exe never.
     [ gcc -o foo [...]     ==> foo ]
     [ gcc -o foo.exe [...] ==> foo.exe ]
     [ gcc -o foo.bin [...] ==> foo.bin ]
  2. add .exe always, unless .exe is already there. 
     [ gcc -o foo [...]     ==> foo.exe ]
     [ gcc -o foo.exe [...] ==> foo.exe ]
     [ gcc -o foo.bin [...] ==> foo.bin.exe ]
  3. add .exe only if no suffix is provided.
     [ gcc -o foo [...]     ==> foo.exe ]
     [ gcc -o foo.exe [...] ==> foo.exe ]
     [ gcc -o foo.bin [...] ==> foo.bin ]

I lean towards 3, which is what's implemented -- it follows conventional 
wisdom on this particular platform, doesn't screw up native shells and 
other tools that expect executables to .exe (unless you explicitly want 
some other extension), and it has the added benefit of being compatible 
with how the native compilers work.

Regards,
Mumit


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019