annotate src/s/usg5-4.h @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children 25f70ba0133c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1987, 1990 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 This file is part of GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 /* Synched up with: FSF 19.31. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 /* This file written by James Van Artsdalen of Dell Computer Corporation.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 * james@bigtex.cactus.org. Subsequently improved for Dell 2.2 by Eric
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 * S. Raymond <esr@snark.thyrsus.com>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 /* Use the SysVr3 file for at least base configuration. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 #define DONT_DEFINE_NO_REMAP /* `static' hack not needed */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 #include "usg5-3.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 #define USG5_4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 #define LIBS_SYSTEM -lsocket -lnsl -lelf
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 #define ORDINARY_LINK
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 #if 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 #ifdef ORDINARY_LINK
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 #define LIB_STANDARD -lc /usr/ucblib/libucb.a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 #define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 #ifdef ORDINARY_LINK
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 #define LIB_STANDARD
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
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
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 #define LIB_STANDARD -lc /usr/ccs/lib/crtn.o
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 /* there are no -lg libraries on this system, and no libPW */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 #define LIBS_DEBUG
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 /* This is turned off because nobody actually uses LIBS_STANDARD (Nov 1995).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 That name is a typo. The next step is to delete this entirely. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 /* #define LIBS_STANDARD -lc */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 /* No <sioctl.h> */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 #define NO_SIOCTL_H
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 /* Undump with ELF */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 #undef COFF
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 #define UNEXEC unexelf.o
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 /* Get <sys/ttold.h> to get struct
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 * tchars. But get <termio.h> first to make sure ttold.h doesn't
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 * interfere.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 #ifndef NOT_C_CODE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 #include <sys/wait.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 #ifdef emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 #include <sys/filio.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 #include <termio.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 #include <sys/ttold.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 #include <signal.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 #include <sys/stream.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 #include <sys/stropts.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 #include <sys/termios.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 #undef BROKEN_SIGIO
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 * instead, there's a system variable _sys_nsig. Unfortunately, we need the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 * constant to dimension an array. So wire in the appropriate value here.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 #ifndef NSIG
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 #define NSIG 32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 /* We need bss_end from emacs.c for undumping */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 #ifndef USG_SHARED_LIBRARIES
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 #define USG_SHARED_LIBRARIES
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 #define HAVE_PTYS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 #undef BROKEN_TIOCGWINSZ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 #undef BROKEN_TIOCGETC
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 this is all we need. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 #define TIOCSIGSEND TIOCSIGNAL
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 /* This change means that we don't loop through allocate_pty too many
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 times in the (rare) event of a failure. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 #undef FIRST_PTY_LETTER
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 #define FIRST_PTY_LETTER 'z'
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 /* This sets the name of the master side of the PTY. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 /* This sets the name of the slave side of the PTY. On SysVr4,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 grantpt(3) forks a subprocess, so keep sigchld_handler() from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 intercepting that death. If any child but grantpt's should die
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 /* XEmacs change */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 #ifndef NOT_C_CODE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 # if !__STDC__ && !defined(STDC_HEADERS)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 char *ptsname ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 # endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 #define PTY_TTY_NAME_SPRINTF \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 { \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 char *ptyname; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 EMACS_BLOCK_SIGCHLD; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 if (grantpt (fd) == -1) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 { close (fd); return -1; } \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 EMACS_UNBLOCK_SIGCHLD; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 if (unlockpt (fd) == -1) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 { close (fd); return -1; } \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 if (!(ptyname = ptsname (fd))) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 { close (fd); return -1; } \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 strncpy (pty_name, ptyname, sizeof (pty_name)); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 pty_name[sizeof (pty_name) - 1] = 0; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 /* Push various streams modules onto a PTY channel. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 #define SETUP_SLAVE_PTY \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 fatal ("ioctl I_PUSH ptem: errno %d\n", errno); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 fatal ("ioctl I_PUSH ldterm: errno %d\n", errno); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 fatal ("ioctl I_PUSH ttcompat: errno %d\n", errno);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 /* Undo the SVr3 X11 library definition */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 #undef LIB_X11_LIB
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 /* The definition of this in s-usg5-3.h is not needed in 5.4. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 /* liblnsl_s should never be used. The _s suffix implies a shared
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 library, as opposed to a DLL. Share libraries were used in SVR3, and are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 available only in order to allow SVR3 binaries to run. They should not be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 #undef LIBX10_SYSTEM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 #undef LIBX11_SYSTEM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 /* Tell x11term.c and keyboard.c we have the system V streams feature. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 #define SYSV_STREAMS