(vmotion): Use minibuf_prompt_width despite window-start.
[emacs.git] / src / s / dgux.h
blob58221cedce52d5f66ea07d094d4ae7ca77b42cc0
1 /* Definitions file for GNU Emacs running on Data General's DG/UX
2 version 4.32 and above.
3 Copyright (C) 1985, 1986, 1991 Free Software Foundation, Inc.
5 This file is part of GNU Emacs.
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.
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.
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. */
23 * Define symbols to identify the version of Unix this is.
24 * Define all the symbols that apply correctly.
27 /* #define UNIPLUS */
28 /* #define USG5 */
29 /* #define USG */
30 /* #define HPUX */
31 /* #define UMAX */
32 /* #define BSD4_1 */
33 #define BSD4_2
34 #define BSD4_3
35 #define BSD4_4
36 #define BSD
37 #define SVR4
39 /* SYSTEM_TYPE should indicate the kind of system you are using.
40 It sets the Lisp variable system-type. */
42 #define SYSTEM_TYPE "dgux"
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). */
48 /* #define NOMULTIPLEJOBS */
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)
55 SIGIO can be used only on systems that implement it (4.2 and 4.3).
56 CBREAK mode has two disadvantages
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.
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.
67 NOTE: On DGUX, there is a problem using INTERRUPT_INPUT: When invoked
68 under X11 using a job control shell (csh, ksh) in the background,
69 emacs will stop on tty output. I suspect this is a kernel problem and
70 have reported it and a sample program to DGC. Meanwhile, a workaround
71 is to define BROKEN_FIONREAD and not use INTERRUPT_INPUT.
73 -pmr@rock.concert.net
76 #define BROKEN_FIONREAD
77 /* #define INTERRUPT_INPUT */
80 * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
81 * Look in <sys/time.h> for a timeval structure.
84 #define HAVE_TIMEVAL
87 * Define HAVE_SELECT if the system supports the `select' system call.
90 #define HAVE_SELECT
93 * Define HAVE_SOCKETS if the system supports sockets.
96 #define HAVE_SOCKETS
99 * Define HAVE_UNIX_DOMAIN if the system supports Unix
100 * domain sockets.
103 #define HAVE_UNIX_DOMAIN
106 * Define HAVE_PTYS if the system supports pty devices.
109 #define HAVE_PTYS
111 /* (Assume) we do have vfork. */
113 #define HAVE_VFORK
116 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
117 * The 4.2 opendir, etc., library functions.
120 /* #define NONSYSTEM_DIR_LIBRARY */
122 /* Define this symbol if your system has the functions bcopy, etc. */
124 #define BSTRING
126 /* subprocesses should be defined if you want to
127 have code for asynchronous subprocesses
128 (as used in M-x compile and M-x shell).
129 This is generally OS dependent, and not supported
130 under most USG systems. */
132 #define subprocesses
134 /* If your system uses COFF (Common Object File Format) then define the
135 preprocessor symbol "COFF".
137 DGUX can use either COFF or ELF; the default is ELF.
138 To compile for COFF (or BCS) use the TARGET_BINARY_INTERFACE
139 environment variable. */
141 #if defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET)
142 #undef ELF
143 #ifndef COFF
144 #define COFF
145 #endif /* COFF */
146 #else /* defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET) */
147 #undef COFF
148 #ifndef ELF
149 #define ELF
150 #endif /* ELF */
151 #endif /* defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET) */
153 #ifndef COFF /* People will probably find this apparently unreliable
154 till the NFS dumping bug is fixed. */
156 /* It is possible to undump to ELF with DG/UX 5.4, but for revisions below
157 5.4.1 the undump MUST be done on a local file system, or the kernel will
158 panic. ELF executables have the advantage of using shared libraries,
159 while COFF executables will still work on 4.2x systems. */
161 #define UNEXEC unexelf.o
163 /* This makes sure that all segments in the executable are undumped,
164 not just text, data, and bss. In the case of Mxdb and shared
165 libraries, additional information is stored in other sections.
166 It does not hurt to have this defined if you don't use Mxdb or
167 shared libraries. In fact, it makes no difference. */
169 /* Necessary for shared libraries and Mxdb debugging information. */
170 #define USG_SHARED_LIBRARIES
171 #endif
173 /* define MAIL_USE_FLOCK if the mailer uses flock
174 to interlock access to /usr/spool/mail/$USER.
175 The alternative is that a lock file named
176 /usr/spool/mail/$USER.lock. */
178 /* #define MAIL_USE_FLOCK */
180 /* Define CLASH_DETECTION if you want lock files to be written
181 so that Emacs can tell instantly when you try to modify
182 a file that someone else has modified in his Emacs. */
184 /* #define CLASH_DETECTION */
186 /* Define a replacement for the baud rate switch, since DG/UX uses a different
187 from BSD. */
189 #define BAUD_CONVERT { 0, 110, 134, 150, 300, 600, 1200, 1800, 2400, \
190 4800, 9600, 19200, 38400 }
193 * Define NLIST_STRUCT if the system has nlist.h
196 #define NLIST_STRUCT
199 * Make WM Interface Compliant.
202 #define XICCC
204 /* Here, on a separate page, add any special hacks needed
205 to make Emacs work on this system. For example,
206 you might define certain system call names that don't
207 exist on your system, or that do different things on
208 your system and must be used only through an encapsulation
209 (Which you should place, by convention, in sysdep.c). */
211 /* Some compilers tend to put everything declared static
212 into the initialized data area, which becomes pure after dumping Emacs.
213 On these systems, you must #define static as nothing to foil this.
214 Note that emacs carefully avoids static vars inside functions. */
216 /* #define static */
218 /* DG/UX SPECIFIC ADDITIONS TO TEMPLATE FOLLOW: */
220 /* Use the Berkeley flavors of the library routines, instead of System V. */
222 #define setpgrp(pid,pgrp) setpgrp2(pid,pgrp)
223 #define getpgrp(pid) getpgrp2(pid)
225 /* Act like Berkeley. */
227 #define _setjmp(env) sigsetjmp(env,0)
228 #define _longjmp(env,val) longjmp(env,val)
230 /* Use TERMINFO instead of termcap */
232 #define TERMINFO
235 * Send signals to subprocesses using characters.
239 #define SIGNALS_VIA_CHARACTERS
242 * Define HAVE_TERMIOS since this is POSIX,
243 * for terminal control. Prevent redundant inclusion of termio.h.
246 #define HAVE_TERMIOS
247 #define NO_TERMIO
250 * Use a Berkeley style sys/wait.h.
251 * This makes WIF* macros operate on structures instead of ints.
254 #define _BSD_WAIT_FLAVOR
257 * Use BSD and POSIX-style signals. This is crucial!
260 /* pmr now says the GNU malloc works. */
261 /* pmr@rock.concert.net says Emacs fails without this. We don't know why. */
262 /* #define SYSTEM_MALLOC */
264 /* MAKING_MAKEFILE must be defined in "ymakefile" before including config.h */
265 #ifndef THIS_IS_YMAKEFILE
267 /* Make sure signal.h is included so macros below don't mess with it. */
268 /* DG/UX include files prevent multiple inclusion. */
270 #include <signal.h>
272 /* but undefine the sigmask and sigpause macros since they will get
273 #define'd later. */
274 #undef sigmask
275 #undef sigpause
277 #define POSIX_SIGNALS
279 /* Define this if you use System 5 Release 4 Streams */
280 #define open sys_open
281 #define close sys_close
282 #define read sys_read
283 #define write sys_write
285 #define INTERRUPTIBLE_OPEN
286 #define INTERRUPTIBLE_CLOSE
287 /* can't hurt to define these, even though read/write should auto restart */
288 #define INTERRUPTIBLE_IO
290 /* Can't use sys_signal because then etc/server.c would need sysdep.o. */
291 extern struct sigaction act, oact;
292 #define signal(SIG,FUNC) berk_signal(SIG,FUNC)
294 #else /* THIS_IS_YMAKEFILE */
295 /* force gcc to be used */
296 CC=gcc
297 #endif /* not THIS_IS_YMAKEFILE */
299 #define LD_SWITCH_SYSTEM
300 #define START_FILES pre-crt0.o
301 #define LIBS_SYSTEM -ldgc
302 #define LIB_GCC /usr/lib/gcc/libgcc.a
304 #ifdef _M88KBCS_TARGET
305 /* Karl Berry says: the environment
306 recommended by gcc (88/open, a.k.a. m88kbcs) doesn't support some system
307 functions, and gcc doesn't make it easy to switch environments. */
308 #define NO_GET_LOAD_AVG
309 #endif
311 /* definitions for xmakefile production */
312 #ifdef COFF
314 /* Define the following to use all of the available pty's. */
316 #define PTY_ITERATION \
317 for (c = 'p'; c < 't'; c++) \
318 for (i = 0; (((c == 'p') && (i < 64)) || ((c != 'p') && (i < 16))); i++)
320 #define PTY_NAME_SPRINTF \
321 if (c == 'p') \
322 sprintf (pty_name, "/dev/pty%c%d", c, i); \
323 else \
324 sprintf (pty_name, "/dev/pty%c%x", c, i);
326 #define PTY_TTY_NAME_SPRINTF \
327 if (c == 'p') \
328 sprintf (pty_name, "/dev/tty%c%d", c, i); \
329 else \
330 sprintf (pty_name, "/dev/tty%c%x", c, i);
332 #define C_COMPILER \
333 TARGET_BINARY_INTERFACE=m88kdguxcoff gcc -traditional
335 #define LINKER \
336 TARGET_BINARY_INTERFACE=m88kdguxcoff gcc
338 #define MAKE_COMMAND \
339 TARGET_BINARY_INTERFACE=m88kdguxcoff make
341 #define C_DEBUG_SWITCH -g
343 #else /* not COFF */
345 /* Pseudo-terminal support under SVR4 only loops to deal with errors. */
347 #define PTY_ITERATION for (i = 0; i < 1; i++)
349 /* This sets the name of the master side of the PTY. */
351 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
353 /* This sets the name of the slave side of the PTY. On SysVr4,
354 grantpt(3) forks a subprocess, so keep sigchld_handler() from
355 intercepting that death. If any child but grantpt's should die
356 within, it should be caught after sigrelse(2). */
358 #define PTY_TTY_NAME_SPRINTF \
360 char *ptsname(), *ptyname; \
362 sigblock(sigmask(SIGCLD)); \
363 if (grantpt(fd) == -1) \
364 fatal("could not grant slave pty"); \
365 sigunblock(sigmask(SIGCLD)); \
366 if (unlockpt(fd) == -1) \
367 fatal("could not unlock slave pty"); \
368 if (!(ptyname = ptsname(fd))) \
369 fatal ("could not enable slave pty"); \
370 strncpy(pty_name, ptyname, sizeof(pty_name)); \
371 pty_name[sizeof(pty_name) - 1] = 0; \
374 /* Push various streams modules onto a PTY channel. */
376 #define SETUP_SLAVE_PTY \
377 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
378 fatal ("ioctl I_PUSH ptem", errno); \
379 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
380 fatal ("ioctl I_PUSH ldterm", errno); \
381 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
382 fatal ("ioctl I_PUSH ttcompat", errno);
385 #define C_COMPILER \
386 TARGET_BINARY_INTERFACE=m88kdguxelf gcc -traditional
388 #define LINKER \
389 TARGET_BINARY_INTERFACE=m88kdguxelf gcc
391 #define MAKE_COMMAND \
392 TARGET_BINARY_INTERFACE=m88kdguxelf make
394 #define C_DEBUG_SWITCH -g -V2 -mversion-03.00 -mstandard
395 #endif /* COFF */
397 /* Extra stuff which probably should be someplace else but is here out
398 of expediency. */
400 #define LIB_X11_LIB -lX11
402 /* Process groups work in the traditional BSD manner. */
404 #define BSD_PGRPS