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