Update years in copyright notice; nfc.
[bpt/emacs.git] / src / s / dgux.h
CommitLineData
9b71f02b 1/* Definitions file for GNU Emacs running on Data General's DG/UX
5be71b29 2 version 4.32 upto and including 5.4.1.
92b47a4a 3 Copyright (C) 1994, 1999, 2002, 2003, 2004,
aaef169d 4 2005, 2006 Free Software Foundation, Inc.
9b71f02b
JB
5
6This file is part of GNU Emacs.
7
8GNU Emacs is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
17385adc 10the Free Software Foundation; either version 2, or (at your option)
9b71f02b
JB
11any later version.
12
13GNU Emacs is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU Emacs; see the file COPYING. If not, write to
364c38d3
LK
20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21Boston, MA 02110-1301, USA. */
9b71f02b 22
9b71f02b
JB
23/*
24 * Define symbols to identify the version of Unix this is.
25 * Define all the symbols that apply correctly.
26 */
27
28/* #define UNIPLUS */
29/* #define USG5 */
30/* #define USG */
31/* #define HPUX */
32/* #define UMAX */
33/* #define BSD4_1 */
34#define BSD4_2
35#define BSD4_3
d1ae7d26 36#define BSD4_4
fae87a07 37#define BSD_SYSTEM
9b71f02b
JB
38
39/* SYSTEM_TYPE should indicate the kind of system you are using.
40 It sets the Lisp variable system-type. */
41
8f26edca 42#define SYSTEM_TYPE "dgux"
9b71f02b
JB
43
44/* NOMULTIPLEJOBS should be defined if your system's shell
45 does not have "job control" (the ability to stop a program,
46 run some other program, then continue the first one). */
47
48/* #define NOMULTIPLEJOBS */
49
50/* Emacs can read input using SIGIO and buffering characters itself,
51 or using CBREAK mode and making C-g cause SIGINT.
52 The choice is controlled by the variable interrupt_input.
53 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
54
55 SIGIO can be used only on systems that implement it (4.2 and 4.3).
eb8c3be9 56 CBREAK mode has two disadvantages
9b71f02b
JB
57 1) At least in 4.2, it is impossible to handle the Meta key properly.
58 I hear that in system V this problem does not exist.
59 2) Control-G causes output to be discarded.
60 I do not know whether this can be fixed in system V.
61
62 Another method of doing input is planned but not implemented.
63 It would have Emacs fork off a separate process
64 to read the input and send it to the true Emacs process
65 through a pipe.
9b71f02b 66
085a9cd8 67*/
9b71f02b 68
5be71b29 69#define INTERRUPT_INPUT
9b71f02b 70
9b71f02b
JB
71/*
72 * Define HAVE_SOCKETS if the system supports sockets.
73 */
74
75#define HAVE_SOCKETS
76
d1ae7d26
JB
77/*
78 * Define HAVE_UNIX_DOMAIN if the system supports Unix
79 * domain sockets.
80 */
085a9cd8 81
d1ae7d26 82#define HAVE_UNIX_DOMAIN
085a9cd8 83
9b71f02b
JB
84/*
85 * Define HAVE_PTYS if the system supports pty devices.
86 */
87
88#define HAVE_PTYS
89
90/*
91 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
92 * The 4.2 opendir, etc., library functions.
93 */
94
95/* #define NONSYSTEM_DIR_LIBRARY */
96
97/* Define this symbol if your system has the functions bcopy, etc. */
98
99#define BSTRING
100
101/* subprocesses should be defined if you want to
102 have code for asynchronous subprocesses
103 (as used in M-x compile and M-x shell).
104 This is generally OS dependent, and not supported
105 under most USG systems. */
106
107#define subprocesses
108
109/* If your system uses COFF (Common Object File Format) then define the
e2f4b44c 110 preprocessor symbol "COFF".
9b71f02b 111
a1005480
RS
112 DGUX can use either COFF or ELF; the default is ELF.
113 To compile for COFF (or BCS) use the TARGET_BINARY_INTERFACE
114 environment variable. */
e2f4b44c 115
a1005480
RS
116#if defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET)
117#undef ELF
118#ifndef COFF
9b71f02b 119#define COFF
a1005480
RS
120#endif /* COFF */
121#else /* defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET) */
122#undef COFF
123#ifndef ELF
124#define ELF
125#endif /* ELF */
126#endif /* defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET) */
e2f4b44c
RS
127
128#ifndef COFF /* People will probably find this apparently unreliable
129 till the NFS dumping bug is fixed. */
130
131/* It is possible to undump to ELF with DG/UX 5.4, but for revisions below
132 5.4.1 the undump MUST be done on a local file system, or the kernel will
133 panic. ELF executables have the advantage of using shared libraries,
134 while COFF executables will still work on 4.2x systems. */
135
136#define UNEXEC unexelf.o
137
138/* This makes sure that all segments in the executable are undumped,
139 not just text, data, and bss. In the case of Mxdb and shared
140 libraries, additional information is stored in other sections.
141 It does not hurt to have this defined if you don't use Mxdb or
142 shared libraries. In fact, it makes no difference. */
143
144/* Necessary for shared libraries and Mxdb debugging information. */
145#define USG_SHARED_LIBRARIES
146#endif
9b71f02b
JB
147
148/* define MAIL_USE_FLOCK if the mailer uses flock
149 to interlock access to /usr/spool/mail/$USER.
150 The alternative is that a lock file named
151 /usr/spool/mail/$USER.lock. */
152
153/* #define MAIL_USE_FLOCK */
154
155/* Define CLASH_DETECTION if you want lock files to be written
156 so that Emacs can tell instantly when you try to modify
157 a file that someone else has modified in his Emacs. */
158
159/* #define CLASH_DETECTION */
160
161/* Define a replacement for the baud rate switch, since DG/UX uses a different
162 from BSD. */
163
164#define BAUD_CONVERT { 0, 110, 134, 150, 300, 600, 1200, 1800, 2400, \
165 4800, 9600, 19200, 38400 }
166
9b71f02b
JB
167/*
168 * Make WM Interface Compliant.
169 */
170
171#define XICCC
172
173/* Here, on a separate page, add any special hacks needed
174 to make Emacs work on this system. For example,
175 you might define certain system call names that don't
176 exist on your system, or that do different things on
177 your system and must be used only through an encapsulation
178 (Which you should place, by convention, in sysdep.c). */
179\f
180/* Some compilers tend to put everything declared static
181 into the initialized data area, which becomes pure after dumping Emacs.
182 On these systems, you must #define static as nothing to foil this.
183 Note that emacs carefully avoids static vars inside functions. */
184
185/* #define static */
186
187/* DG/UX SPECIFIC ADDITIONS TO TEMPLATE FOLLOW: */
188
189/* Use the Berkeley flavors of the library routines, instead of System V. */
190
191#define setpgrp(pid,pgrp) setpgrp2(pid,pgrp)
192#define getpgrp(pid) getpgrp2(pid)
193
194/* Act like Berkeley. */
195
196#define _setjmp(env) sigsetjmp(env,0)
197#define _longjmp(env,val) longjmp(env,val)
198
199/* Use TERMINFO instead of termcap */
200
201#define TERMINFO
202
8f26edca
RS
203/*
204 * Send signals to subprocesses using characters.
205 *
206 */
207
208#define SIGNALS_VIA_CHARACTERS
209
9b71f02b 210/*
d1ae7d26 211 * Define HAVE_TERMIOS since this is POSIX,
085a9cd8 212 * for terminal control. Prevent redundant inclusion of termio.h.
9b71f02b
JB
213 */
214
d1ae7d26 215#define HAVE_TERMIOS
085a9cd8 216#define NO_TERMIO
9b71f02b
JB
217
218/*
219 * Use a Berkeley style sys/wait.h.
220 * This makes WIF* macros operate on structures instead of ints.
221 */
222
223#define _BSD_WAIT_FLAVOR
224
9b71f02b
JB
225/*
226 * Use BSD and POSIX-style signals. This is crucial!
227 */
228
bb292747 229/* #define SYSTEM_MALLOC */
dbba802a 230
9b71f02b 231/* MAKING_MAKEFILE must be defined in "ymakefile" before including config.h */
24916110 232#ifndef NOT_C_CODE
9b71f02b
JB
233
234/* Make sure signal.h is included so macros below don't mess with it. */
235/* DG/UX include files prevent multiple inclusion. */
236
237#include <signal.h>
238
d1ae7d26
JB
239/* but undefine the sigmask and sigpause macros since they will get
240 #define'd later. */
241#undef sigmask
242#undef sigpause
243
9b71f02b
JB
244#define POSIX_SIGNALS
245
e4532ad9 246#ifndef NO_DGUX_SIGNAL_REDEF
9b71f02b 247/* Can't use sys_signal because then etc/server.c would need sysdep.o. */
d1ae7d26 248extern struct sigaction act, oact;
9b71f02b 249#define signal(SIG,FUNC) berk_signal(SIG,FUNC)
e4532ad9 250#endif
9b71f02b 251
24916110
RS
252#endif /* not NOT_C_CODE */
253
254#ifndef __GNUC__
255#error You must use GCC to compiler Emascs on DGUX
256#endif
d1ae7d26 257
5be71b29 258#define ORDINARY_LINK
d1ae7d26 259#define START_FILES pre-crt0.o
d1ae7d26 260#define LIB_GCC /usr/lib/gcc/libgcc.a
6cb37d97 261
1f9ecc7b 262#ifdef _M88KBCS_TARGET
6cb37d97
RS
263/* Karl Berry says: the environment
264 recommended by gcc (88/open, a.k.a. m88kbcs) doesn't support some system
265 functions, and gcc doesn't make it easy to switch environments. */
266#define NO_GET_LOAD_AVG
267#endif
e2f4b44c
RS
268\f
269/* definitions for xmakefile production */
270#ifdef COFF
085a9cd8
RS
271
272/* Define the following to use all of the available pty's. */
273
274#define PTY_ITERATION \
275 for (c = 'p'; c < 't'; c++) \
276 for (i = 0; (((c == 'p') && (i < 64)) || ((c != 'p') && (i < 16))); i++)
277
278#define PTY_NAME_SPRINTF \
279 if (c == 'p') \
280 sprintf (pty_name, "/dev/pty%c%d", c, i); \
281 else \
282 sprintf (pty_name, "/dev/pty%c%x", c, i);
283
284#define PTY_TTY_NAME_SPRINTF \
285 if (c == 'p') \
286 sprintf (pty_name, "/dev/tty%c%d", c, i); \
287 else \
288 sprintf (pty_name, "/dev/tty%c%x", c, i);
289
085a9cd8
RS
290#define C_DEBUG_SWITCH -g
291
e2f4b44c
RS
292#else /* not COFF */
293
5be71b29
PR
294/* We are generating ELF object format. This makes the system more
295 SVR4 like. */
296
297#define SVR4
298
4ba13117
RS
299/* Pseudo-terminal support under SVR4 only loops to deal with errors. */
300
301#define PTY_ITERATION for (i = 0; i < 1; i++)
302
303/* This sets the name of the master side of the PTY. */
304
305#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
306
307/* This sets the name of the slave side of the PTY. On SysVr4,
308 grantpt(3) forks a subprocess, so keep sigchld_handler() from
309 intercepting that death. If any child but grantpt's should die
310 within, it should be caught after sigrelse(2). */
311
312#define PTY_TTY_NAME_SPRINTF \
313 { \
314 char *ptsname(), *ptyname; \
315 \
316 sigblock(sigmask(SIGCLD)); \
317 if (grantpt(fd) == -1) \
318 fatal("could not grant slave pty"); \
319 sigunblock(sigmask(SIGCLD)); \
320 if (unlockpt(fd) == -1) \
321 fatal("could not unlock slave pty"); \
322 if (!(ptyname = ptsname(fd))) \
323 fatal ("could not enable slave pty"); \
324 strncpy(pty_name, ptyname, sizeof(pty_name)); \
325 pty_name[sizeof(pty_name) - 1] = 0; \
326 }
327
328/* Push various streams modules onto a PTY channel. */
329
330#define SETUP_SLAVE_PTY \
331 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
332 fatal ("ioctl I_PUSH ptem", errno); \
333 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
334 fatal ("ioctl I_PUSH ldterm", errno); \
335 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
336 fatal ("ioctl I_PUSH ttcompat", errno);
337
4ed715c1 338#ifdef __GNUC__
d1ae7d26 339#define C_DEBUG_SWITCH -g -V2 -mversion-03.00 -mstandard
4ed715c1 340#endif
5be71b29
PR
341
342#endif /* ELF */
dea95cc2 343
085a9cd8
RS
344/* Extra stuff which probably should be someplace else but is here out
345 of expediency. */
651c847c 346
085a9cd8 347#define LIB_X11_LIB -lX11
37849f29 348#define LIB_MOTIF -lXm -lgen
a9f7a967
RS
349
350/* Process groups work in the traditional BSD manner. */
351
352#define BSD_PGRPS
ab5796a9
MB
353
354/* arch-tag: 1b6d117d-82d2-4480-a6d0-3f7a8360f658
355 (do not change this comment) */