---- XFree86-3.3.3.1/xc/programs/xterm/main.c.nosuidxterm Sun Mar 28 20:12:51 1999
-+++ XFree86-3.3.3.1/xc/programs/xterm/main.c Sun Mar 28 20:13:58 1999
-@@ -1862,7 +1862,7 @@
+diff -urN XFree86-3.3.5.orig/xc/programs/xterm/Imakefile XFree86-3.3.5/xc/programs/xterm/Imakefile
+--- XFree86-3.3.5.orig/xc/programs/xterm/Imakefile Wed Jul 28 15:37:50 1999
++++ XFree86-3.3.5/xc/programs/xterm/Imakefile Thu Sep 2 18:51:23 1999
+@@ -20,6 +20,10 @@
+ #define XkbClientDefines /**/
+ #endif
+
++#if InstallXtermSetUID
++#undef InstallXtermSetUID
++#endif
++
+ #ifndef XkbClientDepLibs
+ #define XkbClientDepLibs /**/
+ #endif
+@@ -48,6 +52,8 @@
+ PUCCPTYDDEF = -DPUCC_PTYD /* does not need to be setuid */
+ PTYLIB = -lpucc
+ #endif
++
++ PTYLIB = -lutil -lutempter
+
+ #if ((LinuxCLibMajorVersion == 6) && (LinuxCLibMinorVersion < 1))
+ PTYLIB = -lutil
+diff -urN XFree86-3.3.5.orig/xc/programs/xterm/main.c XFree86-3.3.5/xc/programs/xterm/main.c
+--- XFree86-3.3.5.orig/xc/programs/xterm/main.c Thu Sep 2 16:49:51 1999
++++ XFree86-3.3.5/xc/programs/xterm/main.c Thu Sep 2 18:52:41 1999
+@@ -1934,7 +1934,7 @@
static int
get_pty (int *pty)
{
--#ifdef __osf__
-+#if defined(__osf__) || defined(__linux__)
+-#if defined(__osf__) || (defined(__GLIBC__) && !defined(USE_USG_PTYS))
++#if defined(__osf__) || (defined(__GLIBC__) && !defined(USE_USG_PTYS)) || defined(__linux__)
int tty;
return (openpty(pty, &tty, ttydev, NULL, NULL));
- #endif
-@@ -2502,6 +2502,9 @@
- #endif /* TIOCSWINSZ */
- #endif /* sun */
+ #elif (defined(SYSV) && defined(i386) && !defined(SVR4)) || defined(__QNXNTO__)
+@@ -2611,6 +2611,9 @@
+ }
+ #endif /* sun vs TIOCSWINSZ */
+#undef UTMP
+ addToUtmp(ttydev, NULL, screen->respond);
if (!am_slave) {
#ifdef USE_HANDSHAKE
if (pipe(pc_pipe) || pipe(cp_pipe))
-@@ -3088,6 +3091,7 @@
+@@ -3230,6 +3233,7 @@
if (pw && pw->pw_name)
Setenv ("LOGNAME=", pw->pw_name); /* for POSIX */
#ifdef USE_SYSV_UTMP
/* Set up our utmp entry now. We need to do it here
** for the following reasons:
** - It needs to have our correct process id (for
-@@ -3185,7 +3189,6 @@
+@@ -3328,7 +3332,6 @@
#endif
/* close the file */
(void) endutent();
#else /* USE_SYSV_UTMP */
/* We can now get our ttyslot! We can also set the initial
* UTMP entry.
-@@ -3921,6 +3924,7 @@
+@@ -4063,6 +4066,7 @@
Exit(int n)
{
register TScreen *screen = &term->screen;
#ifdef UTMP
#ifdef USE_SYSV_UTMP
#if defined(SVR4) || defined(SCO325)
---- XFree86-3.3.3.1/xc/programs/xterm/Imakefile.nosuidxterm Sat Oct 24 03:58:19 1998
-+++ XFree86-3.3.3.1/xc/programs/xterm/Imakefile Sun Mar 28 20:13:58 1999
-@@ -20,6 +20,10 @@
- #define XkbClientDefines /**/
- #endif
-
-+#if InstallXtermSetUID
-+#undef InstallXtermSetUID
-+#endif
-+
- #ifndef XkbClientDepLibs
- #define XkbClientDepLibs /**/
- #endif
-@@ -48,6 +52,8 @@
- PUCCPTYDDEF = -DPUCC_PTYD /* does not need to be setuid */
- PTYLIB = -lpucc
- #endif
-+
-+ PTYLIB = -lutil -lutempter
-
- #if XtermWithI18N
- I18NDEF = -DI18N