This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH for COLLECT2 (revised)


>>>>> Mark E <snowball3@usa.net> writes:

 >> 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() ).

If DJGPP works around it, why do you need to fix it up?

 >> 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.

Yes, I understand the purpose.  I just don't think it'll do what you want
it to do.

I don't think we need to worry about Win95 without Cygwin32 or DOS without
DJGPP, so the FIXUP patches are unnecessary.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]