(set-version): Add doc/lispref/vol1.texi,vol2.texi.
[emacs.git] / src / s / usg5-4.h
blob2fa70435549a4256d1aa478ed1eeec2c07a2705e
1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4
2 Copyright (C) 1987, 1990, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
3 2006, 2007, 2008 Free Software Foundation, Inc.
5 This file is part of GNU Emacs.
7 GNU Emacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 GNU Emacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 /* This file written by James Van Artsdalen of Dell Computer Corporation.
21 * james@bigtex.cactus.org. Subsequently improved for Dell 2.2 by Eric
22 * S. Raymond <esr@snark.thyrsus.com>.
25 /* Use the SysVr3 file for at least base configuration. */
27 #include "usg5-3.h"
29 #define USG5_4
31 /* We do have multiple jobs. Handle ^Z. */
33 #undef NOMULTIPLEJOBS
35 /* Motif needs -lgen. */
36 #define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen
37 #define ORDINARY_LINK
39 #if 0
40 #ifdef ORDINARY_LINK
41 #define LIB_STANDARD -lc /usr/ucblib/libucb.a
42 #else
43 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
44 #define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
45 #endif
46 #else
48 #ifdef ORDINARY_LINK
49 #define LIB_STANDARD
50 #else
51 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
52 #define LIB_STANDARD -lc /usr/ccs/lib/crtn.o
53 #endif
54 #endif
56 /* there are no -lg libraries on this system, and no libPW */
58 #define LIBS_DEBUG
60 /* Undump with ELF */
62 #undef COFF
64 #define UNEXEC unexelf.o
66 /* <sys/stat.h> *defines* stat(2) as a static function. If "static"
67 * is blank, then many files will have a public definition for stat(2).
70 #undef static
72 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct
73 * tchars. But get <termio.h> first to make sure ttold.h doesn't
74 * interfere. And don't try to use SIGIO yet.
77 #ifndef NOT_C_CODE
78 #include <sys/wait.h>
79 #endif
81 #ifdef emacs
82 #ifndef NO_FILIO_H
83 #include <sys/filio.h>
84 #endif
85 #include <termio.h>
86 #include <sys/ttold.h>
87 #include <signal.h>
88 #include <sys/stream.h>
89 #include <sys/stropts.h>
90 #include <sys/termios.h>
91 #define BROKEN_SIGIO
92 #endif
94 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
95 * instead, there's a system variable _sys_nsig. Unfortunately, we need the
96 * constant to dimension an array. So wire in the appropriate value here.
98 #define NSIG_MINIMUM 32
100 /* We need bss_end from emacs.c for undumping */
102 #ifndef USG_SHARED_LIBRARIES
103 #define USG_SHARED_LIBRARIES
104 #endif
106 /* We can support this */
108 #define CLASH_DETECTION
110 #define HAVE_PTYS
111 #define HAVE_TERMIOS
112 #undef BROKEN_TIOCGWINSZ
113 #undef BROKEN_TIOCGETC
115 /* It is possible to receive SIGCHLD when there are no children
116 waiting, because a previous waitsys(2) cleaned up the carcass of child
117 without clearing the SIGCHLD pending info. So, use a non-blocking
118 wait3 instead, which maps to waitpid(2) in SysVr4. */
120 #define HAVE_WAIT_HEADER
121 #define WAITTYPE int
122 #define wait3(status, options, rusage) \
123 waitpid ((pid_t) -1, (status), (options))
124 #define WRETCODE(w) (w >> 8)
126 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
127 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and
128 this is all we need. */
130 #define TIOCSIGSEND TIOCSIGNAL
132 /* This change means that we don't loop through allocate_pty too many
133 times in the (rare) event of a failure. */
135 #undef FIRST_PTY_LETTER
136 #define FIRST_PTY_LETTER 'z'
138 /* This sets the name of the master side of the PTY. */
140 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
142 /* This sets the name of the slave side of the PTY. On SysVr4,
143 grantpt(3) forks a subprocess, so keep sigchld_handler() from
144 intercepting that death. If any child but grantpt's should die
145 within, it should be caught after sigrelse(2). */
147 #define PTY_TTY_NAME_SPRINTF \
149 char *ptsname (), *ptyname; \
151 sighold (SIGCLD); \
152 if (grantpt (fd) == -1) \
153 { emacs_close (fd); return -1; } \
154 sigrelse (SIGCLD); \
155 if (unlockpt (fd) == -1) \
156 { emacs_close (fd); return -1; } \
157 if (!(ptyname = ptsname (fd))) \
158 { emacs_close (fd); return -1; } \
159 strncpy (pty_name, ptyname, sizeof (pty_name)); \
160 pty_name[sizeof (pty_name) - 1] = 0; \
163 /* Push various streams modules onto a PTY channel. */
165 #define SETUP_SLAVE_PTY \
166 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
167 fatal ("ioctl I_PUSH ptem", errno); \
168 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
169 fatal ("ioctl I_PUSH ldterm", errno); \
170 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
171 fatal ("ioctl I_PUSH ttcompat", errno);
173 /* Undo the SVr3 X11 library definition */
174 #undef LIB_X11_LIB
176 /* The definition of this in s-usg5-3.h is not needed in 5.4. */
177 /* liblnsl_s should never be used. The _s suffix implies a shared
178 library, as opposed to a DLL. Share libraries were used in SVR3, and are
179 available only in order to allow SVR3 binaries to run. They should not be
180 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */
181 #undef LIBX11_SYSTEM
183 /* Tell x11term.c and keyboard.c we have the system V streams feature. */
184 #define SYSV_STREAMS
186 /* This definition was suggested for next release.
187 So give it a try. */
188 #define HAVE_SOCKETS
190 /* Markus Weiand <weiand@khof.com> says this is needed for Motif on
191 SINIX. */
192 #undef LIBS_SYSTEM
193 #define LIBS_SYSTEM -lgen
195 /* arch-tag: 1a0ed909-5faa-434b-b7c3-9d86c63d53a6
196 (do not change this comment) */