Mail Archives: djgpp-workers/1999/03/26/08:17:02
> 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.
I can follow Hans-Bernhard very well here. All in all, who needs batch
scripts anyway? ;-)
> 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.
What is the problem here? If a user named his program (sh-script or
COFF binary) `foo.bar.bat', he should expect problems anyhow. I think
COMMAND.COM will also interpret the filename to be a batch file.
In this case, if someone typed `foo.bar.bat' in Bash,
`foo.bar.bat.exe' should be tried first IMHO, then `foo.bar.bat', then
`foo.bar.bat.bat' etc. I do not have an opinion about whether to treat
`foo.bar.bat' as a batch file or not in this case...
> Moreover, there could be a directory `foo' and a program `foo.exe', in
> which case again it is better to try `foo.exe' first.
Or, a directory called `foo.exe' might exist and a program named
`foo'. I agree it will be rare but so are files called
`foo.bar.bat.exe' :-)
> 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.
Hans-Bernhard suggested to try `program' before `program.bat', which
means *after* `program.exe'.
Also, IIRC some versions of Binutils are able to generate go32-exes
immediately (no raw COFF), removing the go32-v2 problem. What
drawbacks exist to making this behaviour the default? Robert?
--
*Groeten, Michel*. _http://www.cs.vu.nl/~mdruiter_
____________
\ /====\ / "You know, Beavis, you need things that suck,
\/ \/ to have things that are cool", Butt-Head.
- Raw text -