Mail Archives: djgpp-workers/2003/05/12/08:59:29
> > 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 -