This is the mail archive of the
mailing list for the GCC project.
Re: libiberty: fix running extension-less binaries on windows
DJ Delorie wrote:
> I think it's better to search for the last / or \ in the program, then
> look for '.' after that. You have to be careful about running "foo"
> when both "foo" and "foo.exe" exist - it may try to run the first as a
> COM file and crash.
Is it common to have both "foo" and "foo.exe", the first being a COM file? I
don't think I saw a COM file in year ;-)
Also, does it mean we should try the ".exe" extension before the ".com"
> An alternate idea is to put the "" extension at the end of the list,
> or at least after ".exe".
I'd prefer this approach.