libiberty: fix running extension-less binaries on windows

DJ Delorie dj@redhat.com
Sat Nov 4 04:10:00 GMT 2006


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.

An alternate idea is to put the "" extension at the end of the list,
or at least after ".exe".



More information about the Gcc-patches mailing list