delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/05/12/08:59:29

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10305121300.AA12347@clio.rice.edu>
Subject: Re: DXE3 in DJGPP CVS breaks cross-compiling
To: dborca AT yahoo DOT com (Daniel Borca)
Date: Mon, 12 May 2003 08:00:14 -0500 (CDT)
Cc: eliz AT elta DOT co DOT il, djgpp-workers AT delorie DOT com
In-Reply-To: <20030512052934.47066.qmail@web41008.mail.yahoo.com> from "Daniel Borca" at May 11, 2003 10:29:34 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> > The original dxegen code used system, didn't quote,
> > and was compatible
> > with non-DJGPP platforms.
> > 
> > The new dxe3gen code uses spawn, which is NOT
> > compatible for cross
> > compiles.
> 
> Right! Could "myspawn" be instructed to automagically
> quote slicky args?

It probably could, but then this would need to be 
coded, then tested on both DJGPP and typical Unix 
platforms to make sure it works.  (Remember that quoting
may depend on the shell, lots of testing). There are also 
2 system calls that would need to be checked also.  I 
consider this to be an enhancement I don't have time for.

> Uhmmm... If you were meaning cross-building the DXE
> modules, be aware that "exec" is somehow tricky on
> Linux platforms. It never returns to the caller. That
> could be worked around using "fork", but then again,
> it will stop working under DOS (DJGPP has "fork" --
> but it fails, as we all know).

I'm completely aware of this, and why I typically use
system() on code which needs to be portable.  The only
alternative is #ifdef blocks depending on compile 
platform, which are more difficult to test and maintain.
(There are lots of platforms which do not support fork,
so I strictly avoid using it).

There are 2 calls to the replacement myspawn() and 4 calls
to system() in the new code I submitted - so there would
need to be 4 places to check for quoting (2 use fixed
arguments which would never need to be checked).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019