]>
Commit | Line | Data |
---|---|---|
8af5c795 JR |
1 | diff -urN XFree86-3.3.5.orig/xc/programs/xterm/Imakefile XFree86-3.3.5/xc/programs/xterm/Imakefile |
2 | --- XFree86-3.3.5.orig/xc/programs/xterm/Imakefile Wed Jul 28 15:37:50 1999 | |
3 | +++ XFree86-3.3.5/xc/programs/xterm/Imakefile Thu Sep 2 18:51:23 1999 | |
4 | @@ -20,6 +20,10 @@ | |
5 | #define XkbClientDefines /**/ | |
6 | #endif | |
7 | ||
8 | +#if InstallXtermSetUID | |
9 | +#undef InstallXtermSetUID | |
10 | +#endif | |
11 | + | |
12 | #ifndef XkbClientDepLibs | |
13 | #define XkbClientDepLibs /**/ | |
14 | #endif | |
15 | @@ -48,6 +52,8 @@ | |
16 | PUCCPTYDDEF = -DPUCC_PTYD /* does not need to be setuid */ | |
17 | PTYLIB = -lpucc | |
18 | #endif | |
19 | + | |
20 | + PTYLIB = -lutil -lutempter | |
21 | ||
22 | #if ((LinuxCLibMajorVersion == 6) && (LinuxCLibMinorVersion < 1)) | |
23 | PTYLIB = -lutil | |
24 | diff -urN XFree86-3.3.5.orig/xc/programs/xterm/main.c XFree86-3.3.5/xc/programs/xterm/main.c | |
25 | --- XFree86-3.3.5.orig/xc/programs/xterm/main.c Thu Sep 2 16:49:51 1999 | |
26 | +++ XFree86-3.3.5/xc/programs/xterm/main.c Thu Sep 2 18:52:41 1999 | |
27 | @@ -1934,7 +1934,7 @@ | |
b1ec4fd4 | 28 | static int |
29 | get_pty (int *pty) | |
30 | { | |
8af5c795 JR |
31 | -#if defined(__osf__) || (defined(__GLIBC__) && !defined(USE_USG_PTYS)) |
32 | +#if defined(__osf__) || (defined(__GLIBC__) && !defined(USE_USG_PTYS)) || defined(__linux__) | |
b1ec4fd4 | 33 | int tty; |
34 | return (openpty(pty, &tty, ttydev, NULL, NULL)); | |
8af5c795 JR |
35 | #elif (defined(SYSV) && defined(i386) && !defined(SVR4)) || defined(__QNXNTO__) |
36 | @@ -2611,6 +2611,9 @@ | |
37 | } | |
38 | #endif /* sun vs TIOCSWINSZ */ | |
b1ec4fd4 | 39 | |
40 | +#undef UTMP | |
41 | + addToUtmp(ttydev, NULL, screen->respond); | |
42 | + | |
43 | if (!am_slave) { | |
44 | #ifdef USE_HANDSHAKE | |
45 | if (pipe(pc_pipe) || pipe(cp_pipe)) | |
8af5c795 | 46 | @@ -3230,6 +3233,7 @@ |
b1ec4fd4 | 47 | if (pw && pw->pw_name) |
48 | Setenv ("LOGNAME=", pw->pw_name); /* for POSIX */ | |
49 | #ifdef USE_SYSV_UTMP | |
50 | + | |
51 | /* Set up our utmp entry now. We need to do it here | |
52 | ** for the following reasons: | |
53 | ** - It needs to have our correct process id (for | |
8af5c795 | 54 | @@ -3328,7 +3332,6 @@ |
b1ec4fd4 | 55 | #endif |
56 | /* close the file */ | |
57 | (void) endutent(); | |
58 | - | |
59 | #else /* USE_SYSV_UTMP */ | |
60 | /* We can now get our ttyslot! We can also set the initial | |
61 | * UTMP entry. | |
8af5c795 | 62 | @@ -4063,6 +4066,7 @@ |
b1ec4fd4 | 63 | Exit(int n) |
64 | { | |
65 | register TScreen *screen = &term->screen; | |
66 | + removeFromUtmp(); | |
67 | #ifdef UTMP | |
68 | #ifdef USE_SYSV_UTMP | |
69 | #if defined(SVR4) || defined(SCO325) |