(ensure_echo_area_buffers): New.
[emacs.git] / src / s / usg5-4.h
blob2c10a7550c7a7c4364555eccc4bee7dd0d15d6f6
1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4
2 Copyright (C) 1987, 1990, 1999 Free Software Foundation, Inc.
4 This file is part of GNU Emacs.
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 2, or (at your option)
9 any later version.
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.
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, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* This file written by James Van Artsdalen of Dell Computer Corporation.
22 * james@bigtex.cactus.org. Subsequently improved for Dell 2.2 by Eric
23 * S. Raymond <esr@snark.thyrsus.com>.
26 /* Use the SysVr3 file for at least base configuration. */
28 #include "usg5-3.h"
30 #define USG5_4
32 /* We do have multiple jobs. Handle ^Z. */
34 #undef NOMULTIPLEJOBS
36 #define LIBS_SYSTEM -lsocket -lnsl -lelf
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
59 /* This is turned off because nobody actually uses LIBS_STANDARD (Nov 1995).
60 That name is a typo. The next step is to delete this entirely. */
61 /* #define LIBS_STANDARD -lc */
63 /* No <sioctl.h> */
65 #define NO_SIOCTL_H
67 /* Undump with ELF */
69 #undef COFF
71 #define UNEXEC unexelf.o
73 /* <sys/stat.h> *defines* stat(2) as a static function. If "static"
74 * is blank, then many files will have a public definition for stat(2).
77 #undef static
79 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct
80 * tchars. But get <termio.h> first to make sure ttold.h doesn't
81 * interfere. And don't try to use SIGIO yet.
84 #ifndef NOT_C_CODE
85 #include <sys/wait.h>
86 #endif
88 #ifdef emacs
89 #ifndef NO_FILIO_H
90 #include <sys/filio.h>
91 #endif
92 #include <termio.h>
93 #include <sys/ttold.h>
94 #include <signal.h>
95 #include <sys/stream.h>
96 #include <sys/stropts.h>
97 #include <sys/termios.h>
98 #define BROKEN_SIGIO
99 #endif
101 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
102 * instead, there's a system variable _sys_nsig. Unfortunately, we need the
103 * constant to dimension an array. So wire in the appropriate value here.
105 #define NSIG_MINIMUM 32
107 /* We need bss_end from emacs.c for undumping */
109 #ifndef USG_SHARED_LIBRARIES
110 #define USG_SHARED_LIBRARIES
111 #endif
113 /* We can support this */
115 #define CLASH_DETECTION
117 #define HAVE_PTYS
118 #define HAVE_TERMIOS
119 #undef BROKEN_TIOCGWINSZ
120 #undef BROKEN_TIOCGETC
122 /* It is possible to receive SIGCHLD when there are no children
123 waiting, because a previous waitsys(2) cleaned up the carcass of child
124 without clearing the SIGCHLD pending info. So, use a non-blocking
125 wait3 instead, which maps to waitpid(2) in SysVr4. */
127 #define HAVE_WAIT_HEADER
128 #define WAITTYPE int
129 #define wait3(status, options, rusage) \
130 waitpid ((pid_t) -1, (status), (options))
131 #define WRETCODE(w) (w >> 8)
133 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
134 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and
135 this is all we need. */
137 #ifndef IRIX6
138 #define TIOCSIGSEND TIOCSIGNAL
139 #endif
141 /* This change means that we don't loop through allocate_pty too many
142 times in the (rare) event of a failure. */
144 #undef FIRST_PTY_LETTER
145 #define FIRST_PTY_LETTER 'z'
147 /* This sets the name of the master side of the PTY. */
149 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
151 /* This sets the name of the slave side of the PTY. On SysVr4,
152 grantpt(3) forks a subprocess, so keep sigchld_handler() from
153 intercepting that death. If any child but grantpt's should die
154 within, it should be caught after sigrelse(2). */
156 #define PTY_TTY_NAME_SPRINTF \
158 char *ptsname (), *ptyname; \
160 sighold (SIGCLD); \
161 if (grantpt (fd) == -1) \
162 { emacs_close (fd); return -1; } \
163 sigrelse (SIGCLD); \
164 if (unlockpt (fd) == -1) \
165 { emacs_close (fd); return -1; } \
166 if (!(ptyname = ptsname (fd))) \
167 { emacs_close (fd); return -1; } \
168 strncpy (pty_name, ptyname, sizeof (pty_name)); \
169 pty_name[sizeof (pty_name) - 1] = 0; \
172 /* Push various streams modules onto a PTY channel. */
174 #define SETUP_SLAVE_PTY \
175 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
176 fatal ("ioctl I_PUSH ptem", errno); \
177 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
178 fatal ("ioctl I_PUSH ldterm", errno); \
179 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
180 fatal ("ioctl I_PUSH ttcompat", errno);
182 /* Undo the SVr3 X11 library definition */
183 #undef LIB_X11_LIB
185 /* The definition of this in s-usg5-3.h is not needed in 5.4. */
186 /* liblnsl_s should never be used. The _s suffix implies a shared
187 library, as opposed to a DLL. Share libraries were used in SVR3, and are
188 available only in order to allow SVR3 binaries to run. They should not be
189 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */
190 #undef LIBX10_SYSTEM
191 #undef LIBX11_SYSTEM
193 /* Tell x11term.c and keyboard.c we have the system V streams feature. */
194 #define SYSV_STREAMS
196 /* This definition was suggested for next release.
197 So give it a try. */
198 #define HAVE_SOCKETS
200 #ifndef IRIX6
201 #define bcopy(src,dst,n) memmove (dst,src,n)
202 #define bcmp(src,dst,n) memcmp (src,dst,n)
203 #define bzero(s,n) memset (s,0,n)
204 #endif