Mercurial > emacs
annotate src/s/usg5-4.h @ 2116:76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
If we're doing ordinary linking, define LIB_STANDARD appropriately.
Give LIBS_DEBUG a null definition; usg5-4 has no -lg.
#define LIBS_STANDARD as "-lc"; usg5-4 has no -lPW.
#define NSIG, if it's not already defined.
#define HAVE_TERMIOS instead of HAVE_TCATTR.
Provide our own definition of LIB_X11_LIB.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Thu, 11 Mar 1993 07:11:06 +0000 |
parents | f84d4b4b53da |
children | c84b2198f633 |
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 | |
8 the Free Software Foundation; either version 1, or (at your option) | |
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 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
38 #ifdef ORDINARY_LINK |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
39 #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
|
40 #else |
1179 | 41 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o |
42 #define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o | |
43 #endif | |
456 | 44 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
45 /* 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
|
46 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
47 #define LIBS_DEBUG |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
48 #define LIBS_STANDARD -lc |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
49 |
1039 | 50 /* No <sioctl.h> */ |
456 | 51 |
1039 | 52 #define NO_SIOCTL_H |
456 | 53 |
54 /* Undump with ELF */ | |
55 | |
56 #undef COFF | |
57 | |
58 #define UNEXEC unexelf.o | |
59 | |
60 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct | |
61 * tchars. But get <termio.h> first to make sure ttold.h doesn't | |
62 * interfere. And don't try to use SIGIO yet. | |
63 */ | |
64 | |
65 #ifdef emacs | |
66 #include <sys/filio.h> | |
67 #include <termio.h> | |
68 #include <sys/ttold.h> | |
69 #include <signal.h> | |
1039 | 70 #include <sys/wait.h> |
71 #include <sys/stream.h> | |
72 #include <sys/stropts.h> | |
73 #include <sys/termios.h> | |
456 | 74 #undef SIGIO |
75 #endif | |
76 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
77 /* 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
|
78 * 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
|
79 * 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
|
80 */ |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
81 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
82 #ifndef NSIG |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
83 #define NSIG 32 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
84 #endif |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
85 |
1039 | 86 /* libc has this stuff, but not utimes. */ |
456 | 87 |
88 #define HAVE_RENAME | |
89 #define HAVE_SELECT | |
90 #define HAVE_TIMEVAL | |
91 #define HAVE_CLOSEDIR | |
92 #define HAVE_GETTIMEOFDAY | |
93 #define HAVE_DUP2 | |
94 | |
95 /* <sys/stat.h> *defines* stat(2) as a static function. If "static" | |
96 * is blank, then many files will have a public definition for stat(2). | |
97 */ | |
98 | |
99 #undef static | |
100 | |
101 /* We need bss_end from emacs.c for undumping */ | |
102 | |
103 #ifndef USG_SHARED_LIBRARIES | |
104 #define USG_SHARED_LIBRARIES | |
105 #endif | |
106 | |
107 /* We can support this */ | |
108 | |
109 #define CLASH_DETECTION | |
110 | |
111 #define HAVE_PTYS | |
112 #define HAVE_SETSID | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
113 #define HAVE_TERMIOS |
456 | 114 |
115 /* It is possible to receive SIGCHLD when there are no children | |
116 waiting, because a previous waitsys(2) cleaned up the carcass of child | |
117 without clearing the SIGCHLD pending info. So, use a non-blocking | |
118 wait3 instead, which maps to waitpid(2) in SysVr4. */ | |
119 | |
120 #define HAVE_WAIT_HEADER | |
121 #define WAITTYPE int | |
122 #define wait3(status, options, rusage) \ | |
123 waitpid((pid_t) -1, (status), (options)) | |
124 #define WRETCODE(w) (w >> 8) | |
125 | |
126 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY | |
127 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and | |
128 this is all we need. */ | |
129 | |
130 #define TIOCSIGSEND TIOCSIGNAL | |
131 | |
132 /* This change means that we don't loop through allocate_pty too many | |
133 times in the (rare) event of a failure. */ | |
134 | |
135 #undef FIRST_PTY_LETTER | |
136 #define FIRST_PTY_LETTER 'z' | |
137 | |
138 /* This sets the name of the master side of the PTY. */ | |
139 | |
140 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | |
141 | |
142 /* This sets the name of the slave side of the PTY. On SysVr4, | |
143 grantpt(3) forks a subprocess, so keep sigchld_handler() from | |
144 intercepting that death. If any child but grantpt's should die | |
145 within, it should be caught after sigrelse(2). */ | |
146 | |
147 #define PTY_TTY_NAME_SPRINTF \ | |
148 { \ | |
149 char *ptsname(), *ptyname; \ | |
150 \ | |
151 sighold(SIGCLD); \ | |
152 if (grantpt(fd) == -1) \ | |
153 fatal("could not grant slave pty"); \ | |
154 sigrelse(SIGCLD); \ | |
155 if (unlockpt(fd) == -1) \ | |
156 fatal("could not unlock slave pty"); \ | |
157 if (!(ptyname = ptsname(fd))) \ | |
158 fatal ("could not enable slave pty"); \ | |
159 strncpy(pty_name, ptyname, sizeof(pty_name)); \ | |
160 pty_name[sizeof(pty_name) - 1] = 0; \ | |
161 } | |
162 | |
163 /* Push various streams modules onto a PTY channel. */ | |
164 | |
165 #define SETUP_SLAVE_PTY \ | |
166 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ | |
167 fatal ("ioctl I_PUSH ptem", errno); \ | |
168 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | |
169 fatal ("ioctl I_PUSH ldterm", errno); \ | |
170 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \ | |
171 fatal ("ioctl I_PUSH ttcompat", errno); | |
172 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
173 /* Undo the SVr3 X11 library definition */ |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
174 #undef LIB_X11_LIB -lX11 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
175 |
1039 | 176 /* The definition of this in s-usg5-3.h is not needed in 5.4. */ |
177 /* liblnsl_s should never be used. The _s suffix implies a shared | |
178 library, as opposed to a DLL. Share libraries were used in SVR3, and are | |
179 available only in order to allow SVR3 binaries to run. They should not be | |
180 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */ | |
181 #undef LIBX10_SYSTEM | |
182 #undef LIBX11_SYSTEM | |
456 | 183 |
1039 | 184 /* Tell x11term.c and keyboard.c we have the system V streams feature. */ |
185 #define SYSV_STREAMS | |
186 | |
187 /* This definition was suggested for next release. | |
188 So give it a try. */ | |
189 #define HAVE_SOCKETS |