annotate src/s/usg5-4.h @ 163:0132846995bd r20-3b8

Import from CVS: tag r20-3b8
author cvs
date Mon, 13 Aug 2007 09:43:35 +0200
parents 25f70ba0133c
children c5d627a313b1
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
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 153
diff changeset
35 #define LIBS_SYSTEM "-lsocket -lnsl -lelf"
0
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
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 153
diff changeset
40 #define LIB_STANDARD "-lc /usr/ucblib/libucb.a"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 #else
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 153
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"
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 153
diff changeset
43 #define LIB_STANDARD "-lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o"
0
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
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 153
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"
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 153
diff changeset
51 #define LIB_STANDARD "-lc /usr/ccs/lib/crtn.o"
0
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
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 /* No <sioctl.h> */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 #define NO_SIOCTL_H
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 /* Undump with ELF */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 #undef COFF
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 153
diff changeset
67 #define UNEXEC "unexelf.o"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 /* Get <sys/ttold.h> to get struct
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 * tchars. But get <termio.h> first to make sure ttold.h doesn't
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 * interfere.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 #ifndef NOT_C_CODE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 #include <sys/wait.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 #ifdef emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 #include <sys/filio.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 #include <termio.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 #include <sys/ttold.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 #include <signal.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 #include <sys/stream.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 #include <sys/stropts.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 #include <sys/termios.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 #undef BROKEN_SIGIO
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 * instead, there's a system variable _sys_nsig. Unfortunately, we need the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 * constant to dimension an array. So wire in the appropriate value here.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 #ifndef NSIG
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 #define NSIG 32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 /* We need bss_end from emacs.c for undumping */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 #ifndef USG_SHARED_LIBRARIES
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 #define USG_SHARED_LIBRARIES
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 #define HAVE_PTYS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 #undef BROKEN_TIOCGWINSZ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 #undef BROKEN_TIOCGETC
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 this is all we need. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 #define TIOCSIGSEND TIOCSIGNAL
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 /* This change means that we don't loop through allocate_pty too many
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 times in the (rare) event of a failure. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 #undef FIRST_PTY_LETTER
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 #define FIRST_PTY_LETTER 'z'
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 /* This sets the name of the master side of the PTY. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 /* This sets the name of the slave side of the PTY. On SysVr4,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 grantpt(3) forks a subprocess, so keep sigchld_handler() from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 intercepting that death. If any child but grantpt's should die
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 /* XEmacs change */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 #ifndef NOT_C_CODE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 # if !__STDC__ && !defined(STDC_HEADERS)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 char *ptsname ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 # endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 #define PTY_TTY_NAME_SPRINTF \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 { \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 char *ptyname; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 EMACS_BLOCK_SIGCHLD; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 if (grantpt (fd) == -1) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 { close (fd); return -1; } \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 EMACS_UNBLOCK_SIGCHLD; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 if (unlockpt (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 if (!(ptyname = ptsname (fd))) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 { close (fd); return -1; } \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 strncpy (pty_name, ptyname, sizeof (pty_name)); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 pty_name[sizeof (pty_name) - 1] = 0; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 /* Push various streams modules onto a PTY channel. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 #define SETUP_SLAVE_PTY \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 fatal ("ioctl I_PUSH ptem: errno %d\n", errno); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 fatal ("ioctl I_PUSH ldterm: errno %d\n", errno); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 fatal ("ioctl I_PUSH ttcompat: errno %d\n", errno);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 /* Undo the SVr3 X11 library definition */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 #undef LIB_X11_LIB
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 /* 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
167 /* liblnsl_s should never be used. The _s suffix implies a shared
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 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
169 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
170 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 #undef LIBX10_SYSTEM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 #undef LIBX11_SYSTEM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 /* Tell x11term.c and keyboard.c we have the system V streams feature. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 #define SYSV_STREAMS
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 0
diff changeset
176 /* On Some SysV System , w3 freeze. If freeze your xemacs , Add below definition */
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 0
diff changeset
177 /* This definition added by Shogo Fujii(shogo@bsd1.kbnes.nec.co.jp) */
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 0
diff changeset
178 #define PROCESS_IO_BLOCKING