456
|
1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4
|
|
2 Copyright (C) 1987 Free Software Foundation, Inc.
|
|
3
|
|
4 This file is part of GNU Emacs.
|
|
5
|
|
6 GNU Emacs is distributed in the hope that it will be useful,
|
|
7 but WITHOUT ANY WARRANTY. No author or distributor
|
|
8 accepts responsibility to anyone for the consequences of using it
|
|
9 or for whether it serves any particular purpose or works at all,
|
|
10 unless he says so in writing. Refer to the GNU Emacs General Public
|
|
11 License for full details.
|
|
12
|
|
13 Everyone is granted permission to copy, modify and redistribute
|
|
14 GNU Emacs, but only under the conditions described in the
|
|
15 GNU Emacs General Public License. A copy of this license is
|
|
16 supposed to have been given to you along with GNU Emacs so you
|
|
17 can know your rights and responsibilities. It should be in a
|
|
18 file named COPYING. Among other things, the copyright notice
|
|
19 and this notice must be preserved on all copies. */
|
|
20
|
|
21 /* This file written by James Van Artsdalen of Dell Computer Corporation.
|
|
22 * james@bigtex.cactus.org.
|
|
23 */
|
|
24
|
|
25 /* Use the SysVr3 file for at least base configuration. */
|
|
26
|
|
27 #include "usg5-3.h"
|
|
28
|
|
29 #define USG5_4
|
|
30
|
|
31 /* We do have multiple jobs. Handle ^Z. */
|
|
32
|
|
33 #undef NOMULTIPLEJOBS
|
|
34
|
|
35 /* If compiled by GNU C, we must have gnulib */
|
|
36
|
|
37 #ifdef __GNUC__
|
|
38 #define GNULIB /usr/local/lib/gcc-gnulib
|
|
39 #define LIBS_DEBUG
|
|
40 #else
|
|
41 #define GNULIB
|
|
42 #endif
|
|
43
|
|
44 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
|
|
45
|
|
46 #define LIB_STANDARD GNULIB -lsocket -lnsl -lelf -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
|
|
47
|
|
48 /* Use ptem.h to get structures related to windows. */
|
|
49
|
|
50 #define NEED_PTEM_H
|
|
51
|
|
52 /* Undump with ELF */
|
|
53
|
|
54 #undef COFF
|
|
55
|
|
56 #define UNEXEC unexelf.o
|
|
57
|
|
58 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct
|
|
59 * tchars. But get <termio.h> first to make sure ttold.h doesn't
|
|
60 * interfere. And don't try to use SIGIO yet.
|
|
61 */
|
|
62
|
|
63 #ifdef emacs
|
|
64 #include <sys/filio.h>
|
|
65 #include <termio.h>
|
|
66 #include <sys/ttold.h>
|
|
67 #include <signal.h>
|
|
68 #undef SIGIO
|
|
69 #endif
|
|
70
|
|
71 /* libc has this stuff, but not utimes. */
|
|
72
|
|
73 #define HAVE_RENAME
|
|
74 #define HAVE_SELECT
|
|
75 #define HAVE_TIMEVAL
|
|
76 #define HAVE_CLOSEDIR
|
|
77 #define HAVE_GETTIMEOFDAY
|
|
78 #define HAVE_DUP2
|
|
79
|
|
80 #define USE_UTIME
|
|
81
|
|
82 /* <sys/stat.h> *defines* stat(2) as a static function. If "static"
|
|
83 * is blank, then many files will have a public definition for stat(2).
|
|
84 */
|
|
85
|
|
86 #undef static
|
|
87
|
|
88 /* We need bss_end from emacs.c for undumping */
|
|
89
|
|
90 #ifndef USG_SHARED_LIBRARIES
|
|
91 #define USG_SHARED_LIBRARIES
|
|
92 #endif
|
|
93
|
|
94 /* We can support this */
|
|
95
|
|
96 #define CLASH_DETECTION
|
|
97
|
|
98 #define HAVE_PTYS
|
|
99 #define HAVE_SETSID
|
|
100
|
|
101 /* It is possible to receive SIGCHLD when there are no children
|
|
102 waiting, because a previous waitsys(2) cleaned up the carcass of child
|
|
103 without clearing the SIGCHLD pending info. So, use a non-blocking
|
|
104 wait3 instead, which maps to waitpid(2) in SysVr4. */
|
|
105
|
|
106 #define HAVE_WAIT_HEADER
|
|
107 #define WAITTYPE int
|
|
108 #define wait3(status, options, rusage) \
|
|
109 waitpid((pid_t) -1, (status), (options))
|
|
110 #define WRETCODE(w) (w >> 8)
|
|
111
|
|
112 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
|
|
113 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and
|
|
114 this is all we need. */
|
|
115
|
|
116 #define TIOCSIGSEND TIOCSIGNAL
|
|
117
|
|
118 /* This change means that we don't loop through allocate_pty too many
|
|
119 times in the (rare) event of a failure. */
|
|
120
|
|
121 #undef FIRST_PTY_LETTER
|
|
122 #define FIRST_PTY_LETTER 'z'
|
|
123
|
|
124 /* This sets the name of the master side of the PTY. */
|
|
125
|
|
126 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
|
|
127
|
|
128 /* This sets the name of the slave side of the PTY. On SysVr4,
|
|
129 grantpt(3) forks a subprocess, so keep sigchld_handler() from
|
|
130 intercepting that death. If any child but grantpt's should die
|
|
131 within, it should be caught after sigrelse(2). */
|
|
132
|
|
133 #define PTY_TTY_NAME_SPRINTF \
|
|
134 { \
|
|
135 char *ptsname(), *ptyname; \
|
|
136 \
|
|
137 sighold(SIGCLD); \
|
|
138 if (grantpt(fd) == -1) \
|
|
139 fatal("could not grant slave pty"); \
|
|
140 sigrelse(SIGCLD); \
|
|
141 if (unlockpt(fd) == -1) \
|
|
142 fatal("could not unlock slave pty"); \
|
|
143 if (!(ptyname = ptsname(fd))) \
|
|
144 fatal ("could not enable slave pty"); \
|
|
145 strncpy(pty_name, ptyname, sizeof(pty_name)); \
|
|
146 pty_name[sizeof(pty_name) - 1] = 0; \
|
|
147 }
|
|
148
|
|
149 /* Push various streams modules onto a PTY channel. */
|
|
150
|
|
151 #define SETUP_SLAVE_PTY \
|
|
152 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
|
|
153 fatal ("ioctl I_PUSH ptem", errno); \
|
|
154 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
|
|
155 fatal ("ioctl I_PUSH ldterm", errno); \
|
|
156 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
|
|
157 fatal ("ioctl I_PUSH ttcompat", errno);
|
|
158
|
|
159 /* The definition of this in usg5-3.h is not needed in 5.4. */
|
|
160
|
|
161 #undef LIBX11_SYSTEM
|