This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH for COLLECT2 (revised)
- To: Jason Merrill <jason at cygnus dot com>, egcs-patches at cygnus dot com
- Subject: Re: PATCH for COLLECT2 (revised)
- From: "Mark E." <snowball3 at usa dot net>
- Date: Thu, 29 Oct 1998 17:28:16 +0000
- References: "Mark E."'s message of Thu, 29 Oct 1998 10:18:37 +0000
> Can we use pexecute.c instead of conditionalizing the code in collect2.c?
I'll take a look.
>
> Is it actually necessary to change / to \? I thought DOS accepted both.
The file system in both DOS and Win95 can indeed handle / , but
command.com (the default shell) in both can't. The system() function
eventually calls the shell and if the shell is command.com, / will
definitely not work because it's considered an option switch. DJGPP's
system() provides a workaround when the proper flags are set (which I
do in collect2.c's main() ).
>
> I don't think it'll work to do
>
> system ("cd foo");
> system ("do stuff in foo");
>
> On Unix, at least, the first call has no effect. I think you should
> change the code to use chdir(3) instead. That way you won't need to
> conditionalize it.
I should have put in some comments on what the parts of my patch
does and why they're neccessary. The code you mention is
conditionalized for Win95 and DOS (except DJGPP) to send the
commands one at a time because command.com (both in DOS and
Win95) doesn't support executing multiple commands on the
command line.
I'll submit a new patch once I've had a chance to add some comments
and see if pexecute.c is of use.
Mark
--
Mark Elbrecht snowball3@usa.net
http://members.xoom.com/snowball3/