XEmacs 21.2-b1
[chise/xemacs-chise.git.1] / 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 XEmacs; see the file COPYING.  If not, write to
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 /* Synched up with: FSF 19.31. */
23
24 /*
25  *      Define symbols to identify the version of Unix this is.
26  *      Define all the symbols that apply correctly.
27  */
28
29 /* #define UNIPLUS */
30 /* #define USG5 */
31 /* #define USG */
32 /* #define HPUX */
33 /* #define UMAX */
34 /* #define BSD4_1 */
35 #define BSD4_2
36 #define BSD4_3
37 #define BSD4_4
38 #define BSD
39
40 /* SYSTEM_TYPE should indicate the kind of system you are using.
41  It sets the Lisp variable system-type.  */
42
43 #define SYSTEM_TYPE "dgux"
44
45 /* XEmacs: There is apparently a bug in DGUX involving a SIGTTOU getting
46    sent to the process if a background write is attempted when we're
47    started under a job-control shell, if we turn on FASYNC (which we
48    do when SIGIO is working).  So don't use SIGIO. */
49 #define BROKEN_SIGIO
50
51 /*
52  *      Define HAVE_UNIX_DOMAIN if the system supports Unix
53  *      domain sockets.
54  */
55
56 #define HAVE_UNIX_DOMAIN
57
58 /*
59  *      Define HAVE_PTYS if the system supports pty devices.
60  */
61
62 #define HAVE_PTYS
63
64 /* If your system uses COFF (Common Object File Format) then define the
65    preprocessor symbol "COFF".
66
67    DGUX can use either COFF or ELF; the default is ELF.
68    To compile for COFF (or BCS) use the TARGET_BINARY_INTERFACE
69    environment variable.   */
70
71 #if defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET)
72 #undef ELF
73 #ifndef COFF
74 #define COFF
75 #endif  /* COFF */
76 #else   /* defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET) */
77 #undef COFF
78 #ifndef ELF
79 #define ELF
80 #endif  /* ELF */
81 #endif  /* defined(_DGUXCOFF_TARGET) || defined(_DGUXBCS_TARGET) */
82
83 #ifndef COFF /* People will probably find this apparently unreliable
84                 till the NFS dumping bug is fixed.  */
85
86 /* It is possible to undump to ELF with DG/UX 5.4, but for revisions below
87    5.4.1 the undump MUST be done on a local file system, or the kernel will
88    panic.  ELF executables have the advantage of using shared libraries,
89    while COFF executables will still work on 4.2x systems. */
90
91 #define UNEXEC "unexelf.o"
92
93 /* This makes sure that all segments in the executable are undumped,
94    not just text, data, and bss.  In the case of Mxdb and shared
95    libraries, additional information is stored in other sections.
96    It does not hurt to have this defined if you don't use Mxdb or
97    shared libraries.  In fact, it makes no difference. */
98
99 /* Necessary for shared libraries and Mxdb debugging information. */
100 #define USG_SHARED_LIBRARIES
101 #endif
102
103 /* define MAIL_USE_FLOCK if the mailer uses flock
104    to interlock access to /usr/spool/mail/$USER.
105    The alternative is that a lock file named
106    /usr/spool/mail/$USER.lock.  */
107
108 /* #define MAIL_USE_FLOCK */
109
110 /* Define a replacement for the baud rate switch, since DG/UX uses a different
111    from BSD.  */
112
113 #define BAUD_CONVERT    { 0, 110, 134, 150, 300, 600, 1200, 1800, 2400, \
114                           4800, 9600, 19200, 38400 }
115
116 /*
117  *      Make WM Interface Compliant.
118  */
119
120 #define XICCC
121
122 /* Here, on a separate page, add any special hacks needed
123    to make Emacs work on this system.  For example,
124    you might define certain system call names that don't
125    exist on your system, or that do different things on
126    your system and must be used only through an encapsulation
127    (Which you should place, by convention, in sysdep.c).  */
128 \f
129 /* DG/UX SPECIFIC ADDITIONS TO TEMPLATE FOLLOW: */
130
131 /* Use the Berkeley flavors of the library routines, instead of System V.  */
132
133 #define setpgrp(pid, pgrp) setpgrp2 (pid, pgrp)
134 #define getpgrp(pid) getpgrp2 (pid)
135
136 /* Use TERMINFO instead of termcap */
137
138 #define TERMINFO
139
140 /*
141  *      Use a Berkeley style sys/wait.h.
142  *      This makes WIF* macros operate on structures instead of ints.
143  */
144
145 #define _BSD_WAIT_FLAVOR
146
147 /* #define SYSTEM_MALLOC */
148
149 /* MAKING_MAKEFILE must be defined in "ymakefile" before including config.h */
150 #ifndef NOT_C_CODE
151
152 /* Define this if you use System 5 Release 4 Streams */
153
154 #define INTERRUPTIBLE_OPEN
155 #define INTERRUPTIBLE_CLOSE
156 /* can't hurt to define these, even though read/write should auto restart */
157 #define INTERRUPTIBLE_IO
158
159 #endif /* not NOT_C_CODE */
160
161 #ifndef __GNUC__
162 #error You must use GCC to compile Emacs on DGUX
163 #endif
164
165 #define ORDINARY_LINK
166 #define START_FILES "pre-crt0.o"
167 #define LIB_GCC "/usr/lib/gcc/libgcc.a"
168
169 #ifdef _M88KBCS_TARGET
170 /* Karl Berry says: the environment
171    recommended by gcc (88/open, a.k.a. m88kbcs) doesn't support some system
172    functions, and gcc doesn't make it easy to switch environments.  */
173 #define NO_GET_LOAD_AVG
174 #endif
175 \f
176 /* definitions for xmakefile production */
177 #ifdef COFF
178
179 /* Define the following to use all of the available pty's. */
180
181 #define PTY_ITERATION                                           \
182   for (c = 'p'; c < 't'; c++)                                   \
183     for (i = 0; (((c == 'p') && (i < 64)) || ((c != 'p') && (i < 16))); i++)
184
185 #define PTY_NAME_SPRINTF                                        \
186       if (c == 'p')                                             \
187         sprintf (pty_name, "/dev/pty%c%d", c, i);               \
188       else                                                      \
189         sprintf (pty_name, "/dev/pty%c%x", c, i);
190
191 #define PTY_TTY_NAME_SPRINTF                                    \
192       if (c == 'p')                                             \
193         sprintf (pty_name, "/dev/tty%c%d", c, i);               \
194       else                                                      \
195         sprintf (pty_name, "/dev/tty%c%x", c, i);
196
197 #define C_DEBUG_SWITCH "-g"
198
199 #else /* not COFF */
200
201 /* We are generating ELF object format.  This makes the system more
202    SVR4 like. */
203
204 #define SVR4
205
206 /* Pseudo-terminal support under SVR4 only loops to deal with errors. */
207
208 #define PTY_ITERATION for (i = 0; i < 1; i++)
209
210 /* This sets the name of the master side of the PTY. */
211
212 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
213
214 /* This sets the name of the slave side of the PTY.  On SysVr4,
215    grantpt(3) forks a subprocess, so keep sigchld_handler() from
216    intercepting that death.  If any child but grantpt's should die
217    within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
218
219 #define PTY_TTY_NAME_SPRINTF                            \
220   {                                                     \
221     char *ptyname;                                      \
222                                                         \
223     EMACS_BLOCK_SIGCHLD;                                \
224     if (grantpt (fd) == -1)                             \
225       { close (fd); return -1; }                        \
226     EMACS_UNBLOCK_SIGCHLD;                              \
227     if (unlockpt (fd) == -1)                            \
228       { close (fd); return -1; }                        \
229     if (!(ptyname = ptsname (fd)))                      \
230       { close (fd); return -1; }                        \
231     strncpy (pty_name, ptyname, sizeof (pty_name));     \
232     pty_name[sizeof (pty_name) - 1] = 0;                \
233   }
234
235 /* Push various streams modules onto a PTY channel. */
236
237 #define SETUP_SLAVE_PTY \
238   if (ioctl (xforkin, I_PUSH, "ptem") == -1)    \
239     fatal ("ioctl I_PUSH ptem", errno);         \
240   if (ioctl (xforkin, I_PUSH, "ldterm") == -1)  \
241     fatal ("ioctl I_PUSH ldterm", errno);       \
242   if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
243     fatal ("ioctl I_PUSH ttcompat", errno);
244
245 #ifdef __GNUC__
246 #define C_DEBUG_SWITCH "-g -V2 -mversion-03.00 -mstandard"
247 #endif
248
249 #endif /* ELF */
250
251 /* Formerly "BSD_PGRPS" */
252
253 #define SIGIO_REQUIRES_SEPARATE_PROCESS_GROUP