[GRASS-dev] Re: [GRASS-SVN] r40647 - in grass/trunk: display/d.title include lib/gis raster/r.out.mpeg raster/r.topmodel visualization/nviz/src visualization/xganim

Glynn Clements glynn at gclements.plus.com
Tue Jan 26 10:48:22 EST 2010


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 <glynn at gclements.plus.com>


More information about the grass-dev mailing list