delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/03/26/03:58:36

Date: Fri, 26 Mar 1999 03:56:51 -0500
Message-Id: <199903260856.DAA22667@mescaline.gnu.org>
From: Eli Zaretskii <eliz AT gnu DOT org>
To: djgpp-workers AT delorie DOT com
In-reply-to: <Pine.LNX.3.93.990325123346.16128A-100000@acp3bf> (message from
Hans-Bernhard Broeker on Thu, 25 Mar 1999 12:39:48 +0100 (MET))
Subject: Re: Bash 2.03 update (March 19th)
References: <Pine DOT LNX DOT 3 DOT 93 DOT 990325123346 DOT 16128A-100000 AT acp3bf>
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

   From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>

   Just as an idea: in traditional DOS (i.e. command.com), program.bat is the
   *last* thing that will be tried when you call 'program'. The command.com
   search order is

      doskey macro (if any)
      in '.', and then in each directory of the PATH:
      {
	   program.com
	   program.exe
	   program.bat
      }

We do the same, we just append `program' at the end of this list.

   So, if 'program' is a COFF binary, i.e. more like an .exe than a .bat,
   then it should be tried before program.bat, IMHO. If it's a Bourne sh
   script, I'ld still prefer trying it before the crippled .bat script.

You cannot do that on LFN systems, because `program' might be actually
something like `foo.bar.bat', and to further complicate matters, there
might be a program in the same directory called `foo.bar.bat.exe'.  I
know this is a bit perverse, but a user is entitled to have that.
Moreover, there could be a directory `foo' and a program `foo.exe', in
which case again it is better to try `foo.exe' first.

And if that is not enough, running a raw COFF executable requires
go32-v2 to be present, so if it is not available, you will fail;
trying the .exe first works better in this case as well.

So, on balance, I think trying with the extension first is a better way.

- Raw text -


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