Mercurial > emacs
annotate src/s/usg5-4.h @ 11284:0340dba1df7e
(prepare_menu_bars): Do the frame titles last.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 08 Apr 1995 00:19:28 +0000 |
parents | 191acacfa1ec |
children | 643f19925cb7 |
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 | |
7947
9dd69a1f4592
(GETTIMEOFDAY_ONE_ARGUMENT): Define it.
Richard M. Stallman <rms@gnu.org>
parents:
5919
diff
changeset
|
31 /* On most SVR4 systems, gettimeofday takes one arg |
9dd69a1f4592
(GETTIMEOFDAY_ONE_ARGUMENT): Define it.
Richard M. Stallman <rms@gnu.org>
parents:
5919
diff
changeset
|
32 and the compiler might crash. */ |
9dd69a1f4592
(GETTIMEOFDAY_ONE_ARGUMENT): Define it.
Richard M. Stallman <rms@gnu.org>
parents:
5919
diff
changeset
|
33 #define GETTIMEOFDAY_ONE_ARGUMENT |
9dd69a1f4592
(GETTIMEOFDAY_ONE_ARGUMENT): Define it.
Richard M. Stallman <rms@gnu.org>
parents:
5919
diff
changeset
|
34 |
456 | 35 /* We do have multiple jobs. Handle ^Z. */ |
36 | |
37 #undef NOMULTIPLEJOBS | |
38 | |
1179 | 39 #define LIBS_SYSTEM -lsocket -lnsl -lelf |
40 #define ORDINARY_LINK | |
456 | 41 |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
42 #if 0 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
43 #ifdef ORDINARY_LINK |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
44 #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
|
45 #else |
1179 | 46 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o |
47 #define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o | |
48 #endif | |
4336
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 |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
51 #ifdef ORDINARY_LINK |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
52 #define LIB_STANDARD |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
53 #else |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
54 #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
|
55 #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
|
56 #endif |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
57 #endif |
456 | 58 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
59 /* 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
|
60 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
61 #define LIBS_DEBUG |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
62 #define LIBS_STANDARD -lc |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
63 |
1039 | 64 /* No <sioctl.h> */ |
456 | 65 |
1039 | 66 #define NO_SIOCTL_H |
456 | 67 |
68 /* Undump with ELF */ | |
69 | |
70 #undef COFF | |
71 | |
72 #define UNEXEC unexelf.o | |
73 | |
8300
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
74 /* <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
|
75 * 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
|
76 */ |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
77 |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
78 #undef static |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
79 |
456 | 80 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct |
81 * tchars. But get <termio.h> first to make sure ttold.h doesn't | |
82 * interfere. And don't try to use SIGIO yet. | |
83 */ | |
84 | |
85 #ifdef emacs | |
86 #include <sys/filio.h> | |
87 #include <termio.h> | |
88 #include <sys/ttold.h> | |
89 #include <signal.h> | |
1039 | 90 #include <sys/wait.h> |
91 #include <sys/stream.h> | |
92 #include <sys/stropts.h> | |
93 #include <sys/termios.h> | |
456 | 94 #undef SIGIO |
95 #endif | |
96 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
97 /* 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
|
98 * 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
|
99 * 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
|
100 */ |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
101 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
102 #ifndef NSIG |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
103 #define NSIG 32 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
104 #endif |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
105 |
456 | 106 /* We need bss_end from emacs.c for undumping */ |
107 | |
108 #ifndef USG_SHARED_LIBRARIES | |
109 #define USG_SHARED_LIBRARIES | |
110 #endif | |
111 | |
112 /* We can support this */ | |
113 | |
114 #define CLASH_DETECTION | |
115 | |
116 #define HAVE_PTYS | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
117 #define HAVE_TERMIOS |
4295
04801cc935e6
(BROKEN_TIOCGETC, BROKEN_TIOCGWINSZ): Add #undefs.
Richard M. Stallman <rms@gnu.org>
parents:
3824
diff
changeset
|
118 #undef BROKEN_TIOCGWINSZ |
04801cc935e6
(BROKEN_TIOCGETC, BROKEN_TIOCGWINSZ): Add #undefs.
Richard M. Stallman <rms@gnu.org>
parents:
3824
diff
changeset
|
119 #undef BROKEN_TIOCGETC |
456 | 120 |
121 /* It is possible to receive SIGCHLD when there are no children | |
122 waiting, because a previous waitsys(2) cleaned up the carcass of child | |
123 without clearing the SIGCHLD pending info. So, use a non-blocking | |
124 wait3 instead, which maps to waitpid(2) in SysVr4. */ | |
125 | |
126 #define HAVE_WAIT_HEADER | |
127 #define WAITTYPE int | |
128 #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
|
129 waitpid ((pid_t) -1, (status), (options)) |
456 | 130 #define WRETCODE(w) (w >> 8) |
131 | |
132 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY | |
133 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and | |
134 this is all we need. */ | |
135 | |
136 #define TIOCSIGSEND TIOCSIGNAL | |
137 | |
138 /* This change means that we don't loop through allocate_pty too many | |
139 times in the (rare) event of a failure. */ | |
140 | |
141 #undef FIRST_PTY_LETTER | |
142 #define FIRST_PTY_LETTER 'z' | |
143 | |
144 /* This sets the name of the master side of the PTY. */ | |
145 | |
146 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | |
147 | |
148 /* This sets the name of the slave side of the PTY. On SysVr4, | |
149 grantpt(3) forks a subprocess, so keep sigchld_handler() from | |
150 intercepting that death. If any child but grantpt's should die | |
151 within, it should be caught after sigrelse(2). */ | |
152 | |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
153 #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
|
154 { \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
155 char *ptsname (), *ptyname; \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
156 \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
157 sighold (SIGCLD); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
158 if (grantpt (fd) == -1) \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
159 { close (fd); return -1; } \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
160 sigrelse (SIGCLD); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
161 if (unlockpt (fd) == -1) \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
162 { close (fd); return -1; } \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
163 if (!(ptyname = ptsname (fd))) \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
164 { close (fd); return -1; } \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
165 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
|
166 pty_name[sizeof (pty_name) - 1] = 0; \ |
456 | 167 } |
168 | |
169 /* Push various streams modules onto a PTY channel. */ | |
170 | |
171 #define SETUP_SLAVE_PTY \ | |
172 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ | |
173 fatal ("ioctl I_PUSH ptem", errno); \ | |
174 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | |
175 fatal ("ioctl I_PUSH ldterm", errno); \ | |
176 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \ | |
177 fatal ("ioctl I_PUSH ttcompat", errno); | |
178 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
179 /* 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
|
180 #undef LIB_X11_LIB |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
181 |
1039 | 182 /* The definition of this in s-usg5-3.h is not needed in 5.4. */ |
183 /* liblnsl_s should never be used. The _s suffix implies a shared | |
184 library, as opposed to a DLL. Share libraries were used in SVR3, and are | |
185 available only in order to allow SVR3 binaries to run. They should not be | |
186 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */ | |
187 #undef LIBX10_SYSTEM | |
188 #undef LIBX11_SYSTEM | |
456 | 189 |
1039 | 190 /* Tell x11term.c and keyboard.c we have the system V streams feature. */ |
191 #define SYSV_STREAMS | |
192 | |
193 /* This definition was suggested for next release. | |
194 So give it a try. */ | |
195 #define HAVE_SOCKETS | |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
196 |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
197 #define bcopy(src,dst,n) memmove (dst,src,n) |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
198 #define bcmp(src,dst,n) memcmp (src,dst,n) |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
199 #define bzero(s,n) memset (s,0,n) |