summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaleb <empty>1995-09-13 14:48:31 +0000
committerkaleb <empty>1995-09-13 14:48:31 +0000
commit59c87a5da2e964059b4e030d8666016f2d22bd7b (patch)
tree57bc80f0f829dbd4d58207bac5adee7870fc5ad3
parent9badb22931dbeef56abce0035bb6ccb3df972178 (diff)
xbugs 7518, 7438, 7162. SVR4 (or any system with TIOCSWINSZ) should not set
ROWS and COLUMNS in the environment. Not only that but extant code did not allocate memory for ROWS and COLUMNS in the environment, and by adding them in spite of that caused an apparently benign illegal memory reference error.
-rw-r--r--xc/programs/xterm/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xc/programs/xterm/main.c b/xc/programs/xterm/main.c
index e4b34f4f2..5edd76e75 100644
--- a/xc/programs/xterm/main.c
+++ b/xc/programs/xterm/main.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char *rid="$XConsortium: main.c,v 1.229 95/05/24 22:04:05 gildea Exp gildea $";
+static char *rid="$XConsortium: main.c,v 1.230 95/06/08 21:08:14 gildea Exp kaleb $";
#endif /* lint */
/*
@@ -195,7 +195,6 @@ static Bool IsPts = False;
#include <sys/ptyio.h>
#endif /* hpux */
#ifdef sgi
-#define USE_SYSV_ENVVARS
#define HAS_BSD_GROUPS
#include <sys/sysmacros.h>
#endif /* sgi */
@@ -2771,10 +2770,12 @@ spawn ()
#endif /* USE_HANDSHAKE */
#ifdef USE_SYSV_ENVVARS
+#ifndef TIOCSWINSZ
sprintf (numbuf, "%d", screen->max_col + 1);
Setenv("COLUMNS=", numbuf);
sprintf (numbuf, "%d", screen->max_row + 1);
Setenv("LINES=", numbuf);
+#endif
#ifdef UTMP
if (pw) { /* SVR4 doesn't provide these */
if (!getenv("HOME"))