On Mon, Apr 8, 2013 at 11:31 AM, Glynn Clements <gl...@gclements.plus.com> wrote: > > Markus Neteler wrote: > >> > A grep for "winsize" would be more useful. TIOCGWINSZ is being found, >> > otherwise the code which uses "struct winsize" wouldn't be compiled >> > and wouldn't generate an error. >> >> Ok, found this in /usr/include/sys/ioctl.h: >> >> struct winsize { > > But lib/gis/ls.c already includes <sys/ioctl.h>, provided that > HAVE_SYS_IOCTL_H is defined. > > Is HAVE_SYS_IOCTL_H defined in config.h?
Yes: /* define if sys/ioctl.h exists */ #define HAVE_SYS_IOCTL_H 1 > Is the struct winsize definition guarded by #if/#ifdef? Yes: #ifdef _ALL_SOURCE /* Common ioctl's for all disciplines which are handled in ttiocom */ enum tty_ioctl { ... union txname { /* used with TXGETCD */ ... /* * window size structure used with TXSETWIN and TXGETWIN. This is * exactly the same as the Berkeley structure and can be used with * TIOCSWINSZ and TIOCGWINSZ -- in fact they are defined to be the * same. */ struct winsize { unsigned short ws_row; /* rows, in characters */ unsigned short ws_col; /* columns, in characters */ unsigned short ws_xpixel; /* horizontal size, pixels */ unsigned short ws_ypixel; /* vertical size, pixels */ }; #endif /* _ALL_SOURCE */ So, I see only the #if/#ifdef which we want to avoid to use... Markus _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev