test for TIOCSWINSZ instead of incorrectly using TIOCGWINSZ

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1164 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-01-15 21:17:59 +00:00
parent 7f1466fea9
commit 826057d2b5

View File

@@ -937,10 +937,8 @@ void getptyslave(void)
# ifdef LINEMODE # ifdef LINEMODE
int waslm; int waslm;
# endif # endif
# ifdef TIOCGWINSZ
struct winsize ws; struct winsize ws;
extern int def_row, def_col; extern int def_row, def_col;
# endif
extern int def_tspeed, def_rspeed; extern int def_tspeed, def_rspeed;
/* /*
* Opening the slave side may cause initilization of the * Opening the slave side may cause initilization of the
@@ -1018,7 +1016,7 @@ void getptyslave(void)
* set up the tty modes as we like them to be. * set up the tty modes as we like them to be.
*/ */
init_termbuf(); init_termbuf();
# ifdef TIOCGWINSZ # ifdef TIOCSWINSZ
if (def_row || def_col) { if (def_row || def_col) {
memset(&ws, 0, sizeof(ws)); memset(&ws, 0, sizeof(ws));
ws.ws_col = def_col; ws.ws_col = def_col;