From 30d96bd9086bc76c9b573482f48356b37abf2cde Mon Sep 17 00:00:00 2001 From: bostic Date: Thu, 23 Dec 1993 18:41:25 +0000 Subject: [PATCH] #ifdef TIOCGWINSZ usage on TIOCGWINSZ --- common/util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/util.c b/common/util.c index 37fe4fc6..b6d9aafb 100644 --- a/common/util.c +++ b/common/util.c @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "$Id: util.c,v 8.33 1993/12/20 09:07:58 bostic Exp $ (Berkeley) $Date: 1993/12/20 09:07:58 $"; +static char sccsid[] = "$Id: util.c,v 8.34 1993/12/23 18:41:25 bostic Exp $ (Berkeley) $Date: 1993/12/23 18:41:25 $"; #endif /* not lint */ #include @@ -362,10 +362,12 @@ set_window_size(sp, set_row, ign_env) * Try TIOCGWINSZ. */ row = col = 0; +#ifdef TIOCGWINSZ if (ioctl(STDERR_FILENO, TIOCGWINSZ, &win) != -1) { row = win.ws_row; col = win.ws_col; } +#endif /* If TIOCGWINSZ failed, or had entries of 0, try termcap. */ if (row == 0 || col == 0) { -- 2.11.4.GIT