Mercurial > emacs
annotate src/s/usg5-4.h @ 96833:c06568fd3844
* s/usg5-4.h (LIBS_SYSTEM): Remove, system for which this was
added not supported anymore.
* s/usg5-4-2.h (LIBS_SYSTEM):
* s/sol2.h (LIBS_SYSTEM): Do not undefine.
* s/netbsd.h (GETPGRP_NO_ARG, N_TRELOFF):
* s/lynxos.h (GETPGRP_NO_ARG):
* s/hpux10-20.h (NO_SIOCTL_H):
* s/gnu.h (GETPGRP_NO_ARG):
* s/gnu-linux.h (NO_SIOCTL_H):
* s/freebsd.h (GETPGRP_NO_ARG, N_TRELOFF):
* s/cygwin.h (GETPGRP_NO_ARG):
* s/irix6-5.h (LIBS_SYSTEM, GETPGRP_NO_ARG): Remove, unused.
(C_DEBUG_SWITCH): Remove duplicate definition.
* m/ibms390.h: Remove boilerplate comments.
* sysdep.c (closedir): Use SOLARIS2 instead of sun && USG5_4.
* process.c (HAVE_SERIAL): Consolidate ifdefs.
(wait_reading_process_output): Remove code for SunOS, platform not
supported anymore. Use SOLARIS2 instead of sun.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sun, 20 Jul 2008 13:03:56 +0000 |
parents | a5dd283d15b2 |
children | d89afa2b4c2f |
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 /* | |
38 * Define HAVE_TERMIO if the system provides sysV-style ioctls | |
39 * for terminal control. | |
40 */ | |
41 | |
42 #define HAVE_TERMIO | |
456 | 43 |
96303 | 44 /* |
45 * Define HAVE_PTYS if the system supports pty devices. | |
46 */ | |
47 | |
48 /* | |
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 | |
52 */ | |
53 #define SYSV_SYSTEM_DIR | |
54 | |
55 /* subprocesses should be defined if you want to | |
56 have code for asynchronous subprocesses | |
57 (as used in M-x compile and M-x shell). | |
58 This is supposed to work now on system V release 2. */ | |
59 | |
60 #define subprocesses | |
61 | |
62 /* The file containing the kernel's symbol table is called /unix. */ | |
63 | |
64 #define KERNEL_FILE "/unix" | |
65 | |
66 /* The symbol in the kernel where the load average is found | |
67 is named avenrun. */ | |
68 | |
69 #define LDAV_SYMBOL "avenrun" | |
70 | |
71 /* Special hacks needed to make Emacs run on this system. */ | |
72 | |
73 /* | |
74 * Make the sigsetmask function go away. Don't know what the | |
75 * ramifications of this are, but doesn't seem possible to | |
76 * emulate it properly anyway at this point. | |
77 */ | |
78 | |
79 #define sigsetmask(mask) /* Null expansion */ | |
80 | |
81 /* setjmp and longjmp can safely replace _setjmp and _longjmp, | |
82 but they will run slower. */ | |
83 | |
84 #define _setjmp setjmp | |
85 #define _longjmp longjmp | |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
86 |
96303 | 87 /* On USG systems these have different names */ |
88 #ifndef HAVE_INDEX | |
89 #define index strchr | |
90 #endif /* ! defined (HAVE_INDEX) */ | |
91 #ifndef HAVE_RINDEX | |
92 #define rindex strrchr | |
93 #endif /* ! defined (HAVE_RINDEX) */ | |
94 | |
95 /* Compiler bug bites on many systems when default ADDR_CORRECT is used. */ | |
96 | |
97 #define ADDR_CORRECT(x) (x) | |
98 | |
99 /* Use terminfo instead of termcap. */ | |
100 | |
101 #define TERMINFO | |
102 | |
103 | |
104 /* The docs for system V/386 suggest v.3 has sigpause, | |
105 so let's give it a try. */ | |
106 #define HAVE_SYSV_SIGPAUSE | |
107 | |
108 | |
109 /* If we're using the System V X port, BSD bstring functions will be handy */ | |
110 | |
111 #ifdef HAVE_X_WINDOWS | |
112 #define BSTRING | |
113 #endif /* HAVE_X_WINDOWS */ | |
114 | |
115 /* On USG systems signal handlers return void */ | |
116 | |
117 #define SIGTYPE void | |
118 | |
96378
1163f7459d65
Fix previous change: keep the correct branch of a
Dan Nicolaescu <dann@ics.uci.edu>
parents:
96303
diff
changeset
|
119 #define ORDINARY_LINK |
1163f7459d65
Fix previous change: keep the correct branch of a
Dan Nicolaescu <dann@ics.uci.edu>
parents:
96303
diff
changeset
|
120 |
1163f7459d65
Fix previous change: keep the correct branch of a
Dan Nicolaescu <dann@ics.uci.edu>
parents:
96303
diff
changeset
|
121 #define LIB_STANDARD |
456 | 122 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
123 /* 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
|
124 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
125 #define LIBS_DEBUG |
456 | 126 |
127 /* Undump with ELF */ | |
128 | |
129 #undef COFF | |
130 | |
131 #define UNEXEC unexelf.o | |
132 | |
133 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct | |
134 * tchars. But get <termio.h> first to make sure ttold.h doesn't | |
135 * interfere. And don't try to use SIGIO yet. | |
136 */ | |
137 | |
13466
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
138 #ifndef NOT_C_CODE |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
139 #include <sys/wait.h> |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
140 #endif |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
141 |
456 | 142 #ifdef emacs |
143 #include <sys/filio.h> | |
144 #include <termio.h> | |
145 #include <sys/ttold.h> | |
146 #include <signal.h> | |
1039 | 147 #include <sys/stream.h> |
148 #include <sys/stropts.h> | |
149 #include <sys/termios.h> | |
26090 | 150 #define BROKEN_SIGIO |
456 | 151 #endif |
152 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
153 /* 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
|
154 * 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
|
155 * 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
|
156 */ |
26090 | 157 #define NSIG_MINIMUM 32 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
158 |
456 | 159 /* We can support this */ |
160 | |
161 #define CLASH_DETECTION | |
162 | |
163 #define HAVE_PTYS | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
164 #define HAVE_TERMIOS |
456 | 165 |
166 /* It is possible to receive SIGCHLD when there are no children | |
167 waiting, because a previous waitsys(2) cleaned up the carcass of child | |
168 without clearing the SIGCHLD pending info. So, use a non-blocking | |
169 wait3 instead, which maps to waitpid(2) in SysVr4. */ | |
170 | |
171 #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
|
172 waitpid ((pid_t) -1, (status), (options)) |
456 | 173 #define WRETCODE(w) (w >> 8) |
174 | |
175 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY | |
176 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and | |
177 this is all we need. */ | |
178 | |
179 #define TIOCSIGSEND TIOCSIGNAL | |
180 | |
181 /* This change means that we don't loop through allocate_pty too many | |
182 times in the (rare) event of a failure. */ | |
183 | |
184 #define FIRST_PTY_LETTER 'z' | |
185 | |
186 /* This sets the name of the master side of the PTY. */ | |
187 | |
188 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | |
189 | |
190 /* This sets the name of the slave side of the PTY. On SysVr4, | |
191 grantpt(3) forks a subprocess, so keep sigchld_handler() from | |
192 intercepting that death. If any child but grantpt's should die | |
193 within, it should be caught after sigrelse(2). */ | |
194 | |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
195 #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
|
196 { \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
197 char *ptsname (), *ptyname; \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
198 \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
199 sighold (SIGCLD); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
200 if (grantpt (fd) == -1) \ |
26090 | 201 { 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
|
202 sigrelse (SIGCLD); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
203 if (unlockpt (fd) == -1) \ |
26090 | 204 { 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
|
205 if (!(ptyname = ptsname (fd))) \ |
26090 | 206 { 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
|
207 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
|
208 pty_name[sizeof (pty_name) - 1] = 0; \ |
456 | 209 } |
210 | |
211 /* Push various streams modules onto a PTY channel. */ | |
212 | |
213 #define SETUP_SLAVE_PTY \ | |
214 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ | |
215 fatal ("ioctl I_PUSH ptem", errno); \ | |
216 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | |
217 fatal ("ioctl I_PUSH ldterm", errno); \ | |
218 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \ | |
219 fatal ("ioctl I_PUSH ttcompat", errno); | |
220 | |
1039 | 221 /* This definition was suggested for next release. |
222 So give it a try. */ | |
223 #define HAVE_SOCKETS | |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
224 |
52401 | 225 /* arch-tag: 1a0ed909-5faa-434b-b7c3-9d86c63d53a6 |
226 (do not change this comment) */ |