This is the mail archive of the
mailing list for the GCC project.
Re: libiberty: fix running extension-less binaries on windows
- From: DJ Delorie <dj at redhat dot com>
- To: vladimir at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 3 Nov 2006 23:07:41 -0500
- Subject: Re: libiberty: fix running extension-less binaries on windows
- References: <email@example.com>
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".