Mercurial > emacs
annotate src/s/usg5-4.h @ 96673:5dc035add002
(Glossary): Remove xref to Text Characters.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 15 Jul 2008 15:29:24 +0000 |
parents | 79121a8f01e3 |
children | a5dd283d15b2 |
rev | line source |
---|---|
456 | 1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4 |
94715
1f134b61867c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2 Copyright (C) 1987, 1990, 1999, 2000, 2001, 2002, 2003, 2004, 2005, |
1f134b61867c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
3 2006, 2007, 2008 Free Software Foundation, Inc. |
456 | 4 |
5 This file is part of GNU Emacs. | |
6 | |
94715
1f134b61867c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
7 GNU Emacs is free software: you can redistribute it and/or modify |
1039 | 8 it under the terms of the GNU General Public License as published by |
94715
1f134b61867c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
1f134b61867c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
10 (at your option) any later version. |
456 | 11 |
1039 | 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. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
94715
1f134b61867c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
456 | 19 |
20 /* This file written by James Van Artsdalen of Dell Computer Corporation. | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
21 * james@bigtex.cactus.org. Subsequently improved for Dell 2.2 by Eric |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
22 * S. Raymond <esr@snark.thyrsus.com>. |
456 | 23 */ |
24 | |
25 /* Use the SysVr3 file for at least base configuration. */ | |
26 | |
96303 | 27 #define USG /* System III, System V, etc */ |
456 | 28 |
96303 | 29 #define USG5 |
456 | 30 #define USG5_4 |
31 | |
96303 | 32 /* SYSTEM_TYPE should indicate the kind of system you are using. |
33 It sets the Lisp variable system-type. */ | |
34 | |
35 #define SYSTEM_TYPE "usg-unix-v" | |
36 | |
37 /* Default is to set interrupt_input to 0: don't do input buffering within Emacs */ | |
38 | |
39 /* #define INTERRUPT_INPUT */ | |
40 | |
41 /* | |
42 * Define HAVE_TERMIO if the system provides sysV-style ioctls | |
43 * for terminal control. | |
44 */ | |
45 | |
46 #define HAVE_TERMIO | |
456 | 47 |
96303 | 48 /* |
49 * Define HAVE_PTYS if the system supports pty devices. | |
50 */ | |
51 | |
52 /* Some versions of V.3 have this, but not all. | |
96643
79121a8f01e3
* config.nt (HAVE_FACES): Remove, unused.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
96620
diff
changeset
|
53 #define HAVE_PTYS */ |
96303 | 54 |
55 /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ | |
56 | |
57 /* #define HAVE_SOCKETS */ | |
58 | |
59 /* | |
60 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate | |
61 * The 4.2 opendir, etc., library functions. | |
62 */ | |
63 | |
64 /* #define NONSYSTEM_DIR_LIBRARY */ | |
456 | 65 |
96303 | 66 /* |
67 * Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir | |
68 * library functions. Almost, but not quite the same as | |
69 * the 4.2 functions | |
70 */ | |
71 #define SYSV_SYSTEM_DIR | |
72 | |
73 /* Define this symbol if your system has the functions bcopy, etc. */ | |
74 | |
75 /* #define BSTRING */ | |
76 | |
77 /* subprocesses should be defined if you want to | |
78 have code for asynchronous subprocesses | |
79 (as used in M-x compile and M-x shell). | |
80 This is supposed to work now on system V release 2. */ | |
81 | |
82 #define subprocesses | |
83 | |
84 /* define MAIL_USE_FLOCK if the mailer uses flock | |
85 to interlock access to /usr/spool/mail/$USER. | |
86 The alternative is that a lock file named | |
87 /usr/spool/mail/$USER.lock. */ | |
88 | |
89 /* #define MAIL_USE_FLOCK */ | |
90 | |
91 /* Define CLASH_DETECTION if you want lock files to be written | |
92 so that Emacs can tell instantly when you try to modify | |
93 a file that someone else has modified in his Emacs. */ | |
94 | |
95 /* #define CLASH_DETECTION */ | |
456 | 96 |
96303 | 97 /* The file containing the kernel's symbol table is called /unix. */ |
98 | |
99 #define KERNEL_FILE "/unix" | |
100 | |
101 /* The symbol in the kernel where the load average is found | |
102 is named avenrun. */ | |
103 | |
104 #define LDAV_SYMBOL "avenrun" | |
105 | |
106 /* Define this if system V IPC is available. */ | |
107 | |
108 #define HAVE_SYSVIPC | |
109 | |
110 /* Special hacks needed to make Emacs run on this system. */ | |
111 | |
112 /* | |
113 * Make the sigsetmask function go away. Don't know what the | |
114 * ramifications of this are, but doesn't seem possible to | |
115 * emulate it properly anyway at this point. | |
116 */ | |
117 | |
118 #define sigsetmask(mask) /* Null expansion */ | |
119 | |
120 /* setjmp and longjmp can safely replace _setjmp and _longjmp, | |
121 but they will run slower. */ | |
122 | |
123 #define _setjmp setjmp | |
124 #define _longjmp longjmp | |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
125 |
96303 | 126 /* On USG systems these have different names */ |
127 #ifndef HAVE_INDEX | |
128 #define index strchr | |
129 #endif /* ! defined (HAVE_INDEX) */ | |
130 #ifndef HAVE_RINDEX | |
131 #define rindex strrchr | |
132 #endif /* ! defined (HAVE_RINDEX) */ | |
133 | |
134 /* Compiler bug bites on many systems when default ADDR_CORRECT is used. */ | |
135 | |
136 #define ADDR_CORRECT(x) (x) | |
137 | |
138 /* Use terminfo instead of termcap. */ | |
139 | |
140 #define TERMINFO | |
141 | |
142 | |
143 /* The docs for system V/386 suggest v.3 has sigpause, | |
144 so let's give it a try. */ | |
145 #define HAVE_SYSV_SIGPAUSE | |
146 | |
147 | |
148 /* If we're using the System V X port, BSD bstring functions will be handy */ | |
149 | |
150 #ifdef HAVE_X_WINDOWS | |
151 #define BSTRING | |
152 #endif /* HAVE_X_WINDOWS */ | |
153 | |
154 /* Enable support for shared libraries in unexec. */ | |
155 | |
156 #define USG_SHARED_LIBRARIES | |
157 | |
158 /* On USG systems signal handlers return void */ | |
159 | |
160 #define SIGTYPE void | |
161 | |
96378
1163f7459d65
Fix previous change: keep the correct branch of a
Dan Nicolaescu <dann@ics.uci.edu>
parents:
96303
diff
changeset
|
162 #define ORDINARY_LINK |
1163f7459d65
Fix previous change: keep the correct branch of a
Dan Nicolaescu <dann@ics.uci.edu>
parents:
96303
diff
changeset
|
163 |
1163f7459d65
Fix previous change: keep the correct branch of a
Dan Nicolaescu <dann@ics.uci.edu>
parents:
96303
diff
changeset
|
164 #define LIB_STANDARD |
456 | 165 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
166 /* there are no -lg libraries on this system, and no libPW */ |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
167 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
168 #define LIBS_DEBUG |
456 | 169 |
170 /* Undump with ELF */ | |
171 | |
172 #undef COFF | |
173 | |
174 #define UNEXEC unexelf.o | |
175 | |
176 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct | |
177 * tchars. But get <termio.h> first to make sure ttold.h doesn't | |
178 * interfere. And don't try to use SIGIO yet. | |
179 */ | |
180 | |
13466
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
181 #ifndef NOT_C_CODE |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
182 #include <sys/wait.h> |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
183 #endif |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
184 |
456 | 185 #ifdef emacs |
186 #include <sys/filio.h> | |
187 #include <termio.h> | |
188 #include <sys/ttold.h> | |
189 #include <signal.h> | |
1039 | 190 #include <sys/stream.h> |
191 #include <sys/stropts.h> | |
192 #include <sys/termios.h> | |
26090 | 193 #define BROKEN_SIGIO |
456 | 194 #endif |
195 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
196 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments; |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
197 * instead, there's a system variable _sys_nsig. Unfortunately, we need the |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
198 * constant to dimension an array. So wire in the appropriate value here. |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
199 */ |
26090 | 200 #define NSIG_MINIMUM 32 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
201 |
456 | 202 /* We can support this */ |
203 | |
204 #define CLASH_DETECTION | |
205 | |
206 #define HAVE_PTYS | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
207 #define HAVE_TERMIOS |
456 | 208 |
209 /* It is possible to receive SIGCHLD when there are no children | |
210 waiting, because a previous waitsys(2) cleaned up the carcass of child | |
211 without clearing the SIGCHLD pending info. So, use a non-blocking | |
212 wait3 instead, which maps to waitpid(2) in SysVr4. */ | |
213 | |
214 #define wait3(status, options, rusage) \ | |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
215 waitpid ((pid_t) -1, (status), (options)) |
456 | 216 #define WRETCODE(w) (w >> 8) |
217 | |
218 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY | |
219 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and | |
220 this is all we need. */ | |
221 | |
222 #define TIOCSIGSEND TIOCSIGNAL | |
223 | |
224 /* This change means that we don't loop through allocate_pty too many | |
225 times in the (rare) event of a failure. */ | |
226 | |
227 #define FIRST_PTY_LETTER 'z' | |
228 | |
229 /* This sets the name of the master side of the PTY. */ | |
230 | |
231 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | |
232 | |
233 /* This sets the name of the slave side of the PTY. On SysVr4, | |
234 grantpt(3) forks a subprocess, so keep sigchld_handler() from | |
235 intercepting that death. If any child but grantpt's should die | |
236 within, it should be caught after sigrelse(2). */ | |
237 | |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
238 #define PTY_TTY_NAME_SPRINTF \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
239 { \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
240 char *ptsname (), *ptyname; \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
241 \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
242 sighold (SIGCLD); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
243 if (grantpt (fd) == -1) \ |
26090 | 244 { emacs_close (fd); return -1; } \ |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
245 sigrelse (SIGCLD); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
246 if (unlockpt (fd) == -1) \ |
26090 | 247 { emacs_close (fd); return -1; } \ |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
248 if (!(ptyname = ptsname (fd))) \ |
26090 | 249 { emacs_close (fd); return -1; } \ |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
250 strncpy (pty_name, ptyname, sizeof (pty_name)); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
251 pty_name[sizeof (pty_name) - 1] = 0; \ |
456 | 252 } |
253 | |
254 /* Push various streams modules onto a PTY channel. */ | |
255 | |
256 #define SETUP_SLAVE_PTY \ | |
257 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ | |
258 fatal ("ioctl I_PUSH ptem", errno); \ | |
259 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | |
260 fatal ("ioctl I_PUSH ldterm", errno); \ | |
261 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \ | |
262 fatal ("ioctl I_PUSH ttcompat", errno); | |
263 | |
1039 | 264 /* This definition was suggested for next release. |
265 So give it a try. */ | |
266 #define HAVE_SOCKETS | |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
267 |
26678
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
268 /* Markus Weiand <weiand@khof.com> says this is needed for Motif on |
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
269 SINIX. */ |
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
270 #define LIBS_SYSTEM -lgen |
52401 | 271 |
272 /* arch-tag: 1a0ed909-5faa-434b-b7c3-9d86c63d53a6 | |
273 (do not change this comment) */ |