Merge from emacs-23
[emacs.git] / src / s / usg5-4.h
blobb02caf9a3da3699ecf2dc74d24aa8c6cf6cb6831
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, 2009, 2010 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 #define USG /* System III, System V, etc */
29 #define USG5
30 #define USG5_4
32 /* SYSTEM_TYPE should indicate the kind of system you are using.
33 It sets the Lisp variable system-type. */
35 #define SYSTEM_TYPE "usg-unix-v"
38 * Define HAVE_TERMIO if the system provides sysV-style ioctls
39 * for terminal control.
42 #define HAVE_TERMIO
45 * Define HAVE_PTYS if the system supports pty devices.
49 * Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir
50 * library functions. Almost, but not quite the same as
51 * the 4.2 functions
53 #define SYSV_SYSTEM_DIR
55 /* The file containing the kernel's symbol table is called /unix. */
57 #define KERNEL_FILE "/unix"
59 /* The symbol in the kernel where the load average is found
60 is named avenrun. */
62 #define LDAV_SYMBOL "avenrun"
64 /* Special hacks needed to make Emacs run on this system. */
66 #define POSIX_SIGNALS
68 /* setjmp and longjmp can safely replace _setjmp and _longjmp,
69 but they will run slower. */
71 #define _setjmp setjmp
72 #define _longjmp longjmp
74 /* On USG systems these have different names */
75 #ifndef HAVE_INDEX
76 #define index strchr
77 #endif /* ! defined (HAVE_INDEX) */
78 #ifndef HAVE_RINDEX
79 #define rindex strrchr
80 #endif /* ! defined (HAVE_RINDEX) */
82 /* Use terminfo instead of termcap. */
84 #define TERMINFO
87 /* The docs for system V/386 suggest v.3 has sigpause,
88 so let's give it a try. */
89 #define HAVE_SYSV_SIGPAUSE
92 /* If we're using the System V X port, BSD bstring functions will be handy */
94 #ifdef HAVE_X_WINDOWS
95 #define BSTRING
96 #endif /* HAVE_X_WINDOWS */
98 /* On USG systems signal handlers return void */
100 #define SIGTYPE void
102 #define ORDINARY_LINK
104 #define LIB_STANDARD
106 /* Undump with ELF */
108 #undef COFF
110 #define UNEXEC unexelf.o
112 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct
113 * tchars. But get <termio.h> first to make sure ttold.h doesn't
114 * interfere. And don't try to use SIGIO yet.
117 #ifndef NOT_C_CODE
118 #include <sys/wait.h>
119 #endif
121 #ifdef emacs
122 #include <sys/filio.h>
123 #include <termio.h>
124 #include <sys/ttold.h>
125 #include <signal.h>
126 #include <sys/stream.h>
127 #include <sys/stropts.h>
128 #include <sys/termios.h>
129 #define BROKEN_SIGIO
130 #endif
132 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
133 * instead, there's a system variable _sys_nsig. Unfortunately, we need the
134 * constant to dimension an array. So wire in the appropriate value here.
136 #define NSIG_MINIMUM 32
138 /* We can support this */
140 #define CLASH_DETECTION
142 #define HAVE_PTYS
143 #define HAVE_TERMIOS
145 /* It is possible to receive SIGCHLD when there are no children
146 waiting, because a previous waitsys(2) cleaned up the carcass of child
147 without clearing the SIGCHLD pending info. So, use a non-blocking
148 wait3 instead, which maps to waitpid(2) in SysVr4. */
150 #define wait3(status, options, rusage) \
151 waitpid ((pid_t) -1, (status), (options))
152 #define WRETCODE(w) (w >> 8)
154 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
155 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and
156 this is all we need. */
158 #define TIOCSIGSEND TIOCSIGNAL
160 /* This change means that we don't loop through allocate_pty too many
161 times in the (rare) event of a failure. */
163 #define FIRST_PTY_LETTER 'z'
165 /* This sets the name of the master side of the PTY. */
167 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
169 /* Push various streams modules onto a PTY channel. */
171 #define SETUP_SLAVE_PTY \
172 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
173 fatal ("ioctl I_PUSH ptem", errno); \
174 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
175 fatal ("ioctl I_PUSH ldterm", errno); \
176 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
177 fatal ("ioctl I_PUSH ttcompat", errno);
179 /* This definition was suggested for next release.
180 So give it a try. */
181 #define HAVE_SOCKETS
183 /* arch-tag: 1a0ed909-5faa-434b-b7c3-9d86c63d53a6
184 (do not change this comment) */