+MODULE_ID("$Id: tset.c,v 1.97 2015/11/08 01:45:47 tom Exp $")
+
+/*
+ * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
+ * Solaris, IRIX) define TIOCGWINSZ and struct winsize.
+ */
+#ifdef TIOCGSIZE
+# define IOCTL_GET_WINSIZE TIOCGSIZE
+# define IOCTL_SET_WINSIZE TIOCSSIZE
+# define STRUCT_WINSIZE struct ttysize
+# define WINSIZE_ROWS(n) n.ts_lines
+# define WINSIZE_COLS(n) n.ts_cols
+#else
+# ifdef TIOCGWINSZ
+# define IOCTL_GET_WINSIZE TIOCGWINSZ
+# define IOCTL_SET_WINSIZE TIOCSWINSZ
+# define STRUCT_WINSIZE struct winsize
+# define WINSIZE_ROWS(n) n.ws_row
+# define WINSIZE_COLS(n) n.ws_col
+# endif
+#endif