diff options
author | Roland McGrath <roland@gnu.org> | 1994-03-04 06:56:19 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1994-03-04 06:56:19 +0000 |
commit | 2a5428b5bb34e7cb06cdb78b92cee90b678ba694 (patch) | |
tree | f90f03b238b46c20f0664a0c12b8bbbbfdeb2533 /misc/sys | |
parent | 0cf81f66f29159ae05246eb7ee7d785c860bbe29 (diff) |
entered into RCS
Diffstat (limited to 'misc/sys')
-rw-r--r-- | misc/sys/ioctl.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/misc/sys/ioctl.h b/misc/sys/ioctl.h index 55a5dc309a..b37a2740cd 100644 --- a/misc/sys/ioctl.h +++ b/misc/sys/ioctl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -85,6 +85,7 @@ struct winsize unsigned short int ws_row; /* Rows, in characters. */ unsigned short int ws_col; /* Columns, in characters. */ + /* These are not actually used. */ unsigned short int ws_xpixel; /* Horizontal pixels. */ unsigned short int ws_ypixel; /* Vertical pixels. */ }; @@ -94,6 +95,11 @@ struct winsize #endif #if defined (TIOCGSIZE) || defined (TIOCSSIZE) +# if defined (TIOCGWINSZ) && TIOCGSIZE == TIOCGWINSZ +/* Many systems that have TIOCGWINSZ define TIOCGSIZE for source + compatibility with Sun; they define `struct ttysize' to have identical + layout as `struct winsize' and #define TIOCGSIZE to be TIOCGWINSZ + (likewise TIOCSSIZE and TIOCSWINSZ). */ struct ttysize { unsigned short int ts_lines; @@ -101,8 +107,16 @@ struct ttysize unsigned short int ts_xxx; unsigned short int ts_yyy; }; - #define _IOT_ttysize _IOT_winsize +# else +/* Suns use a different layout for `struct ttysize', and TIOCGSIZE and + TIOCGWINSZ are separate commands that do the same thing with different + structures (likewise TIOCSSIZE and TIOCSWINSZ). */ +struct ttysize +{ + int ts_lines, ts_cols; /* Lines and columns, in characters. */ +}; +# endif #endif /* Perform the I/O control operation specified by REQUEST on FD. |