456
|
1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4
|
1039
|
2 Copyright (C) 1987, 1990 Free Software Foundation, Inc.
|
456
|
3
|
|
4 This file is part of GNU Emacs.
|
|
5
|
1039
|
6 GNU Emacs is free software; you can redistribute it and/or modify
|
|
7 it under the terms of the GNU General Public License as published by
|
|
8 the Free Software Foundation; either version 1, or (at your option)
|
|
9 any later version.
|
456
|
10
|
1039
|
11 GNU Emacs is distributed in the hope that it will be useful,
|
|
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14 GNU General Public License for more details.
|
|
15
|
|
16 You should have received a copy of the GNU General Public License
|
|
17 along with GNU Emacs; see the file COPYING. If not, write to
|
|
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
456
|
19
|
|
20 /* This file written by James Van Artsdalen of Dell Computer Corporation.
|
|
21 * james@bigtex.cactus.org.
|
|
22 */
|
|
23
|
|
24 /* Use the SysVr3 file for at least base configuration. */
|
|
25
|
1039
|
26 #include "s-usg5-3.h"
|
456
|
27
|
|
28 #define USG5_4
|
|
29
|
|
30 /* We do have multiple jobs. Handle ^Z. */
|
|
31
|
|
32 #undef NOMULTIPLEJOBS
|
|
33
|
|
34 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
|
|
35
|
1039
|
36 #define LIB_STANDARD -lsocket -lnsl -lelf -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
|
456
|
37
|
1039
|
38 /* No <sioctl.h> */
|
456
|
39
|
1039
|
40 #define NO_SIOCTL_H
|
456
|
41
|
|
42 /* Undump with ELF */
|
|
43
|
|
44 #undef COFF
|
|
45
|
|
46 #define UNEXEC unexelf.o
|
|
47
|
|
48 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct
|
|
49 * tchars. But get <termio.h> first to make sure ttold.h doesn't
|
|
50 * interfere. And don't try to use SIGIO yet.
|
|
51 */
|
|
52
|
|
53 #ifdef emacs
|
|
54 #include <sys/filio.h>
|
|
55 #include <termio.h>
|
|
56 #include <sys/ttold.h>
|
|
57 #include <signal.h>
|
1039
|
58 #include <sys/wait.h>
|
|
59 #include <sys/stream.h>
|
|
60 #include <sys/stropts.h>
|
|
61 #include <sys/termios.h>
|
456
|
62 #undef SIGIO
|
|
63 #endif
|
|
64
|
1039
|
65 /* libc has this stuff, but not utimes. */
|
456
|
66
|
|
67 #define HAVE_RENAME
|
|
68 #define HAVE_SELECT
|
|
69 #define HAVE_TIMEVAL
|
|
70 #define HAVE_CLOSEDIR
|
|
71 #define HAVE_GETTIMEOFDAY
|
|
72 #define HAVE_DUP2
|
|
73
|
|
74 /* <sys/stat.h> *defines* stat(2) as a static function. If "static"
|
|
75 * is blank, then many files will have a public definition for stat(2).
|
|
76 */
|
|
77
|
|
78 #undef static
|
|
79
|
|
80 /* We need bss_end from emacs.c for undumping */
|
|
81
|
|
82 #ifndef USG_SHARED_LIBRARIES
|
|
83 #define USG_SHARED_LIBRARIES
|
|
84 #endif
|
|
85
|
|
86 /* We can support this */
|
|
87
|
|
88 #define CLASH_DETECTION
|
|
89
|
|
90 #define HAVE_PTYS
|
|
91 #define HAVE_SETSID
|
1039
|
92 #define HAVE_TCATTR
|
456
|
93
|
|
94 /* It is possible to receive SIGCHLD when there are no children
|
|
95 waiting, because a previous waitsys(2) cleaned up the carcass of child
|
|
96 without clearing the SIGCHLD pending info. So, use a non-blocking
|
|
97 wait3 instead, which maps to waitpid(2) in SysVr4. */
|
|
98
|
|
99 #define HAVE_WAIT_HEADER
|
|
100 #define WAITTYPE int
|
|
101 #define wait3(status, options, rusage) \
|
|
102 waitpid((pid_t) -1, (status), (options))
|
|
103 #define WRETCODE(w) (w >> 8)
|
|
104
|
|
105 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
|
|
106 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and
|
|
107 this is all we need. */
|
|
108
|
|
109 #define TIOCSIGSEND TIOCSIGNAL
|
|
110
|
|
111 /* This change means that we don't loop through allocate_pty too many
|
|
112 times in the (rare) event of a failure. */
|
|
113
|
|
114 #undef FIRST_PTY_LETTER
|
|
115 #define FIRST_PTY_LETTER 'z'
|
|
116
|
|
117 /* This sets the name of the master side of the PTY. */
|
|
118
|
|
119 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
|
|
120
|
|
121 /* This sets the name of the slave side of the PTY. On SysVr4,
|
|
122 grantpt(3) forks a subprocess, so keep sigchld_handler() from
|
|
123 intercepting that death. If any child but grantpt's should die
|
|
124 within, it should be caught after sigrelse(2). */
|
|
125
|
|
126 #define PTY_TTY_NAME_SPRINTF \
|
|
127 { \
|
|
128 char *ptsname(), *ptyname; \
|
|
129 \
|
|
130 sighold(SIGCLD); \
|
|
131 if (grantpt(fd) == -1) \
|
|
132 fatal("could not grant slave pty"); \
|
|
133 sigrelse(SIGCLD); \
|
|
134 if (unlockpt(fd) == -1) \
|
|
135 fatal("could not unlock slave pty"); \
|
|
136 if (!(ptyname = ptsname(fd))) \
|
|
137 fatal ("could not enable slave pty"); \
|
|
138 strncpy(pty_name, ptyname, sizeof(pty_name)); \
|
|
139 pty_name[sizeof(pty_name) - 1] = 0; \
|
|
140 }
|
|
141
|
|
142 /* Push various streams modules onto a PTY channel. */
|
|
143
|
|
144 #define SETUP_SLAVE_PTY \
|
|
145 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
|
|
146 fatal ("ioctl I_PUSH ptem", errno); \
|
|
147 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
|
|
148 fatal ("ioctl I_PUSH ldterm", errno); \
|
|
149 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
|
|
150 fatal ("ioctl I_PUSH ttcompat", errno);
|
|
151
|
1039
|
152 /* The definition of this in s-usg5-3.h is not needed in 5.4. */
|
|
153 /* liblnsl_s should never be used. The _s suffix implies a shared
|
|
154 library, as opposed to a DLL. Share libraries were used in SVR3, and are
|
|
155 available only in order to allow SVR3 binaries to run. They should not be
|
|
156 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */
|
|
157 #undef LIBX10_SYSTEM
|
|
158 #undef LIBX11_SYSTEM
|
456
|
159
|
1039
|
160 /* Tell x11term.c and keyboard.c we have the system V streams feature. */
|
|
161 #define SYSV_STREAMS
|
|
162
|
|
163 /* This definition was suggested for next release.
|
|
164 So give it a try. */
|
|
165 #define HAVE_SOCKETS
|