(x_window): Test FRAME_EXTERNAL_MENU_BAR
[emacs.git] / src / s / usg5-4.h
blobe8fe34a44144d41cbdbd1f7728ad19540ddb24cb
1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4
2 Copyright (C) 1987, 1990 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
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 #define LIBS_SYSTEM -lsocket -lnsl -lelf
36 #define ORDINARY_LINK
38 #if 0
39 #ifdef ORDINARY_LINK
40 #define LIB_STANDARD -lc /usr/ucblib/libucb.a
41 #else
42 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
43 #define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
44 #endif
45 #else
47 #ifdef ORDINARY_LINK
48 #define LIB_STANDARD
49 #else
50 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
51 #define LIB_STANDARD -lc /usr/ccs/lib/crtn.o
52 #endif
53 #endif
55 /* there are no -lg libraries on this system, and no libPW */
57 #define LIBS_DEBUG
58 #define LIBS_STANDARD -lc
60 /* No <sioctl.h> */
62 #define NO_SIOCTL_H
64 /* Undump with ELF */
66 #undef COFF
68 #define UNEXEC unexelf.o
70 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct
71 * tchars. But get <termio.h> first to make sure ttold.h doesn't
72 * interfere. And don't try to use SIGIO yet.
75 #ifdef emacs
76 #include <sys/filio.h>
77 #include <termio.h>
78 #include <sys/ttold.h>
79 #include <signal.h>
80 #include <sys/wait.h>
81 #include <sys/stream.h>
82 #include <sys/stropts.h>
83 #include <sys/termios.h>
84 #undef SIGIO
85 #endif
87 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
88 * instead, there's a system variable _sys_nsig. Unfortunately, we need the
89 * constant to dimension an array. So wire in the appropriate value here.
92 #ifndef NSIG
93 #define NSIG 32
94 #endif
96 /* libc has this stuff, but not utimes. */
98 #define HAVE_SELECT
99 #define HAVE_TIMEVAL
101 /* <sys/stat.h> *defines* stat(2) as a static function. If "static"
102 * is blank, then many files will have a public definition for stat(2).
105 #undef static
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 #define TIOCSIGSEND TIOCSIGNAL
139 /* This change means that we don't loop through allocate_pty too many
140 times in the (rare) event of a failure. */
142 #undef FIRST_PTY_LETTER
143 #define FIRST_PTY_LETTER 'z'
145 /* This sets the name of the master side of the PTY. */
147 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
149 /* This sets the name of the slave side of the PTY. On SysVr4,
150 grantpt(3) forks a subprocess, so keep sigchld_handler() from
151 intercepting that death. If any child but grantpt's should die
152 within, it should be caught after sigrelse(2). */
154 #define PTY_TTY_NAME_SPRINTF \
156 char *ptsname(), *ptyname; \
158 sighold(SIGCLD); \
159 if (grantpt(fd) == -1) \
160 fatal("could not grant slave pty"); \
161 sigrelse(SIGCLD); \
162 if (unlockpt(fd) == -1) \
163 fatal("could not unlock slave pty"); \
164 if (!(ptyname = ptsname(fd))) \
165 fatal ("could not enable slave pty"); \
166 strncpy(pty_name, ptyname, sizeof(pty_name)); \
167 pty_name[sizeof(pty_name) - 1] = 0; \
170 /* Push various streams modules onto a PTY channel. */
172 #define SETUP_SLAVE_PTY \
173 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
174 fatal ("ioctl I_PUSH ptem", errno); \
175 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
176 fatal ("ioctl I_PUSH ldterm", errno); \
177 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
178 fatal ("ioctl I_PUSH ttcompat", errno);
180 /* Undo the SVr3 X11 library definition */
181 #undef LIB_X11_LIB
183 /* The definition of this in s-usg5-3.h is not needed in 5.4. */
184 /* liblnsl_s should never be used. The _s suffix implies a shared
185 library, as opposed to a DLL. Share libraries were used in SVR3, and are
186 available only in order to allow SVR3 binaries to run. They should not be
187 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */
188 #undef LIBX10_SYSTEM
189 #undef LIBX11_SYSTEM
191 /* Tell x11term.c and keyboard.c we have the system V streams feature. */
192 #define SYSV_STREAMS
194 /* This definition was suggested for next release.
195 So give it a try. */
196 #define HAVE_SOCKETS
198 #define bcopy(src,dst,n) memmove(dst,src,n)
199 #define bcmp(src,dst,n) memcmp(src,dst,n)
200 #define bzero(s,n) memset(s,0,n)