annotate src/s/usg5-4.h @ 582:0dcc097685c7

[xemacs-hg @ 2001-05-27 01:50:52 by ben] i have cvs
author ben
date Sun, 27 May 2001 01:50:52 +0000
parents c69610198c35
children 023b83f4e54b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1987, 1990 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 This file is part of GNU Emacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 GNU General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 /* Synched up with: FSF 19.31. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 /* This file written by James Van Artsdalen of Dell Computer Corporation.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 * james@bigtex.cactus.org. Subsequently improved for Dell 2.2 by Eric
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 * S. Raymond <esr@snark.thyrsus.com>.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 /* Use the SysVr3 file for at least base configuration. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 #define DONT_DEFINE_NO_REMAP /* `static' hack not needed */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 #include "usg5-3.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 #define USG5_4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 #define LIBS_SYSTEM "-lsocket -lnsl -lelf"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 #define ORDINARY_LINK
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 #if 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 #ifdef ORDINARY_LINK
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 #define LIB_STANDARD "-lc /usr/ucblib/libucb.a"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 #else
3ecd8885ac67 Import from CVS: tag r21-2-22
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"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 #define LIB_STANDARD "-lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 #else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 #ifdef ORDINARY_LINK
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 #define LIB_STANDARD
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 #else
3ecd8885ac67 Import from CVS: tag r21-2-22
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"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 #define LIB_STANDARD "-lc /usr/ccs/lib/crtn.o"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 /* there are no -lg libraries on this system, and no libPW */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 #define LIBS_DEBUG
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 /* No <sioctl.h> */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 #define NO_SIOCTL_H
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 /* Undump with ELF */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 #undef COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 #define UNEXEC "unexelf.o"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 /* Get <sys/ttold.h> to get struct
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 * tchars. But get <termio.h> first to make sure ttold.h doesn't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 * interfere.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 #ifndef NOT_C_CODE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 #include <sys/wait.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 #ifdef emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 #include <sys/filio.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 #include <termio.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 #include <sys/ttold.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 #include <signal.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 #include <sys/stream.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 #include <sys/termios.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 #undef BROKEN_SIGIO
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 * instead, there's a system variable _sys_nsig. Unfortunately, we need the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 * constant to dimension an array. So wire in the appropriate value here.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 #ifndef NSIG
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 #define NSIG 32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 /* We need bss_end from emacs.c for undumping */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 #ifndef USG_SHARED_LIBRARIES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 #define USG_SHARED_LIBRARIES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 #undef BROKEN_TIOCGWINSZ
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 #undef BROKEN_TIOCGETC
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 /* This change means that we don't loop through allocate_pty too many
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 times in the (rare) event of a failure. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 #undef FIRST_PTY_LETTER
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 #define FIRST_PTY_LETTER 'z'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 /* This sets the name of the master side of the PTY. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 /* This sets the name of the slave side of the PTY. On SysVr4,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 grantpt(3) forks a subprocess, so keep sigchld_handler() from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 intercepting that death. If any child but grantpt's should die
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 /* XEmacs change */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 #ifndef NOT_C_CODE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 # if !__STDC__ && !defined(STDC_HEADERS)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 char *ptsname ();
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 # endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 #define PTY_TTY_NAME_SPRINTF \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 { \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 char *ptyname; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 EMACS_BLOCK_SIGCHLD; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 if (grantpt (fd) == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 { close (fd); return -1; } \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 EMACS_UNBLOCK_SIGCHLD; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 if (unlockpt (fd) == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 { close (fd); return -1; } \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 if (!(ptyname = ptsname (fd))) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 { close (fd); return -1; } \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 strncpy (pty_name, ptyname, sizeof (pty_name)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 pty_name[sizeof (pty_name) - 1] = 0; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 /* Push various streams modules onto a PTY channel. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 #define SETUP_SLAVE_PTY \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 fatal ("ioctl I_PUSH ptem: errno %d\n", errno); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 fatal ("ioctl I_PUSH ldterm: errno %d\n", errno); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 fatal ("ioctl I_PUSH ttcompat: errno %d\n", errno);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 /* Tell x11term.c and keyboard.c we have the system V streams feature. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 #define SYSV_STREAMS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 /* On Some SysV System , w3 freeze. If freeze your xemacs , Add below definition */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 /* This definition added by Shogo Fujii(shogo@bsd1.kbnes.nec.co.jp) */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 #define PROCESS_IO_BLOCKING