Mercurial > emacs
annotate src/s/usg5-4.h @ 5529:708b422cf8df
(report_file_error): Use strerror instead of sys_errlist.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Sat, 08 Jan 1994 22:55:04 +0000 |
parents | 70983b24cc69 |
children | 50216826c507 |
rev | line source |
---|---|
456 | 1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4 |
1039 | 2 Copyright (C) 1987, 1990 Free Software Foundation, Inc. |
456 | 3 |
4 This file is part of GNU Emacs. | |
5 | |
1039 | 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 | |
3699 | 8 the Free Software Foundation; either version 2, or (at your option) |
1039 | 9 any later version. |
456 | 10 |
1039 | 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. | |
15 | |
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. */ | |
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 | |
1868
f84d4b4b53da
* s/usg5-4.h: #include "usg5-3.h", not "s-usg5-3.h".
Jim Blandy <jimb@redhat.com>
parents:
1179
diff
changeset
|
27 #include "usg5-3.h" |
456 | 28 |
29 #define USG5_4 | |
30 | |
31 /* We do have multiple jobs. Handle ^Z. */ | |
32 | |
33 #undef NOMULTIPLEJOBS | |
34 | |
1179 | 35 #define LIBS_SYSTEM -lsocket -lnsl -lelf |
36 #define ORDINARY_LINK | |
456 | 37 |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
38 #if 0 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
39 #ifdef ORDINARY_LINK |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
40 #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
|
41 #else |
1179 | 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 | |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
45 #else |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
46 |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
47 #ifdef ORDINARY_LINK |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
48 #define LIB_STANDARD |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
49 #else |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
50 #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
|
51 #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
|
52 #endif |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
53 #endif |
456 | 54 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
55 /* 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
|
56 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
57 #define LIBS_DEBUG |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
58 #define LIBS_STANDARD -lc |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
59 |
1039 | 60 /* No <sioctl.h> */ |
456 | 61 |
1039 | 62 #define NO_SIOCTL_H |
456 | 63 |
64 /* Undump with ELF */ | |
65 | |
66 #undef COFF | |
67 | |
68 #define UNEXEC unexelf.o | |
69 | |
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. | |
73 */ | |
74 | |
75 #ifdef emacs | |
76 #include <sys/filio.h> | |
77 #include <termio.h> | |
78 #include <sys/ttold.h> | |
79 #include <signal.h> | |
1039 | 80 #include <sys/wait.h> |
81 #include <sys/stream.h> | |
82 #include <sys/stropts.h> | |
83 #include <sys/termios.h> | |
456 | 84 #undef SIGIO |
85 #endif | |
86 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
87 /* 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
|
88 * 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
|
89 * 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
|
90 */ |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
91 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
92 #ifndef NSIG |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
93 #define NSIG 32 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
94 #endif |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
95 |
1039 | 96 /* libc has this stuff, but not utimes. */ |
456 | 97 |
98 #define HAVE_SELECT | |
99 #define HAVE_TIMEVAL | |
100 | |
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). | |
103 */ | |
104 | |
105 #undef static | |
106 | |
107 /* We need bss_end from emacs.c for undumping */ | |
108 | |
109 #ifndef USG_SHARED_LIBRARIES | |
110 #define USG_SHARED_LIBRARIES | |
111 #endif | |
112 | |
113 /* We can support this */ | |
114 | |
115 #define CLASH_DETECTION | |
116 | |
117 #define HAVE_PTYS | |
118 #define HAVE_SETSID | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
119 #define HAVE_TERMIOS |
4295
04801cc935e6
(BROKEN_TIOCGETC, BROKEN_TIOCGWINSZ): Add #undefs.
Richard M. Stallman <rms@gnu.org>
parents:
3824
diff
changeset
|
120 #undef BROKEN_TIOCGWINSZ |
04801cc935e6
(BROKEN_TIOCGETC, BROKEN_TIOCGWINSZ): Add #undefs.
Richard M. Stallman <rms@gnu.org>
parents:
3824
diff
changeset
|
121 #undef BROKEN_TIOCGETC |
456 | 122 |
123 /* It is possible to receive SIGCHLD when there are no children | |
124 waiting, because a previous waitsys(2) cleaned up the carcass of child | |
125 without clearing the SIGCHLD pending info. So, use a non-blocking | |
126 wait3 instead, which maps to waitpid(2) in SysVr4. */ | |
127 | |
128 #define HAVE_WAIT_HEADER | |
129 #define WAITTYPE int | |
130 #define wait3(status, options, rusage) \ | |
131 waitpid((pid_t) -1, (status), (options)) | |
132 #define WRETCODE(w) (w >> 8) | |
133 | |
134 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY | |
135 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and | |
136 this is all we need. */ | |
137 | |
138 #define TIOCSIGSEND TIOCSIGNAL | |
139 | |
140 /* This change means that we don't loop through allocate_pty too many | |
141 times in the (rare) event of a failure. */ | |
142 | |
143 #undef FIRST_PTY_LETTER | |
144 #define FIRST_PTY_LETTER 'z' | |
145 | |
146 /* This sets the name of the master side of the PTY. */ | |
147 | |
148 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | |
149 | |
150 /* This sets the name of the slave side of the PTY. On SysVr4, | |
151 grantpt(3) forks a subprocess, so keep sigchld_handler() from | |
152 intercepting that death. If any child but grantpt's should die | |
153 within, it should be caught after sigrelse(2). */ | |
154 | |
155 #define PTY_TTY_NAME_SPRINTF \ | |
156 { \ | |
157 char *ptsname(), *ptyname; \ | |
158 \ | |
159 sighold(SIGCLD); \ | |
160 if (grantpt(fd) == -1) \ | |
161 fatal("could not grant slave pty"); \ | |
162 sigrelse(SIGCLD); \ | |
163 if (unlockpt(fd) == -1) \ | |
164 fatal("could not unlock slave pty"); \ | |
165 if (!(ptyname = ptsname(fd))) \ | |
166 fatal ("could not enable slave pty"); \ | |
167 strncpy(pty_name, ptyname, sizeof(pty_name)); \ | |
168 pty_name[sizeof(pty_name) - 1] = 0; \ | |
169 } | |
170 | |
171 /* Push various streams modules onto a PTY channel. */ | |
172 | |
173 #define SETUP_SLAVE_PTY \ | |
174 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ | |
175 fatal ("ioctl I_PUSH ptem", errno); \ | |
176 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | |
177 fatal ("ioctl I_PUSH ldterm", errno); \ | |
178 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \ | |
179 fatal ("ioctl I_PUSH ttcompat", errno); | |
180 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
181 /* 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
|
182 #undef LIB_X11_LIB |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
183 |
1039 | 184 /* The definition of this in s-usg5-3.h is not needed in 5.4. */ |
185 /* liblnsl_s should never be used. The _s suffix implies a shared | |
186 library, as opposed to a DLL. Share libraries were used in SVR3, and are | |
187 available only in order to allow SVR3 binaries to run. They should not be | |
188 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */ | |
189 #undef LIBX10_SYSTEM | |
190 #undef LIBX11_SYSTEM | |
456 | 191 |
1039 | 192 /* Tell x11term.c and keyboard.c we have the system V streams feature. */ |
193 #define SYSV_STREAMS | |
194 | |
195 /* This definition was suggested for next release. | |
196 So give it a try. */ | |
197 #define HAVE_SOCKETS | |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
198 |
5356
70983b24cc69
(bcopy) Use memmove instead of memcpy.
Richard M. Stallman <rms@gnu.org>
parents:
4336
diff
changeset
|
199 #define bcopy(src,dst,n) memmove(dst,src,n) |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
200 #define bcmp(src,dst,n) memcmp(src,dst,n) |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
201 #define bzero(s,n) memset(s,0,n) |