+++ /dev/null
-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)
- {
--#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));
- #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))
-@@ -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
-@@ -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.
-@@ -4063,6 +4066,7 @@
- Exit(int n)
- {
- register TScreen *screen = &term->screen;
-+ removeFromUtmp();
- #ifdef UTMP
- #ifdef USE_SYSV_UTMP
- #if defined(SVR4) || defined(SCO325)