annotate src/s/dgux.h @ 2479:0b63b42e826c

[xemacs-hg @ 2005-01-13 22:53:17 by viteno] Update xemacs_extra_name.
author viteno
date Thu, 13 Jan 2005 22:53:17 +0000
parents 943eaba38521
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 535
diff changeset
1 /* Definitions file for XEmacs running on Data General's DG/UX
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 version 4.32 upto and including 5.4.1.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 Copyright (C) 1994 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 535
diff changeset
5 This file is part of XEmacs.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 535
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 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
9 the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 535
diff changeset
12 XEmacs is distributed in the hope that it will be useful,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 GNU General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 /* Synched up with: FSF 19.31. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 * Define symbols to identify the version of Unix this is.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 * Define all the symbols that apply correctly.
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 /* #define UNIPLUS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 /* #define USG5 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 /* #define USG */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 /* #define HPUX */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 /* #define UMAX */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 /* #define BSD4_1 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 #define BSD4_2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 #define BSD4_3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 #define BSD4_4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 #define BSD
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 /* SYSTEM_TYPE should indicate the kind of system you are using.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 It sets the Lisp variable system-type. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 #define SYSTEM_TYPE "dgux"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 /* XEmacs: There is apparently a bug in DGUX involving a SIGTTOU getting
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 sent to the process if a background write is attempted when we're
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 started under a job-control shell, if we turn on FASYNC (which we
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 do when SIGIO is working). So don't use SIGIO. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 #define BROKEN_SIGIO
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 * Define HAVE_UNIX_DOMAIN if the system supports Unix
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 * domain sockets.
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 #define HAVE_UNIX_DOMAIN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 /* If your system uses COFF (Common Object File Format) then define the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 preprocessor symbol "COFF".
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 DGUX can use either COFF or ELF; the default is ELF.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 To compile for COFF (or BCS) use the TARGET_BINARY_INTERFACE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 environment variable. */
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 #if defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 #undef ELF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 #ifndef COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 #define COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 #endif /* COFF */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 #else /* defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET) */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 #undef COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 #ifndef ELF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 #define ELF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 #endif /* ELF */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 #endif /* defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET) */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 #ifndef COFF /* People will probably find this apparently unreliable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 till the NFS dumping bug is fixed. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 /* It is possible to undump to ELF with DG/UX 5.4, but for revisions below
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 5.4.1 the undump MUST be done on a local file system, or the kernel will
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 panic. ELF executables have the advantage of using shared libraries,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 while COFF executables will still work on 4.2x systems. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 #define UNEXEC "unexelf.o"
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 /* This makes sure that all segments in the executable are undumped,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 not just text, data, and bss. In the case of Mxdb and shared
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 libraries, additional information is stored in other sections.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 It does not hurt to have this defined if you don't use Mxdb or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 shared libraries. In fact, it makes no difference. */
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 /* Necessary for shared libraries and Mxdb debugging information. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 #define USG_SHARED_LIBRARIES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 /* define MAIL_USE_FLOCK if the mailer uses flock
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 to interlock access to /usr/spool/mail/$USER.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 The alternative is that a lock file named
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 /usr/spool/mail/$USER.lock. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 /* #define MAIL_USE_FLOCK */
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 /* Define a replacement for the baud rate switch, since DG/UX uses a different
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 from BSD. */
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 #define BAUD_CONVERT { 0, 110, 134, 150, 300, 600, 1200, 1800, 2400, \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 4800, 9600, 19200, 38400 }
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 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 * Make WM Interface Compliant.
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 #define XICCC
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115
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 /* DG/UX SPECIFIC ADDITIONS TO TEMPLATE FOLLOW: */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 /* Use the Berkeley flavors of the library routines, instead of System V. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 #define setpgrp(pid, pgrp) setpgrp2 (pid, pgrp)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 #define getpgrp(pid) getpgrp2 (pid)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 /* Use TERMINFO instead of termcap */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 #define TERMINFO
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127
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 * Use a Berkeley style sys/wait.h.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 * This makes WIF* macros operate on structures instead of ints.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 */
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 #define _BSD_WAIT_FLAVOR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 /* #define SYSTEM_MALLOC */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 /* MAKING_MAKEFILE must be defined in "ymakefile" before including config.h */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 #ifndef NOT_C_CODE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 /* Define this if you use System 5 Release 4 Streams */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 #define INTERRUPTIBLE_OPEN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 #define INTERRUPTIBLE_CLOSE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 /* can't hurt to define these, even though read/write should auto restart */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 #define INTERRUPTIBLE_IO
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 #endif /* not NOT_C_CODE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 #ifndef __GNUC__
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 #error You must use GCC to compile Emacs on DGUX
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 #define ORDINARY_LINK
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 #define START_FILES "pre-crt0.o"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 #define LIB_GCC "/usr/lib/gcc/libgcc.a"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 #ifdef _M88KBCS_TARGET
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 /* Karl Berry says: the environment
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 recommended by gcc (88/open, a.k.a. m88kbcs) doesn't support some system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 functions, and gcc doesn't make it easy to switch environments. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 #define NO_GET_LOAD_AVG
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 /* definitions for xmakefile production */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 #ifdef COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 /* Define the following to use all of the available pty's. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 #define PTY_ITERATION \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 for (c = 'p'; c < 't'; c++) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 for (i = 0; (((c == 'p') && (i < 64)) || ((c != 'p') && (i < 16))); i++)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 #define PTY_NAME_SPRINTF \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 if (c == 'p') \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 sprintf (pty_name, "/dev/pty%c%d", c, i); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 else \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 sprintf (pty_name, "/dev/pty%c%x", c, i);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 #define PTY_TTY_NAME_SPRINTF \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 if (c == 'p') \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 sprintf (pty_name, "/dev/tty%c%d", c, i); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 else \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 sprintf (pty_name, "/dev/tty%c%x", c, i);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 #define C_DEBUG_SWITCH "-g"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 #else /* not COFF */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 /* We are generating ELF object format. This makes the system more
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 SVR4 like. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 #define SVR4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 /* Pseudo-terminal support under SVR4 only loops to deal with errors. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 #define PTY_ITERATION for (i = 0; i < 1; i++)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 /* This sets the name of the master side of the PTY. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 /* 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
203 grantpt(3) forks a subprocess, so keep sigchld_handler() from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 intercepting that death. If any child but grantpt's should die
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 #define PTY_TTY_NAME_SPRINTF \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 { \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 char *ptyname; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 EMACS_BLOCK_SIGCHLD; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 if (grantpt (fd) == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 { close (fd); return -1; } \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 EMACS_UNBLOCK_SIGCHLD; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 if (unlockpt (fd) == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 { close (fd); return -1; } \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 if (!(ptyname = ptsname (fd))) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 { close (fd); return -1; } \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 strncpy (pty_name, ptyname, sizeof (pty_name)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 pty_name[sizeof (pty_name) - 1] = 0; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 /* Push various streams modules onto a PTY channel. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 #define SETUP_SLAVE_PTY \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 fatal ("ioctl I_PUSH ptem", errno); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 fatal ("ioctl I_PUSH ldterm", errno); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 fatal ("ioctl I_PUSH ttcompat", errno);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 #ifdef __GNUC__
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 #define C_DEBUG_SWITCH "-g -V2 -mversion-03.00 -mstandard"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 #endif /* ELF */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 /* Formerly "BSD_PGRPS" */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 #define SIGIO_REQUIRES_SEPARATE_PROCESS_GROUP