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