Markus Neteler wrote:
> >> Done so for lib/gis/spawn.c. Apparently include/spawn.h is
> >> not needed (I take your 6.5's backport as gold standard).
> >
> > spawn.h needs <unistd.h> for the STD{IN,OUT,ERR}_FILENO constants.
> >
> > This hasn't shown up before as modules often end up pulling in
> > <unistd.h> anyhow, but this is non-portable (e.g. including some other
> > header may end up including <unistd.h> on some platforms but not on
> > others).
>
> OK, but in your 6.5 backport there is no STD*...
Ah; if the 6.5 version of spawn.h doesn't have SF_STDIN etc, it
doesn't need <unistd.h> either. Those are only necessary for more
advanced usage of G_spawn_ex() (redirecting to/from an asynchronous
child process as with popen(), rather than synchronous execution as
with system()).
--
Glynn Clements <[email protected]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev