From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Faylor To: gdb@sources.redhat.com Subject: Re: DOS/Windows-specific code: exec.c and symfile.c Date: Wed, 09 May 2001 07:07:00 -0000 Message-id: <20010509100559.C31509@redhat.com> References: <3AF8962C.6010809@cygnus.com> X-SW-Source: 2001-05/msg00185.html On Wed, May 09, 2001 at 01:05:49PM +0300, Eli Zaretskii wrote: > >On Tue, 8 May 2001, Andrew Cagney wrote: > >> > This snippet wants to find `foo.exe' when `foo' is being specified. >> > Should we add a #define for executable extensions (defaulting to an >> > empty string on Unix)? >> >> Hmm, the makefile already knows about EXEEXT. > >So how about adding `-DEXE_EXT=\"EXEEXT\"' to DEFS, and then testing >EXE_EXT in the sources? > >Alternatively, we could modify openp to always accept an additional >parameter, which is an optional extension (or even a list of possible >extensions), and if it's non-empty, try those extensions in addition >to the original file name. (That's what openp in Emacs does, btw.) I like the additional argument idea. It would be a little less overhead to search for a .exe file on systems that use them. cgf