1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-28 11:57:28 +00:00

Fix compilation for the case where neither ioctl(TIOCGWINSZ)

nor ioctl(WIOCGETD) exist.  This case doesn't occur under FreeBSD.

PR:		bin/5996
Submitted by:	Max Euston <meuston@jmrodgers.com>
This commit is contained in:
Tim Vanderhoek 1998-07-26 16:15:26 +00:00
parent e05ce16e87
commit a65adfc05c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37870

View File

@ -266,13 +266,14 @@ get_term()
#ifdef TIOCGWINSZ
if (ioctl(2, TIOCGWINSZ, &w) == 0 && w.ws_row > 0)
sc_height = w.ws_row;
else
#else
#ifdef WIOCGETD
if (ioctl(2, WIOCGETD, &w) == 0 && w.uw_height > 0)
sc_height = w.uw_height/w.uw_vs;
#endif
#endif
else
#endif
#endif
sc_height = tgetnum("li");
hard = (sc_height < 0 || tgetflag("hc"));
if (hard) {