Mercurial > emacs
annotate src/s/usg5-4.h @ 83871:dd89a6da6c91
*** empty log message ***
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Mon, 03 Sep 2007 19:28:23 +0000 |
parents | f06998349cfc |
children | 68df465b9550 345d3b46b5d3 f55f9811f5d7 |
rev | line source |
---|---|
456 | 1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4 |
75227
e90d04cd455a
Update copyright for years from Emacs 21 to present (mainly adding
Glenn Morris <rgm@gnu.org>
parents:
68651
diff
changeset
|
2 Copyright (C) 1987, 1990, 1999, 2000, 2001, 2002, 2003, 2004, |
e90d04cd455a
Update copyright for years from Emacs 21 to present (mainly adding
Glenn Morris <rgm@gnu.org>
parents:
68651
diff
changeset
|
3 2005, 2006, 2007 Free Software Foundation, Inc. |
456 | 4 |
5 This file is part of GNU Emacs. | |
6 | |
1039 | 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 | |
78259
f06998349cfc
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
75227
diff
changeset
|
9 the Free Software Foundation; either version 3, or (at your option) |
1039 | 10 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 | |
18 along with GNU Emacs; see the file COPYING. If not, write to | |
64083 | 19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 Boston, MA 02110-1301, USA. */ | |
456 | 21 |
22 /* 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
|
23 * 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
|
24 * S. Raymond <esr@snark.thyrsus.com>. |
456 | 25 */ |
26 | |
27 /* Use the SysVr3 file for at least base configuration. */ | |
28 | |
1868
f84d4b4b53da
* s/usg5-4.h: #include "usg5-3.h", not "s-usg5-3.h".
Jim Blandy <jimb@redhat.com>
parents:
1179
diff
changeset
|
29 #include "usg5-3.h" |
456 | 30 |
31 #define USG5_4 | |
32 | |
33 /* We do have multiple jobs. Handle ^Z. */ | |
34 | |
35 #undef NOMULTIPLEJOBS | |
36 | |
26678
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
37 /* Motif needs -lgen. */ |
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
38 #define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen |
1179 | 39 #define ORDINARY_LINK |
456 | 40 |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
41 #if 0 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
42 #ifdef ORDINARY_LINK |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
43 #define LIB_STANDARD -lc /usr/ucblib/libucb.a |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
44 #else |
1179 | 45 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o |
46 #define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o | |
47 #endif | |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
48 #else |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
49 |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
50 #ifdef ORDINARY_LINK |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
51 #define LIB_STANDARD |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
52 #else |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
53 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
54 #define LIB_STANDARD -lc /usr/ccs/lib/crtn.o |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
55 #endif |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
56 #endif |
456 | 57 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
58 /* 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
|
59 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
60 #define LIBS_DEBUG |
456 | 61 |
62 /* Undump with ELF */ | |
63 | |
64 #undef COFF | |
65 | |
66 #define UNEXEC unexelf.o | |
67 | |
8300
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
68 /* <sys/stat.h> *defines* stat(2) as a static function. If "static" |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
69 * is blank, then many files will have a public definition for stat(2). |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
70 */ |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
71 |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
72 #undef static |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
73 |
456 | 74 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct |
75 * tchars. But get <termio.h> first to make sure ttold.h doesn't | |
76 * interfere. And don't try to use SIGIO yet. | |
77 */ | |
78 | |
13466
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
79 #ifndef NOT_C_CODE |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
80 #include <sys/wait.h> |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
81 #endif |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
82 |
456 | 83 #ifdef emacs |
15844
090728aee80a
Don't include filio.h if NO_FILIO_H.
Richard M. Stallman <rms@gnu.org>
parents:
14186
diff
changeset
|
84 #ifndef NO_FILIO_H |
456 | 85 #include <sys/filio.h> |
15844
090728aee80a
Don't include filio.h if NO_FILIO_H.
Richard M. Stallman <rms@gnu.org>
parents:
14186
diff
changeset
|
86 #endif |
456 | 87 #include <termio.h> |
88 #include <sys/ttold.h> | |
89 #include <signal.h> | |
1039 | 90 #include <sys/stream.h> |
91 #include <sys/stropts.h> | |
92 #include <sys/termios.h> | |
26090 | 93 #define BROKEN_SIGIO |
456 | 94 #endif |
95 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
96 /* 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
|
97 * 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
|
98 * 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
|
99 */ |
26090 | 100 #define NSIG_MINIMUM 32 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
101 |
456 | 102 /* We need bss_end from emacs.c for undumping */ |
103 | |
104 #ifndef USG_SHARED_LIBRARIES | |
105 #define USG_SHARED_LIBRARIES | |
106 #endif | |
107 | |
108 /* We can support this */ | |
109 | |
110 #define CLASH_DETECTION | |
111 | |
112 #define HAVE_PTYS | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
113 #define HAVE_TERMIOS |
4295
04801cc935e6
(BROKEN_TIOCGETC, BROKEN_TIOCGWINSZ): Add #undefs.
Richard M. Stallman <rms@gnu.org>
parents:
3824
diff
changeset
|
114 #undef BROKEN_TIOCGWINSZ |
04801cc935e6
(BROKEN_TIOCGETC, BROKEN_TIOCGWINSZ): Add #undefs.
Richard M. Stallman <rms@gnu.org>
parents:
3824
diff
changeset
|
115 #undef BROKEN_TIOCGETC |
456 | 116 |
117 /* It is possible to receive SIGCHLD when there are no children | |
118 waiting, because a previous waitsys(2) cleaned up the carcass of child | |
119 without clearing the SIGCHLD pending info. So, use a non-blocking | |
120 wait3 instead, which maps to waitpid(2) in SysVr4. */ | |
121 | |
122 #define HAVE_WAIT_HEADER | |
123 #define WAITTYPE int | |
124 #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
|
125 waitpid ((pid_t) -1, (status), (options)) |
456 | 126 #define WRETCODE(w) (w >> 8) |
127 | |
128 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY | |
129 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and | |
130 this is all we need. */ | |
131 | |
132 #define TIOCSIGSEND TIOCSIGNAL | |
133 | |
134 /* This change means that we don't loop through allocate_pty too many | |
135 times in the (rare) event of a failure. */ | |
136 | |
137 #undef FIRST_PTY_LETTER | |
138 #define FIRST_PTY_LETTER 'z' | |
139 | |
140 /* This sets the name of the master side of the PTY. */ | |
141 | |
142 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | |
143 | |
144 /* This sets the name of the slave side of the PTY. On SysVr4, | |
145 grantpt(3) forks a subprocess, so keep sigchld_handler() from | |
146 intercepting that death. If any child but grantpt's should die | |
147 within, it should be caught after sigrelse(2). */ | |
148 | |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
149 #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
|
150 { \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
151 char *ptsname (), *ptyname; \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
152 \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
153 sighold (SIGCLD); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
154 if (grantpt (fd) == -1) \ |
26090 | 155 { 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
|
156 sigrelse (SIGCLD); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
157 if (unlockpt (fd) == -1) \ |
26090 | 158 { 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
|
159 if (!(ptyname = ptsname (fd))) \ |
26090 | 160 { 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
|
161 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
|
162 pty_name[sizeof (pty_name) - 1] = 0; \ |
456 | 163 } |
164 | |
165 /* Push various streams modules onto a PTY channel. */ | |
166 | |
167 #define SETUP_SLAVE_PTY \ | |
168 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ | |
169 fatal ("ioctl I_PUSH ptem", errno); \ | |
170 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | |
171 fatal ("ioctl I_PUSH ldterm", errno); \ | |
172 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \ | |
173 fatal ("ioctl I_PUSH ttcompat", errno); | |
174 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
175 /* Undo the SVr3 X11 library definition */ |
2165
c84b2198f633
* s/usg5-4.h: Remove extraneous text after #undef LIB_X11_LIB.
Jim Blandy <jimb@redhat.com>
parents:
2116
diff
changeset
|
176 #undef LIB_X11_LIB |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
177 |
1039 | 178 /* The definition of this in s-usg5-3.h is not needed in 5.4. */ |
179 /* liblnsl_s should never be used. The _s suffix implies a shared | |
180 library, as opposed to a DLL. Share libraries were used in SVR3, and are | |
181 available only in order to allow SVR3 binaries to run. They should not be | |
182 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */ | |
183 #undef LIBX10_SYSTEM | |
184 #undef LIBX11_SYSTEM | |
456 | 185 |
1039 | 186 /* Tell x11term.c and keyboard.c we have the system V streams feature. */ |
187 #define SYSV_STREAMS | |
188 | |
189 /* This definition was suggested for next release. | |
190 So give it a try. */ | |
191 #define HAVE_SOCKETS | |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
192 |
26678
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
193 /* 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
|
194 SINIX. */ |
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
195 #undef LIBS_SYSTEM |
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
196 #define LIBS_SYSTEM -lgen |
52401 | 197 |
198 /* arch-tag: 1a0ed909-5faa-434b-b7c3-9d86c63d53a6 | |
199 (do not change this comment) */ |