annotate src/s/usg5-4.h @ 96428:51371c50583a

Fix typo in comments.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 30 Jun 2008 02:12:47 +0000
parents 206c2cd0bbcc
children cb1bfa1dca4f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5 This file is part of GNU Emacs.
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
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
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11
1039
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
12 GNU Emacs is distributed in the hope that it will be useful,
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
15 GNU General Public License for more details.
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
16
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
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
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
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
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 /* Use the SysVr3 file for at least base configuration. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
27 #define USG /* System III, System V, etc */
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
29 #define USG5
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 #define USG5_4
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
32 /* SYSTEM_TYPE should indicate the kind of system you are using.
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
33 It sets the Lisp variable system-type. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
34
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
35 #define SYSTEM_TYPE "usg-unix-v"
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
36
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
37 /* Default is to set interrupt_input to 0: don't do input buffering within Emacs */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
38
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
39 /* #define INTERRUPT_INPUT */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
40
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
41 /*
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
42 * Define HAVE_TERMIO if the system provides sysV-style ioctls
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
43 * for terminal control.
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
44 */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
45
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
46 #define HAVE_TERMIO
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
48 /*
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
49 * Define HAVE_PTYS if the system supports pty devices.
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
50 */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
51
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
52 /* Some versions of V.3 have this, but not all.
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
53 #define HAVE_PTYS
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
54 #define SYSV_PTYS */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
55
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
56 /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
57
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
58 /* #define HAVE_SOCKETS */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
59
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
60 /*
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
61 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
62 * The 4.2 opendir, etc., library functions.
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
63 */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
64
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
65 /* #define NONSYSTEM_DIR_LIBRARY */
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
67 /*
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
68 * Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
69 * library functions. Almost, but not quite the same as
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
70 * the 4.2 functions
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
71 */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
72 #define SYSV_SYSTEM_DIR
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
73
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
74 /* Define this symbol if your system has the functions bcopy, etc. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
75
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
76 /* #define BSTRING */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
77
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
78 /* subprocesses should be defined if you want to
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
79 have code for asynchronous subprocesses
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
80 (as used in M-x compile and M-x shell).
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
81 This is supposed to work now on system V release 2. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
82
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
83 #define subprocesses
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
84
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
85 /* If your system uses COFF (Common Object File Format) then define the
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
86 preprocessor symbol "COFF". */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
87
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
88 #define COFF
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
89
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
90 /* define MAIL_USE_FLOCK if the mailer uses flock
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
91 to interlock access to /usr/spool/mail/$USER.
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
92 The alternative is that a lock file named
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
93 /usr/spool/mail/$USER.lock. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
94
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
95 /* #define MAIL_USE_FLOCK */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
96
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
97 /* Define CLASH_DETECTION if you want lock files to be written
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
98 so that Emacs can tell instantly when you try to modify
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
99 a file that someone else has modified in his Emacs. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
100
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
101 /* #define CLASH_DETECTION */
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
103 /* The file containing the kernel's symbol table is called /unix. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
104
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
105 #define KERNEL_FILE "/unix"
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
106
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
107 /* The symbol in the kernel where the load average is found
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
108 is named avenrun. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
109
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
110 #define LDAV_SYMBOL "avenrun"
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
111
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
112 /* Define this if system V IPC is available. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
113
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
114 #define HAVE_SYSVIPC
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
115
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
116 /* Special hacks needed to make Emacs run on this system. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
117
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
118 /*
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
119 * Make the sigsetmask function go away. Don't know what the
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
120 * ramifications of this are, but doesn't seem possible to
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
121 * emulate it properly anyway at this point.
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
122 */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
123
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
124 #define sigsetmask(mask) /* Null expansion */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
125
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
126 /* setjmp and longjmp can safely replace _setjmp and _longjmp,
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
127 but they will run slower. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
128
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
129 #define _setjmp setjmp
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
130 #define _longjmp longjmp
4336
96d3869ae231 (bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents: 4295
diff changeset
131
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
132 /* On USG systems these have different names */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
133 #ifndef HAVE_INDEX
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
134 #define index strchr
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
135 #endif /* ! defined (HAVE_INDEX) */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
136 #ifndef HAVE_RINDEX
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
137 #define rindex strrchr
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
138 #endif /* ! defined (HAVE_RINDEX) */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
139
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
140 /* USG systems tend to put everything declared static
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
141 into the initialized data area, which becomes pure after dumping Emacs.
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
142 Foil this. Emacs carefully avoids static vars inside functions. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
143
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
144 #define static
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
145
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
146 /* Compiler bug bites on many systems when default ADDR_CORRECT is used. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
147
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
148 #define ADDR_CORRECT(x) (x)
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
149
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
150 /* Use terminfo instead of termcap. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
151
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
152 #define TERMINFO
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
153
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
154
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
155 /* The docs for system V/386 suggest v.3 has sigpause,
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
156 so let's give it a try. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
157 #define HAVE_SYSV_SIGPAUSE
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
158
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
159
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
160 /* If we're using the System V X port, BSD bstring functions will be handy */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
161
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
162 #ifdef HAVE_X_WINDOWS
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
163 #define BSTRING
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
164 #endif /* HAVE_X_WINDOWS */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
165
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
166 /* Enable support for shared libraries in unexec. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
167
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
168 #define USG_SHARED_LIBRARIES
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
169
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
170 /* On USG systems signal handlers return void */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
171
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
172 #define SIGTYPE void
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
173
96378
1163f7459d65 Fix previous change: keep the correct branch of a
Dan Nicolaescu <dann@ics.uci.edu>
parents: 96303
diff changeset
174 #define ORDINARY_LINK
1163f7459d65 Fix previous change: keep the correct branch of a
Dan Nicolaescu <dann@ics.uci.edu>
parents: 96303
diff changeset
175
1163f7459d65 Fix previous change: keep the correct branch of a
Dan Nicolaescu <dann@ics.uci.edu>
parents: 96303
diff changeset
176 #define LIB_STANDARD
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
177
2116
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
178 /* 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
179
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
180 #define LIBS_DEBUG
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
181
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
182 /* Undump with ELF */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
183
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
184 #undef COFF
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
185
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
186 #define UNEXEC unexelf.o
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
187
8300
95b09cdfc59d Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents: 8283
diff changeset
188 /* <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
189 * 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
190 */
95b09cdfc59d Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents: 8283
diff changeset
191
95b09cdfc59d Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents: 8283
diff changeset
192 #undef static
95b09cdfc59d Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents: 8283
diff changeset
193
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
194 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
195 * tchars. But get <termio.h> first to make sure ttold.h doesn't
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
196 * interfere. And don't try to use SIGIO yet.
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
197 */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
198
13466
e31afd8b6355 Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents: 12734
diff changeset
199 #ifndef NOT_C_CODE
e31afd8b6355 Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents: 12734
diff changeset
200 #include <sys/wait.h>
e31afd8b6355 Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents: 12734
diff changeset
201 #endif
e31afd8b6355 Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents: 12734
diff changeset
202
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
203 #ifdef emacs
15844
090728aee80a Don't include filio.h if NO_FILIO_H.
Richard M. Stallman <rms@gnu.org>
parents: 14186
diff changeset
204 #ifndef NO_FILIO_H
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
205 #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
206 #endif
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
207 #include <termio.h>
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208 #include <sys/ttold.h>
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209 #include <signal.h>
1039
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
210 #include <sys/stream.h>
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
211 #include <sys/stropts.h>
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
212 #include <sys/termios.h>
26090
63fd40a97a75 s/usg5-4.h:
Paul Eggert <eggert@twinsun.com>
parents: 23914
diff changeset
213 #define BROKEN_SIGIO
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
214 #endif
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
215
2116
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
216 /* 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
217 * 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
218 * 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
219 */
26090
63fd40a97a75 s/usg5-4.h:
Paul Eggert <eggert@twinsun.com>
parents: 23914
diff changeset
220 #define NSIG_MINIMUM 32
2116
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
221
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
222 /* We can support this */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
223
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
224 #define CLASH_DETECTION
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
225
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
226 #define HAVE_PTYS
2116
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
227 #define HAVE_TERMIOS
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
229 /* It is possible to receive SIGCHLD when there are no children
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
230 waiting, because a previous waitsys(2) cleaned up the carcass of child
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
231 without clearing the SIGCHLD pending info. So, use a non-blocking
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
232 wait3 instead, which maps to waitpid(2) in SysVr4. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
233
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
234 #define HAVE_WAIT_HEADER
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
235 #define WAITTYPE int
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
236 #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
237 waitpid ((pid_t) -1, (status), (options))
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
238 #define WRETCODE(w) (w >> 8)
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
239
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
240 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
241 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
242 this is all we need. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
243
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
244 #define TIOCSIGSEND TIOCSIGNAL
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
245
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
246 /* This change means that we don't loop through allocate_pty too many
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
247 times in the (rare) event of a failure. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
248
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
249 #define FIRST_PTY_LETTER 'z'
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
250
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
251 /* This sets the name of the master side of the PTY. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
252
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
253 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
254
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
255 /* This sets the name of the slave side of the PTY. On SysVr4,
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
256 grantpt(3) forks a subprocess, so keep sigchld_handler() from
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
257 intercepting that death. If any child but grantpt's should die
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
258 within, it should be caught after sigrelse(2). */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
259
8283
32427329c42c (PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents: 7947
diff changeset
260 #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
261 { \
32427329c42c (PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents: 7947
diff changeset
262 char *ptsname (), *ptyname; \
32427329c42c (PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents: 7947
diff changeset
263 \
32427329c42c (PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents: 7947
diff changeset
264 sighold (SIGCLD); \
32427329c42c (PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents: 7947
diff changeset
265 if (grantpt (fd) == -1) \
26090
63fd40a97a75 s/usg5-4.h:
Paul Eggert <eggert@twinsun.com>
parents: 23914
diff changeset
266 { 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
267 sigrelse (SIGCLD); \
32427329c42c (PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents: 7947
diff changeset
268 if (unlockpt (fd) == -1) \
26090
63fd40a97a75 s/usg5-4.h:
Paul Eggert <eggert@twinsun.com>
parents: 23914
diff changeset
269 { 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
270 if (!(ptyname = ptsname (fd))) \
26090
63fd40a97a75 s/usg5-4.h:
Paul Eggert <eggert@twinsun.com>
parents: 23914
diff changeset
271 { 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
272 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
273 pty_name[sizeof (pty_name) - 1] = 0; \
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
274 }
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
275
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
276 /* Push various streams modules onto a PTY channel. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
277
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
278 #define SETUP_SLAVE_PTY \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
279 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
280 fatal ("ioctl I_PUSH ptem", errno); \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
281 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
282 fatal ("ioctl I_PUSH ldterm", errno); \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
283 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
284 fatal ("ioctl I_PUSH ttcompat", errno);
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
285
1039
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
286 /* Tell x11term.c and keyboard.c we have the system V streams feature. */
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
287 #define SYSV_STREAMS
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
288
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
289 /* This definition was suggested for next release.
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
290 So give it a try. */
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
291 #define HAVE_SOCKETS
4336
96d3869ae231 (bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents: 4295
diff changeset
292
26678
54fc79fa7000 (LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents: 26090
diff changeset
293 /* 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
294 SINIX. */
54fc79fa7000 (LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents: 26090
diff changeset
295 #define LIBS_SYSTEM -lgen
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 48457
diff changeset
296
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 48457
diff changeset
297 /* arch-tag: 1a0ed909-5faa-434b-b7c3-9d86c63d53a6
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 48457
diff changeset
298 (do not change this comment) */