libiberty: fix running extension-less binaries on windows

Vladimir Prus vladimir@codesourcery.com
Mon Nov 6 08:11:00 GMT 2006


On Monday 06 November 2006 05:42, DJ Delorie wrote:
> > 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 ;-)
>
> The problem is when you have "foo" and it's NOT a .com file, but you
> try to execute it anyway.

Ok. Is the attached patch OK?

- Volodya

        * pex-win32.c (no_suffixes): Remove.
        (std_suffixes): Add "" as first element.
        (find_executable): Remove detection of already-present
        extension. Try all suffixes in std_suffixes.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pex.diff
Type: text/x-diff
Size: 1624 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061106/ec74f2d2/attachment.bin>


More information about the Gcc-patches mailing list