[8203] in Athena Bugs
rsaix 7.3M: sys/ioctl.h
daemon@ATHENA.MIT.EDU (Marc Horowitz)
Sun Sep 15 05:09:36 1991
To: bugs@ATHENA.MIT.EDU
Date: Sun, 15 Sep 91 05:10:13 EDT
From: Marc Horowitz <marc@ATHENA.MIT.EDU>
System name: rosebud
Type and version: POWER 7.3M (1 update(s) to same version)
Display type:
What were you trying to do?
use TIOCGWINSZ
What's wrong:
sys/ioctl.h is broken. The ioctl's are defined at the top level
of the header file:
#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */
#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */
But the declaration of struct winsize is inside a #ifdef:
#ifdef _ALL_SOURCE
/* ... */
/*
* 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 */
What should have happened:
winsize should be outside the _ALL_SOURCE.
Please describe any relevant documentation references:
[Please replace this line with your information.]