annotate src/s/dgux.h @ 531:0493e9f3c27f

[xemacs-hg @ 2001-05-12 11:16:12 by ben] event-msw.c: eliminate cygwin warnings. dired.c, syswindows.h, win32.c: find the Net* functions the hard way to avoid errors on win 9x. find-paths.el: fix error with null EXCLUDE-REGEXP. font-lock.el: fix problem reported by hrvoje with buffers starting with a space. lib-complete.el: add a variable to control where `find-library' looks, analogous to `find-function-source-path'. etags.c: new version from Francesco. Makefile.in.in: i'm getting real tired of incomplete commits. is this getting worse or something?
author ben
date Sat, 12 May 2001 11:16:25 +0000
parents 3ecd8885ac67
children c69610198c35
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 Data General's DG/UX
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 This file is part of GNU Emacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 GNU Emacs is free software; you can redistribute it and/or modify
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 GNU Emacs is distributed in the hope that it will be useful,
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 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 * Define HAVE_PTYS if the system supports pty devices.
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 #define HAVE_PTYS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 /* If your system uses COFF (Common Object File Format) then define the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 preprocessor symbol "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 DGUX can use either COFF or ELF; the default is ELF.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 To compile for COFF (or BCS) use the TARGET_BINARY_INTERFACE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 environment variable. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 #if defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 #undef ELF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 #ifndef COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 #define COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 #endif /* COFF */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 #else /* defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET) */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 #undef COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 #ifndef ELF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 #define ELF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 #endif /* ELF */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 #endif /* defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET) */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 #ifndef COFF /* People will probably find this apparently unreliable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 till the NFS dumping bug is fixed. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 /* 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
87 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
88 panic. ELF executables have the advantage of using shared libraries,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 while COFF executables will still work on 4.2x systems. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 #define UNEXEC "unexelf.o"
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 /* This makes sure that all segments in the executable are undumped,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 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
95 libraries, additional information is stored in other sections.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 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
97 shared libraries. In fact, it makes no difference. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 /* Necessary for shared libraries and Mxdb debugging information. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 #define USG_SHARED_LIBRARIES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 /* define MAIL_USE_FLOCK if the mailer uses flock
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 to interlock access to /usr/spool/mail/$USER.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 The alternative is that a lock file named
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 /usr/spool/mail/$USER.lock. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 /* #define MAIL_USE_FLOCK */
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 /* 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
111 from BSD. */
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 #define BAUD_CONVERT { 0, 110, 134, 150, 300, 600, 1200, 1800, 2400, \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 4800, 9600, 19200, 38400 }
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 * Make WM Interface Compliant.
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 #define XICCC
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 /* Here, on a separate page, add any special hacks needed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 to make Emacs work on this system. For example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 you might define certain system call names that don't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 exist on your system, or that do different things on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 your system and must be used only through an encapsulation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 (Which you should place, by convention, in sysdep.c). */
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 /* DG/UX SPECIFIC ADDITIONS TO TEMPLATE FOLLOW: */
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 /* Use the Berkeley flavors of the library routines, instead of System V. */
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 setpgrp(pid, pgrp) setpgrp2 (pid, pgrp)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 #define getpgrp(pid) getpgrp2 (pid)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 /* Use TERMINFO instead of termcap */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 #define TERMINFO
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 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 * Use a Berkeley style sys/wait.h.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 * This makes WIF* macros operate on structures instead of ints.
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 #define _BSD_WAIT_FLAVOR
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 SYSTEM_MALLOC */
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 /* MAKING_MAKEFILE must be defined in "ymakefile" before including config.h */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 #ifndef NOT_C_CODE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 /* Define this if you use System 5 Release 4 Streams */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 #define INTERRUPTIBLE_OPEN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 #define INTERRUPTIBLE_CLOSE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 /* 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
157 #define INTERRUPTIBLE_IO
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 #endif /* not NOT_C_CODE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 #ifndef __GNUC__
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 #error You must use GCC to compile Emacs on DGUX
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 #define ORDINARY_LINK
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 #define START_FILES "pre-crt0.o"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 #define LIB_GCC "/usr/lib/gcc/libgcc.a"
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 #ifdef _M88KBCS_TARGET
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 /* Karl Berry says: the environment
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 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
172 functions, and gcc doesn't make it easy to switch environments. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 #define NO_GET_LOAD_AVG
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 /* definitions for xmakefile production */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 #ifdef COFF
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 the following to use all of the available pty's. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 #define PTY_ITERATION \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 for (c = 'p'; c < 't'; c++) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 for (i = 0; (((c == 'p') && (i < 64)) || ((c != 'p') && (i < 16))); 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 PTY_NAME_SPRINTF \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 if (c == 'p') \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 sprintf (pty_name, "/dev/pty%c%d", c, i); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 else \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 sprintf (pty_name, "/dev/pty%c%x", c, i);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 #define PTY_TTY_NAME_SPRINTF \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 if (c == 'p') \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 sprintf (pty_name, "/dev/tty%c%d", c, i); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 else \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 sprintf (pty_name, "/dev/tty%c%x", c, i);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 #define C_DEBUG_SWITCH "-g"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 #else /* not COFF */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 /* We are generating ELF object format. This makes the system more
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 SVR4 like. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 #define SVR4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 /* Pseudo-terminal support under SVR4 only loops to deal with errors. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 #define PTY_ITERATION for (i = 0; i < 1; i++)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 /* This sets the name of the master side of the PTY. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 /* 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
215 grantpt(3) forks a subprocess, so keep sigchld_handler() from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 intercepting that death. If any child but grantpt's should die
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 #define PTY_TTY_NAME_SPRINTF \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 { \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 char *ptyname; \
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 EMACS_BLOCK_SIGCHLD; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 if (grantpt (fd) == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 { close (fd); return -1; } \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 EMACS_UNBLOCK_SIGCHLD; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 if (unlockpt (fd) == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 { close (fd); return -1; } \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 if (!(ptyname = ptsname (fd))) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 { close (fd); return -1; } \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 strncpy (pty_name, ptyname, sizeof (pty_name)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 pty_name[sizeof (pty_name) - 1] = 0; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 /* Push various streams modules onto a PTY channel. */
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 #define SETUP_SLAVE_PTY \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 fatal ("ioctl I_PUSH ptem", errno); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 fatal ("ioctl I_PUSH ldterm", errno); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 fatal ("ioctl I_PUSH ttcompat", errno);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 #ifdef __GNUC__
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 #define C_DEBUG_SWITCH "-g -V2 -mversion-03.00 -mstandard"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 #endif /* ELF */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 /* Formerly "BSD_PGRPS" */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 #define SIGIO_REQUIRES_SEPARATE_PROCESS_GROUP