summaryrefslogtreecommitdiff
path: root/src/s
diff options
context:
space:
mode:
Diffstat (limited to 'src/s')
-rw-r--r--src/s/aix3-1.h232
-rw-r--r--src/s/bsd4-3.h129
-rw-r--r--src/s/hpux.h260
-rw-r--r--src/s/hpux8.h13
-rw-r--r--src/s/iris3-6.h193
-rw-r--r--src/s/isc2-2.h13
-rw-r--r--src/s/rtu.h172
-rw-r--r--src/s/sunos4shr.h30
-rw-r--r--src/s/template.h143
-rw-r--r--src/s/usg5-3.h215
-rw-r--r--src/s/usg5-4.h163
11 files changed, 1563 insertions, 0 deletions
diff --git a/src/s/aix3-1.h b/src/s/aix3-1.h
new file mode 100644
index 00000000000..366ef832ed9
--- /dev/null
+++ b/src/s/aix3-1.h
@@ -0,0 +1,232 @@
+/* Definitions file for GNU Emacs running on IBM AIX version 3.1
+ Copyright (C) 1985, 1986 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY. No author or distributor
+accepts responsibility to anyone for the consequences of using it
+or for whether it serves any particular purpose or works at all,
+unless he says so in writing. Refer to the GNU Emacs General Public
+License for full details.
+
+Everyone is granted permission to copy, modify and redistribute
+GNU Emacs, but only under the conditions described in the
+GNU Emacs General Public License. A copy of this license is
+supposed to have been given to you along with GNU Emacs so you
+can know your rights and responsibilities. It should be in a
+file named COPYING. Among other things, the copyright notice
+and this notice must be preserved on all copies. */
+
+
+/*
+ * Define symbols to identify the version of Unix this is.
+ * Define all the symbols that apply correctly.
+ */
+
+#define USG /* System III, System V, etc */
+#define USG5
+
+/* Specify IBM AIX version of system */
+
+#ifndef AIX
+#define AIX
+#endif
+
+/* turn off c prototypes */
+#ifndef _NO_PROTO
+#define _NO_PROTO
+#endif
+
+/* This symbol should be defined on AIX Version 3 ??????? */
+#ifndef _AIX
+#define _AIX
+#endif
+
+/* Specify "_BSD" to invoke Berkeley compatibility in header files */
+/*#ifndef _BSD
+#define _BSD
+#endif
+*/
+
+/* SYSTEM_TYPE should indicate the kind of system you are using.
+ It sets the Lisp variable system-type. */
+
+#define SYSTEM_TYPE "aix-v3"
+
+
+/* nomultiplejobs should be defined if your system's shell
+ does not have "job control" (the ability to stop a program,
+ run some other program, then continue the first one). */
+
+/* #define NOMULTIPLEJOBS */
+
+/* Default is to set interrupt_input to 0: don't do input buffering within Emacs */
+
+/* #define INTERRUPT_INPUT */
+
+/* Letter to use in finding device name of first pty,
+ if system supports pty's. 'p' means it is /dev/ptyp0 */
+
+#define FIRST_PTY_LETTER 'p'
+
+/*
+ * Define HAVE_TERMIO if the system provides sysV-style ioctls
+ * for terminal control.
+ */
+
+#define HAVE_TERMIO
+
+/*
+ * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
+ * Look in <sys/time.h> for a timeval structure.
+ */
+
+#define HAVE_TIMEVAL
+
+/*
+ * Define HAVE_SELECT if the system supports the `select' system call.
+ */
+
+#define HAVE_SELECT
+
+/*
+ * Define HAVE_PTYS if the system supports pty devices.
+ */
+
+#define HAVE_PTYS
+
+/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
+
+#define HAVE_SOCKETS
+
+/*
+ * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
+ * The 4.2 opendir, etc., library functions.
+ */
+
+/* #define NONSYSTEM_DIR_LIBRARY */
+
+/*
+ * Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir
+ * library functions. Almost, but not quite the same as
+ * the 4.2 functions
+ */
+
+#define SYSV_SYSTEM_DIR
+
+/* Define this symbol if your system has the functions bcopy, etc. */
+
+#define BSTRING
+
+/* subprocesses should be defined if you want to
+ have code for asynchronous subprocesses
+ (as used in M-x compile and M-x shell).
+ This is supposed to work now on system V release 2. */
+
+#define subprocesses
+
+/* If your system uses COFF (Common Object File Format) then define the
+ preprocessor symbol "COFF". */
+
+/* #define COFF */
+
+/* define MAIL_USE_FLOCK if the mailer uses flock
+ to interlock access to /usr/spool/mail/$USER.
+ The alternative is that a lock file named
+ /usr/spool/mail/$USER.lock. */
+
+/* #define MAIL_USE_FLOCK */
+
+/* Define CLASH_DETECTION if you want lock files to be written
+ so that Emacs can tell instantly when you try to modify
+ a file that someone else has modified in his Emacs. */
+
+/* #define CLASH_DETECTION */
+
+/* Define SHORTNAMES if the C compiler can distinguish only
+ short names. It means that the stuff in ../shortnames
+ must be run to convert the long names to short ones. */
+
+/* #define SHORTNAMES */
+
+/* We do NOT use the Berkeley (and usg5.2.2) interface to nlist. */
+
+/* #define NLIST_STRUCT */
+
+/* The file containing the kernel's symbol table is called /unix. */
+
+#define KERNEL_FILE "/unix"
+
+/* The symbol in the kernel where the load average is found
+ is named avenrun. */
+
+#define LDAV_SYMBOL "avenrun"
+
+/* Special itemss needed to make Emacs run on this system. */
+
+/*
+ * Make the sigsetmask function go away. Don't know what the
+ * ramifications of this are, but doesn't seem possible to
+ * emulate it properly anyway at this point.
+ */
+
+#define sigsetmask(mask) /* Null expansion */
+
+/* setjmp and longjmp can safely replace _setjmp and _longjmp,
+ but they will run slower. */
+
+#define _setjmp setjmp
+#define _longjmp longjmp
+
+/* On USG systems the system calls are interruptable by signals
+ that the user program has elected to catch. Thus the system call
+ must be retried in these cases. To handle this without massive
+ changes in the source code, we remap the standard system call names
+ to names for our own functions in sysdep.c that do the system call
+ with retries. */
+
+#define read sys_read
+#define open sys_open
+#define write sys_write
+
+#define INTERRUPTIBLE_OPEN
+#define INTERRUPTIBLE_IO
+
+/* On USG systems these have different names */
+
+#define index strchr
+#define rindex strrchr
+
+/* USG systems tend to put everything declared static
+ into the initialized data area, which becomes pure after dumping Emacs.
+ Foil this. Emacs carefully avoids static vars inside functions. */
+
+#undef static
+
+/* Compiler bug bites on many systems when default ADDR_CORRECT is used. */
+
+/* #define ADDR_CORRECT(x) (x) */
+
+#define LD_CMD cc
+
+/* Prevent -lg from being used for debugging. Not needed. */
+
+#define LIBS_DEBUG
+
+/* No need to specify -lc when linking. */
+
+#define LIB_STANDARD
+
+/* Use terminfo instead of termcap. */
+
+#define TERMINFO
+
+/* The following definition seems to be needed in AIX version 3.1.6.8.
+ It may not have been needed in certain earlier versions. */
+#define HAVE_TCATTR
+
+#define SYSTEM_MALLOC
+
+
+
diff --git a/src/s/bsd4-3.h b/src/s/bsd4-3.h
new file mode 100644
index 00000000000..e9754af045a
--- /dev/null
+++ b/src/s/bsd4-3.h
@@ -0,0 +1,129 @@
+/* Definitions file for GNU Emacs running on bsd 4.3
+ Copyright (C) 1985, 1986 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+
+/*
+ * Define symbols to identify the version of Unix this is.
+ * Define all the symbols that apply correctly.
+ */
+
+#ifndef BSD4_3
+#define BSD 43 /* 4.3 * 10, as cpp doesn't do floats */
+#endif /* BSD4_3 */
+
+#ifndef BSD
+#define BSD4_3 1
+#endif /* BSD */
+
+/* SYSTEM_TYPE should indicate the kind of system you are using.
+ It sets the Lisp variable system-type. */
+
+#define SYSTEM_TYPE "berkeley-unix"
+
+/* nomultiplejobs should be defined if your system's shell
+ does not have "job control" (the ability to stop a program,
+ run some other program, then continue the first one). */
+
+/* #define NOMULTIPLEJOBS */
+
+/* Do not use interrupt_input = 1 by default, because in 4.3
+ we can make noninterrupt input work properly. */
+
+#undef INTERRUPT_INPUT
+
+/* First pty name is /dev/ptyp0. */
+
+#define FIRST_PTY_LETTER 'p'
+
+/*
+ * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
+ * Look in <sys/time.h> for a timeval structure.
+ */
+
+#define HAVE_TIMEVAL
+
+/*
+ * Define HAVE_SELECT if the system supports the `select' system call.
+ */
+
+#define HAVE_SELECT
+
+/*
+ * Define HAVE_PTYS if the system supports pty devices.
+ */
+
+#define HAVE_PTYS
+
+/* Define this macro if system defines a type `union wait'. */
+
+#define HAVE_UNION_WAIT
+
+/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
+
+#define HAVE_SOCKETS
+
+/*
+ * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
+ * The 4.2 opendir, etc., library functions.
+ */
+
+/* #define NONSYSTEM_DIR_LIBRARY */
+
+/* Define this symbol if your system has the functions bcopy, etc. */
+
+#define BSTRING
+
+/* subprocesses should be defined if you want to
+ have code for asynchronous subprocesses
+ (as used in M-x compile and M-x shell).
+ This is generally OS dependent, and not supported
+ under most USG systems. */
+
+#define subprocesses
+
+/* If your system uses COFF (Common Object File Format) then define the
+ preprocessor symbol "COFF". */
+
+/* #define COFF */
+
+/* define MAIL_USE_FLOCK if the mailer uses flock
+ to interlock access to /usr/spool/mail/$USER.
+ The alternative is that a lock file named
+ /usr/spool/mail/$USER.lock. */
+
+#define MAIL_USE_FLOCK
+
+/* Define CLASH_DETECTION if you want lock files to be written
+ so that Emacs can tell instantly when you try to modify
+ a file that someone else has modified in his Emacs. */
+
+#define CLASH_DETECTION
+
+/* We use the Berkeley (and usg5.2.2) interface to nlist. */
+
+#define NLIST_STRUCT
+
+/* The file containing the kernel's symbol table is called /vmunix. */
+
+#define KERNEL_FILE "/vmunix"
+
+/* The symbol in the kernel where the load average is found
+ is named _avenrun. */
+
+#define LDAV_SYMBOL "_avenrun"
diff --git a/src/s/hpux.h b/src/s/hpux.h
new file mode 100644
index 00000000000..5920a1c2180
--- /dev/null
+++ b/src/s/hpux.h
@@ -0,0 +1,260 @@
+/* Definitions file for GNU Emacs running on HPUX release 7.0.
+ Based on AT&T System V.2.
+ Copyright (C) 1985, 1986 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+
+/*
+ * Define symbols to identify the version of Unix this is.
+ * Define all the symbols that apply correctly.
+ */
+
+#define USG /* System III, System V, etc */
+
+#define USG5
+
+#define HPUX
+
+/* SYSTEM_TYPE should indicate the kind of system you are using.
+ It sets the Lisp variable system-type. */
+
+#define SYSTEM_TYPE "hpux"
+
+/* `nomultiplejobs' should be defined if your system's shell
+ does not have "job control" (the ability to stop a program,
+ run some other program, then continue the first one).
+
+ On hpux this depends on the precise kind of machine in use,
+ so the m- file defines this symbol if appropriate. */
+
+/* Default is to set interrupt_input to 0: don't do input buffering within Emacs */
+
+/* #define INTERRUPT_INPUT */
+
+/* Letter to use in finding device name of first pty,
+ if system supports pty's. 'p' means it is /dev/ptym/ptyp0 */
+
+#define FIRST_PTY_LETTER 'p'
+
+/*
+ * Define HAVE_TERMIO if the system provides sysV-style ioctls
+ * for terminal control.
+ */
+
+#define HAVE_TERMIO
+
+/* Says to include time.h, and not include sys/time.h. */
+
+#define NEED_TIME_H
+
+/*
+ * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
+ * Look in <sys/time.h> for a timeval structure.
+ */
+
+#define HAVE_TIMEVAL
+
+/* With HAVE_TIMEVAL define, Emacs expects to use `utimes'.
+ But HPUX does not have one. */
+
+#define MISSING_UTIMES
+
+/*
+ * Define HAVE_SELECT if the system supports the `select' system call.
+ */
+
+#define HAVE_SELECT
+
+/*
+ * Define HAVE_PTYS if the system supports pty devices.
+ */
+
+#define HAVE_PTYS
+
+/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
+
+#define HAVE_SOCKETS
+
+/*
+ * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
+ * The 4.2 opendir, etc., library functions.
+ */
+
+/* #define NONSYSTEM_DIR_LIBRARY */
+
+/* Define this symbol if your system has the functions bcopy, etc.
+ * s800 and later versions of s300 (s200) kernels have equivilents
+ * of the BSTRING functions of BSD. If your s200 kernel doesn't have
+ * em comment out this section.
+ */
+
+#define BSTRING
+
+/* subprocesses should be defined if you want to
+ have code for asynchronous subprocesses
+ (as used in M-x compile and M-x shell).
+ This is generally OS dependent, and not supported
+ under most USG systems. */
+
+#define subprocesses
+
+/* If your system uses COFF (Common Object File Format) then define the
+ preprocessor symbol "COFF". */
+
+/* #define COFF */
+
+/* define MAIL_USE_FLOCK if the mailer uses flock
+ to interlock access to /usr/spool/mail/$USER.
+ The alternative is that a lock file named
+ /usr/spool/mail/$USER.lock. */
+
+/* #define MAIL_USE_FLOCK */
+
+/* Say we have the SYSV style of interprocess communication. */
+
+#define HAVE_SYSVIPC
+
+/* Define CLASH_DETECTION if you want lock files to be written
+ so that Emacs can tell instantly when you try to modify
+ a file that someone else has modified in his Emacs. */
+
+/* #define CLASH_DETECTION */
+
+/* Define SHORTNAMES if the C compiler can distinguish only
+ short names. It means that the stuff in ../shortnames
+ must be run to convert the long names to short ones.
+
+ Some USG systems support long names.
+ If yours is one, DO NOT change this file!
+ Do #undef SHORTNAMES in the m- file or in config.h. */
+
+/* #define SHORTNAMES */
+
+/* We use the Berkeley (and usg5.2.2) interface to nlist. */
+
+#define NLIST_STRUCT
+
+/* The file containing the kernel's symbol table is called /hp-ux. */
+
+#define KERNEL_FILE "/hp-ux"
+
+/* The symbol in the kernel where the load average is found
+ depends on the cpu type, so we let the m- files define LDAV_SYMBOL. */
+
+/* Special hacks needed to make Emacs run on this system. */
+
+/*
+ * Make the sigsetmask function go away. Don't know what the
+ * ramifications of this are, but doesn't seem possible to
+ * emulate it properly anyway at this point.
+ */
+
+/* HPUX has sigsetmask */
+/* #define sigsetmask(mask) / * Null expansion * / */
+
+/* setjmp and longjmp can safely replace _setjmp and _longjmp,
+ but they will run slower. */
+
+/* HP-UX has _setjmp and _longjmp */
+/*
+#define _setjmp setjmp
+#define _longjmp longjmp
+*/
+
+/* On USG systems the system calls are interruptable by signals
+ that the user program has elected to catch. Thus the system call
+ must be retried in these cases. To handle this without massive
+ changes in the source code, we remap the standard system call names
+ to names for our own functions in sysdep.c that do the system call
+ with retries. */
+
+#define read sys_read
+#define open sys_open
+#define write sys_write
+
+#define INTERRUPTIBLE_OPEN
+#define INTERRUPTIBLE_IO
+
+/* Use the system provided termcap(3) library */
+#define TERMINFO
+
+/* The 48-bit versions are more winning for Emacs. */
+
+#define rand lrand48
+#define srand srand48
+
+/* In hpux, the symbol SIGIO is defined, but the feature
+ does not really exist.
+
+ Here we assume that signal.h is included before config.h
+ so that we can override it here. */
+
+#undef SIGIO
+
+/* USG systems tend to put everything declared static
+ into the initialized data area, which becomes pure after dumping Emacs.
+ Foil this. Emacs carefully avoids static vars inside functions. */
+
+#define static
+
+/* Define extra libraries to load.
+ This should have -lBSD, but that library is said to make
+ `signal' fail to work. */
+
+#ifdef HPUX_NET
+#define LIBS_SYSTEM -ln
+#else
+#define LIBS_SYSTEM
+#endif
+
+/* Some additional system facilities exist. */
+
+#define HAVE_DUP2
+#define HAVE_GETTIMEOFDAY
+#define HAVE_VFORK
+#define HAVE_PERROR /* Delete this line for version 6. */
+
+/* The following maps shared exec file to demand loaded exec.
+ Don't do this as demand loaded exec is broken in hpux. */
+
+#if 0
+
+/* Adjust a header field for the executable file about to be dumped. */
+
+#define ADJUST_EXEC_HEADER \
+ hdr.a_magic = ((ohdr.a_magic.file_type == OLDMAGIC.file_type) ? \
+ NEWMAGIC : ohdr.a_magic);
+
+#endif
+
+/* Baud-rate values in tty status have nonstandard meanings. */
+
+#define BAUD_CONVERT \
+{ 0, 50, 75, 110, 135, 150, 200, 300, 600, 900, 1200, \
+ 1800, 2400, 3600, 4800, 7200, 9600, 19200, 38400 }
+
+/* This is needed for HPUX version 6.2; it may not be needed for 6.2.1. */
+#define SHORT_CAST_BUG
+
+/* This is how to get the device name of the tty end of a pty. */
+#define PTY_TTY_NAME_SPRINTF \
+ sprintf (ptyname, "/dev/pty/tty%c%x", c, i);
+
+/* This is how to get the device name of the control end of a pty. */
+#define PTY_NAME_SPRINTF \
+ sprintf (ptyname, "/dev/ptym/pty%c%x", c, i);
diff --git a/src/s/hpux8.h b/src/s/hpux8.h
new file mode 100644
index 00000000000..ac047147295
--- /dev/null
+++ b/src/s/hpux8.h
@@ -0,0 +1,13 @@
+/* system description file for hpux version 8.
+ This contains changes that were suggested "for the hp700".
+ They were not needed for the 800.
+ Our conjecture that they are needed for hpux version 8,
+ which is what runs on the 700. */
+
+#include "hpux.h"
+
+#define LIB_X11_LIB -L/usr/lib/X11R4 -lX11
+#define C_SWITCH_SYSTEM -I/usr/include/X11R4
+
+/* Don't use shared libraries. unexec doesn't handle them. */
+#define LD_SWITCH_SYSTEM -a archive
diff --git a/src/s/iris3-6.h b/src/s/iris3-6.h
new file mode 100644
index 00000000000..d295fe30cb4
--- /dev/null
+++ b/src/s/iris3-6.h
@@ -0,0 +1,193 @@
+/* Definitions file for GNU Emacs running on Silicon Graphics system 3.6.
+ Copyright (C) 1987 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+
+/*
+ * Define symbols to identify the version of Unix this is.
+ * Define all the symbols that apply correctly.
+ */
+
+#define USG
+#define USG5
+#define IRIS
+
+/* SYSTEM_TYPE should indicate the kind of system you are using.
+ It sets the Lisp variable system-type. */
+
+#define SYSTEM_TYPE "irix"
+
+/* nomultiplejobs should be defined if your system's shell
+ does not have "job control" (the ability to stop a program,
+ run some other program, then continue the first one). */
+
+#define NOMULTIPLEJOBS
+
+/* Default is to set interrupt_input to 0: don't do input buffering within Emacs */
+
+/* #define INTERRUPT_INPUT */
+
+/* Letter to use in finding device name of first pty,
+ if system supports pty's. 'a' means it is /dev/ptya0 */
+
+#define FIRST_PTY_LETTER 'a'
+
+/*
+ * Define HAVE_TERMIO if the system provides sysV-style ioctls
+ * for terminal control.
+ */
+
+#define HAVE_TERMIO
+
+/*
+ * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
+ * Look in <sys/time.h> for a timeval structure.
+ */
+
+#define HAVE_TIMEVAL
+
+/* `utime' system call doesn't understand timevals. */
+
+#define IRIS_UTIME
+
+/*
+ * Define HAVE_SELECT if the system supports the `select' system call.
+ */
+
+#define HAVE_SELECT
+
+/*
+ * Define HAVE_PTYS if the system supports pty devices.
+ */
+
+#define HAVE_PTYS
+
+/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
+
+#define HAVE_SOCKETS
+
+/*
+ * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
+ * The 4.2 opendir, etc., library functions.
+ */
+
+/* #define NONSYSTEM_DIR_LIBRARY */
+
+/* Define this symbol if your system has the functions bcopy, etc. */
+
+#define BSTRING
+
+/* subprocesses should be defined if you want to
+ have code for asynchronous subprocesses
+ (as used in M-x compile and M-x shell).
+ This is generally OS dependent, and not supported
+ under most USG systems. */
+
+#define subprocesses
+
+/* If your system uses COFF (Common Object File Format) then define the
+ preprocessor symbol "COFF". */
+
+/* #define COFF */
+
+/* define MAIL_USE_FLOCK if the mailer uses flock
+ to interlock access to /usr/spool/mail/$USER.
+ The alternative is that a lock file named
+ /usr/spool/mail/$USER.lock. */
+
+/* #define MAIL_USE_FLOCK */
+
+/* Define CLASH_DETECTION if you want lock files to be written
+ so that Emacs can tell instantly when you try to modify
+ a file that someone else has modified in his Emacs. */
+
+/* #define CLASH_DETECTION */
+
+/* We use the Berkeley (and usg5.2.2) interface to nlist. */
+
+#define NLIST_STRUCT
+
+/* The file containing the kernel's symbol table is called /vmunix. */
+
+#define KERNEL_FILE "/vmunix"
+
+/* The symbol in the kernel where the load average is found
+ is named _avenrun. */
+
+#define LDAV_SYMBOL "_avenrun"
+
+
+/* Special hacks needed to make Emacs run on this system. */
+
+/*
+ * Make the sigsetmask function go away. Don't know what the
+ * ramifications of this are, but doesn't seem possible to
+ * emulate it properly anyway at this point.
+ */
+
+#define sigsetmask(mask) /* Null expansion */
+#define sigblock(x) x
+
+/* The IRIS defines SIGIO in signal.h, but doesn't implement it. */
+#undef SIGIO
+
+#define LIBS_MACHINE -lbsd -ldbm -lPW
+#define C_SWITCH_MACHINE -I/usr/include/bsd
+
+/* setjmp and longjmp can safely replace _setjmp and _longjmp,
+ but they will run slower. */
+
+#define _setjmp setjmp
+#define _longjmp longjmp
+
+/* On USG systems the system calls are interruptable by signals
+ that the user program has elected to catch. Thus the system call
+ must be retried in these cases. To handle this without massive
+ changes in the source code, we remap the standard system call names
+ to names for our own functions in sysdep.c that do the system call
+ with retries. */
+
+#define read sys_read
+#define open sys_open
+#define write sys_write
+
+#define INTERRUPTIBLE_OPEN
+#define INTERRUPTIBLE_IO
+
+/* On USG systems these have different names */
+
+#define index strchr
+#define rindex strrchr
+
+/* USG systems tend to put everything declared static
+ into the initialized data area, which becomes pure after dumping Emacs.
+ Foil this. Emacs carefully avoids static vars inside functions. */
+
+/* #define static */
+
+/* Compiler bug bites on many systems when default ADDR_CORRECT is used. */
+
+#define ADDR_CORRECT(x) (int)((char *)(x) - (char*)0)
+
+/* some errno.h's don't actually allocate the variable itself */
+
+#define NEED_ERRNO
+
+/* This is how to get the device name of the tty end of a pty. */
+#define PTY_TTY_NAME_SPRINTF \
+ sprintf (ptyname, "/dev/ttyq%d", minor (stb.st_rdev));
diff --git a/src/s/isc2-2.h b/src/s/isc2-2.h
new file mode 100644
index 00000000000..907974abd1f
--- /dev/null
+++ b/src/s/isc2-2.h
@@ -0,0 +1,13 @@
+/* system description file for Interactive (ISC) Unix version 2.2 on
+ the 386. */
+
+#include "usg5-3.h"
+
+#define HAVE_PTYS
+#define HAVE_RENAME
+#define HAVE_CLOSEDIR
+#define MAXNAMLEN 512
+#define LIB_STANDARD -lcposix -lc
+#define O_NDELAY O_NONBLOCK
+#define MEMORY_IN_STRING_H
+#undef SIGTSTP
diff --git a/src/s/rtu.h b/src/s/rtu.h
new file mode 100644
index 00000000000..273db7a3064
--- /dev/null
+++ b/src/s/rtu.h
@@ -0,0 +1,172 @@
+/* Definitions file for GNU Emacs running on RTU 3.0, ucb universe.
+ Copyright (C) 1986 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+
+/*
+ * Define symbols to identify the version of Unix this is.
+ * Define all the symbols that apply correctly.
+ */
+
+#define BSD4_2
+#define BSD
+#define RTU
+
+/* SYSTEM_TYPE should indicate the kind of system you are using.
+ It sets the Lisp variable system-type. */
+
+#define SYSTEM_TYPE "rtu"
+
+/* NOMULTIPLEJOBS should be defined if your system's shell
+ does not have "job control" (the ability to stop a program,
+ run some other program, then continue the first one). */
+
+#define NOMULTIPLEJOBS
+
+/* Emacs can read input using SIGIO and buffering characters itself,
+ or using CBREAK mode and making C-g cause SIGINT.
+ The choice is controlled by the variable interrupt_input.
+ Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
+
+ SIGIO can be used only on systems that implement it (4.2 and 4.3).
+ CBREAK mode has two disadvatages
+ 1) At least in 4.2, it is impossible to handle the Meta key properly.
+ I hear that in system V this problem does not exist.
+ 2) Control-G causes output to be discarded.
+ I do not know whether this can be fixed in system V.
+
+ Another method of doing input is planned but not implemented.
+ It would have Emacs fork off a separate process
+ to read the input and send it to the true Emacs process
+ through a pipe.
+*/
+
+#undef INTERRUPT_INPUT
+
+/* Letter to use in finding device name of first pty,
+ if system supports pty's. 'a' means it is /dev/ptya0 */
+
+#define FIRST_PTY_LETTER 'z' /* i.e. no PTY_LETTERs */
+
+/*
+ * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
+ * Look in <sys/time.h> for a timeval structure.
+ */
+
+#define HAVE_TIMEVAL
+
+/*
+ * Define HAVE_SELECT if the system supports the `select' system call.
+ */
+
+#define HAVE_SELECT
+
+/*
+ * Define HAVE_PTYS if the system supports pty devices.
+ */
+
+#define HAVE_PTYS
+
+/* Define this macro if system defines a type `union wait'. */
+
+#define HAVE_UNION_WAIT
+
+/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
+
+#define HAVE_SOCKETS
+
+/*
+ * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
+ * The 4.2 opendir, etc., library functions.
+ */
+
+#define NONSYSTEM_DIR_LIBRARY
+
+/* Define this symbol if your system has the functions bcopy, etc. */
+/* The system library bcopy() is broken in RTU. For one thing, it expects
+ the length to be less than 64k. */
+#undef BSTRING
+
+/* subprocesses should be defined if you want to
+ have code for asynchronous subprocesses
+ (as used in M-x compile and M-x shell).
+ This is generally OS dependent, and not supported
+ under most USG systems. */
+
+#define subprocesses
+
+/* If your system uses COFF (Common Object File Format) then define the
+ preprocessor symbol "COFF". */
+
+#undef COFF
+
+/* define MAIL_USE_FLOCK if the mailer uses flock
+ to interlock access to /usr/spool/mail/$USER.
+ The alternative is that a lock file named
+ /usr/spool/mail/$USER.lock. */
+
+#undef MAIL_USE_FLOCK
+
+/* Define CLASH_DETECTION if you want lock files to be written
+ so that Emacs can tell instantly when you try to modify
+ a file that someone else has modified in his Emacs. */
+
+#undef CLASH_DETECTION
+
+/* We use the Berkeley (and usg5.2.2) interface to nlist. */
+
+#define NLIST_STRUCT
+
+/* The symbol in the kernel where the load average is found
+ is named _avenrun. */
+
+#define LDAV_SYMBOL "_avenrun"
+
+/* Special hacks needed to make Emacs run on this system. */
+
+/* On RTU systems (like USG) the system calls are interruptable by signals
+ that the user program has elected to catch. Thus the system call
+ must be retried in these cases. To handle this without massive
+ changes in the source code, we remap the standard system call names
+ to names for our own functions in sysdep.c that do the system call
+ with retries. */
+
+#define read sys_read
+#define open sys_open
+#define write sys_write
+
+#define INTERRUPTIBLE_OPEN
+#define INTERRUPTIBLE_IO
+
+/* The "fsync" call on RTU versions 3.0 and 3.1 is badly broken!
+ This hack below isn't the best solution, but without it this
+ program will cause the whole system to hang! !@#$#%$ Masscomp! */
+
+#define fsync(x) 0 /* "Comment out" fsync calls */
+
+/* RTU has IPC instead of Unix-domain sockets. */
+
+#define HAVE_SYSVIPC
+
+/* This is how to get the device name of the tty end of a pty. */
+#define PTY_TTY_NAME_SPRINTF \
+ sprintf (ptyname, "/dev/ttyp%x", i);
+
+/* This is how to get the device name of the control end of a pty. */
+#define PTY_NAME_SPRINTF \
+ sprintf (ptyname, "/dev/pty%x", i);
diff --git a/src/s/sunos4shr.h b/src/s/sunos4shr.h
new file mode 100644
index 00000000000..2b665513b19
--- /dev/null
+++ b/src/s/sunos4shr.h
@@ -0,0 +1,30 @@
+#include "bsd4-2.h"
+
+/* Say that the text segment of a.out includes the header;
+ the header actually occupies the first few bytes of the text segment
+ and is counted in hdr.a_text. */
+
+#define O_NDELAY FNDELAY /* Non-blocking I/O (4.2 style) */
+
+/* In SunOS 4.1, a static function called by tzsetwall reportedly
+ clears the byte just past an eight byte region it mallocs, corrupting
+ GNU malloc's memory pool. But Sun's malloc doesn't seem to mind. */
+
+#define SYSTEM_MALLOC
+
+/* Misleading! Actually gets loaded after crt0.o */
+#define START_FILES pre-crt0.o
+
+/*
+ * Kludge! can't get at symbol "start" in std crt0.o
+ * Who the #$%&* decided to remove the __ characters!
+ * Someone needs to fix this in sysdep.c with an #ifdef BROKEN_START in
+ * sysdep.c. We do not use this address so any value should do really. Still
+ * may need it in the future?
+ */
+#define BROKEN_START
+#define TEXT_START 0x2020
+
+#define UNEXEC unexsunos4.o
+#define RUN_TIME_REMAP
+#define LD_CMD cc
diff --git a/src/s/template.h b/src/s/template.h
new file mode 100644
index 00000000000..6cf4905db3e
--- /dev/null
+++ b/src/s/template.h
@@ -0,0 +1,143 @@
+/* Template for system description header files.
+ This file describes the parameters that system description files
+ should define or not.
+ Copyright (C) 1985, 1986 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+
+/*
+ * Define symbols to identify the version of Unix this is.
+ * Define all the symbols that apply correctly.
+ */
+
+/* #define UNIPLUS */
+/* #define USG5 */
+/* #define USG */
+/* #define HPUX */
+/* #define UMAX */
+/* #define BSD4_1 */
+/* #define BSD4_2 */
+/* #define BSD4_3 */
+/* #define BSD */
+/* #define VMS */
+
+/* SYSTEM_TYPE should indicate the kind of system you are using.
+ It sets the Lisp variable system-type. */
+
+#define SYSTEM_TYPE "berkeley-unix"
+
+/* NOMULTIPLEJOBS should be defined if your system's shell
+ does not have "job control" (the ability to stop a program,
+ run some other program, then continue the first one). */
+
+/* #define NOMULTIPLEJOBS */
+
+/* Emacs can read input using SIGIO and buffering characters itself,
+ or using CBREAK mode and making C-g cause SIGINT.
+ The choice is controlled by the variable interrupt_input.
+ Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
+
+ SIGIO can be used only on systems that implement it (4.2 and 4.3).
+ CBREAK mode has two disadvatages
+ 1) At least in 4.2, it is impossible to handle the Meta key properly.
+ I hear that in system V this problem does not exist.
+ 2) Control-G causes output to be discarded.
+ I do not know whether this can be fixed in system V.
+
+ Another method of doing input is planned but not implemented.
+ It would have Emacs fork off a separate process
+ to read the input and send it to the true Emacs process
+ through a pipe.
+*/
+
+#define INTERRUPT_INPUT
+
+/* Letter to use in finding device name of first pty,
+ if system supports pty's. 'a' means it is /dev/ptya0 */
+
+#define FIRST_PTY_LETTER 'a'
+
+/*
+ * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
+ * Look in <sys/time.h> for a timeval structure.
+ */
+
+#define HAVE_TIMEVAL
+
+/*
+ * Define HAVE_SELECT if the system supports the `select' system call.
+ */
+
+/* #define HAVE_SELECT */
+
+/*
+ * Define HAVE_PTYS if the system supports pty devices.
+ */
+
+#define HAVE_PTYS
+
+/*
+ * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
+ * The 4.2 opendir, etc., library functions.
+ */
+
+#define NONSYSTEM_DIR_LIBRARY
+
+/* Define this symbol if your system has the functions bcopy, etc. */
+
+#define BSTRING
+
+/* subprocesses should be defined if you want to
+ have code for asynchronous subprocesses
+ (as used in M-x compile and M-x shell).
+ This is generally OS dependent, and not supported
+ under most USG systems. */
+
+#define subprocesses
+
+/* If your system uses COFF (Common Object File Format) then define the
+ preprocessor symbol "COFF". */
+
+/* #define COFF */
+
+/* define MAIL_USE_FLOCK if the mailer uses flock
+ to interlock access to /usr/spool/mail/$USER.
+ The alternative is that a lock file named
+ /usr/spool/mail/$USER.lock. */
+
+#define MAIL_USE_FLOCK
+
+/* Define CLASH_DETECTION if you want lock files to be written
+ so that Emacs can tell instantly when you try to modify
+ a file that someone else has modified in his Emacs. */
+
+#define CLASH_DETECTION
+
+/* Here, on a separate page, add any special hacks needed
+ to make Emacs work on this system. For example,
+ you might define certain system call names that don't
+ exist on your system, or that do different things on
+ your system and must be used only through an encapsulation
+ (Which you should place, by convention, in sysdep.c). */
+
+/* Some compilers tend to put everything declared static
+ into the initialized data area, which becomes pure after dumping Emacs.
+ On these systems, you must #define static as nothing to foil this.
+ Note that emacs carefully avoids static vars inside functions. */
+
+/* #define static */
diff --git a/src/s/usg5-3.h b/src/s/usg5-3.h
new file mode 100644
index 00000000000..c54ec479e65
--- /dev/null
+++ b/src/s/usg5-3.h
@@ -0,0 +1,215 @@
+/* Definitions file for GNU Emacs running on AT&T's System V Release 3
+ Copyright (C) 1987 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+
+/*
+ * Define symbols to identify the version of Unix this is.
+ * Define all the symbols that apply correctly.
+ */
+
+#define USG /* System III, System V, etc */
+
+#define USG5
+
+/* SYSTEM_TYPE should indicate the kind of system you are using.
+ It sets the Lisp variable system-type. */
+
+#define SYSTEM_TYPE "usg-unix-v"
+
+/* nomultiplejobs should be defined if your system's shell
+ does not have "job control" (the ability to stop a program,
+ run some other program, then continue the first one). */
+
+#define NOMULTIPLEJOBS
+
+/* Default is to set interrupt_input to 0: don't do input buffering within Emacs */
+
+/* #define INTERRUPT_INPUT */
+
+/* Letter to use in finding device name of first pty,
+ if system supports pty's. 'p' means it is /dev/ptyp0 */
+
+#define FIRST_PTY_LETTER 'p'
+
+/*
+ * Define HAVE_TERMIO if the system provides sysV-style ioctls
+ * for terminal control.
+ */
+
+#define HAVE_TERMIO
+
+/*
+ * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
+ * Look in <sys/time.h> for a timeval structure.
+ */
+
+/* #define HAVE_TIMEVAL */
+
+/*
+ * Define HAVE_SELECT if the system supports the `select' system call.
+ */
+
+/* #define HAVE_SELECT */
+
+/*
+ * Define HAVE_PTYS if the system supports pty devices.
+ */
+
+/* Some versions of V.3 have this, but not all.
+ #define HAVE_PTYS
+ #define SYSV_PTYS */
+
+/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
+
+/* #define HAVE_SOCKETS */
+
+/*
+ * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
+ * The 4.2 opendir, etc., library functions.
+ */
+
+/* #define NONSYSTEM_DIR_LIBRARY */
+
+/*
+ * Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir
+ * library functions. Almost, but not quite the same as
+ * the 4.2 functions
+ */
+#define SYSV_SYSTEM_DIR
+
+/* Define this symbol if your system has the functions bcopy, etc. */
+
+/* #define BSTRING */
+
+/* subprocesses should be defined if you want to
+ have code for asynchronous subprocesses
+ (as used in M-x compile and M-x shell).
+ This is supposed to work now on system V release 2. */
+
+#define subprocesses
+
+/* If your system uses COFF (Common Object File Format) then define the
+ preprocessor symbol "COFF". */
+
+#define COFF
+
+/* define MAIL_USE_FLOCK if the mailer uses flock
+ to interlock access to /usr/spool/mail/$USER.
+ The alternative is that a lock file named
+ /usr/spool/mail/$USER.lock. */
+
+/* #define MAIL_USE_FLOCK */
+
+/* Define CLASH_DETECTION if you want lock files to be written
+ so that Emacs can tell instantly when you try to modify
+ a file that someone else has modified in his Emacs. */
+
+/* #define CLASH_DETECTION */
+
+/* Define SHORTNAMES if the C compiler can distinguish only
+ short names. It means that the stuff in ../shortnames
+ must be run to convert the long names to short ones. */
+
+/* #define SHORTNAMES */
+
+/* We use the Berkeley (and usg5.2.2) interface to nlist. */
+
+#define NLIST_STRUCT
+
+/* The file containing the kernel's symbol table is called /unix. */
+
+#define KERNEL_FILE "/unix"
+
+/* The symbol in the kernel where the load average is found
+ is named avenrun. */
+
+#define LDAV_SYMBOL "avenrun"
+
+/* Define this if system V IPC is available. */
+
+#define HAVE_SYSVIPC
+
+/* Special hacks needed to make Emacs run on this system. */
+
+/*
+ * Make the sigsetmask function go away. Don't know what the
+ * ramifications of this are, but doesn't seem possible to
+ * emulate it properly anyway at this point.
+ */
+
+#define sigsetmask(mask) /* Null expansion */
+
+/* setjmp and longjmp can safely replace _setjmp and _longjmp,
+ but they will run slower. */
+
+#define _setjmp setjmp
+#define _longjmp longjmp
+
+/* On USG systems the system calls are interruptable by signals
+ that the user program has elected to catch. Thus the system call
+ must be retried in these cases. To handle this without massive
+ changes in the source code, we remap the standard system call names
+ to names for our own functions in sysdep.c that do the system call
+ with retries. */
+
+#define read sys_read
+#define write sys_write
+#define open sys_open
+#define close sys_close
+
+#define INTERRUPTIBLE_OPEN
+#define INTERRUPTIBLE_CLOSE
+#define INTERRUPTIBLE_IO
+
+/* On USG systems these have different names */
+
+#define index strchr
+#define rindex strrchr
+
+/* USG systems tend to put everything declared static
+ into the initialized data area, which becomes pure after dumping Emacs.
+ Foil this. Emacs carefully avoids static vars inside functions. */
+
+#define static
+
+/* Compiler bug bites on many systems when default ADDR_CORRECT is used. */
+
+#define ADDR_CORRECT(x) (x)
+
+/* Prevent -lg from being used for debugging. Not implemented? */
+
+#define LIBS_DEBUG
+
+/* Use terminfo instead of termcap. */
+
+#define TERMINFO
+
+/* X needs to talk on the network, so search the network library. */
+
+#define LIBX10_SYSTEM -lnsl_s
+#define LIBX11_SYSTEM -lnsl_s
+
+/* Some variants have TIOCGETC, but the structures to go with it
+ are not declared. */
+
+#define BROKEN_TIOCGETC
+
+/* Enable support for shared libraries in unexec. */
+
+#define USG_SHARED_LIBRARIES
diff --git a/src/s/usg5-4.h b/src/s/usg5-4.h
new file mode 100644
index 00000000000..817ff0644a8
--- /dev/null
+++ b/src/s/usg5-4.h
@@ -0,0 +1,163 @@
+/* Definitions file for GNU Emacs running on AT&T's System V Release 4
+ Copyright (C) 1987 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY. No author or distributor
+accepts responsibility to anyone for the consequences of using it
+or for whether it serves any particular purpose or works at all,
+unless he says so in writing. Refer to the GNU Emacs General Public
+License for full details.
+
+Everyone is granted permission to copy, modify and redistribute
+GNU Emacs, but only under the conditions described in the
+GNU Emacs General Public License. A copy of this license is
+supposed to have been given to you along with GNU Emacs so you
+can know your rights and responsibilities. It should be in a
+file named COPYING. Among other things, the copyright notice
+and this notice must be preserved on all copies. */
+
+/* This file written by James Van Artsdalen of Dell Computer Corporation.
+ * james@bigtex.cactus.org.
+ */
+
+/* Use the SysVr3 file for at least base configuration. */
+
+#include "usg5-3.h"
+
+#define USG5_4
+
+/* We do have multiple jobs. Handle ^Z. */
+
+#undef NOMULTIPLEJOBS
+
+/* If compiled by GNU C, we must have gnulib */
+
+#ifdef __GNUC__
+#define GNULIB /usr/local/lib/gcc-gnulib
+#define LIBS_DEBUG
+#else
+#define GNULIB
+#endif
+
+#define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
+
+#define LIB_STANDARD GNULIB -lsocket -lnsl -lelf -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
+
+#define DATA_SEG_BITS 0x08000000
+
+/* Use ptem.h to get structures related to windows. */
+
+#define NEED_PTEM_H
+
+/* Undump with ELF */
+
+#undef COFF
+
+#define UNEXEC unexelf.o
+
+/* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct
+ * tchars. But get <termio.h> first to make sure ttold.h doesn't
+ * interfere. And don't try to use SIGIO yet.
+ */
+
+#ifdef emacs
+#include <sys/filio.h>
+#include <termio.h>
+#include <sys/ttold.h>
+#include <signal.h>
+#undef SIGIO
+#endif
+
+/* libc has this stuff, but not utimes. */
+
+#define HAVE_RENAME
+#define HAVE_SELECT
+#define HAVE_TIMEVAL
+#define HAVE_CLOSEDIR
+#define HAVE_GETTIMEOFDAY
+#define HAVE_DUP2
+
+#define USE_UTIME
+
+/* <sys/stat.h> *defines* stat(2) as a static function. If "static"
+ * is blank, then many files will have a public definition for stat(2).
+ */
+
+#undef static
+
+/* We need bss_end from emacs.c for undumping */
+
+#ifndef USG_SHARED_LIBRARIES
+#define USG_SHARED_LIBRARIES
+#endif
+
+/* We can support this */
+
+#define CLASH_DETECTION
+
+#define HAVE_PTYS
+#define HAVE_SETSID
+
+/* It is possible to receive SIGCHLD when there are no children
+ waiting, because a previous waitsys(2) cleaned up the carcass of child
+ without clearing the SIGCHLD pending info. So, use a non-blocking
+ wait3 instead, which maps to waitpid(2) in SysVr4. */
+
+#define HAVE_WAIT_HEADER
+#define WAITTYPE int
+#define wait3(status, options, rusage) \
+ waitpid((pid_t) -1, (status), (options))
+#define WRETCODE(w) (w >> 8)
+
+/* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
+ subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and
+ this is all we need. */
+
+#define TIOCSIGSEND TIOCSIGNAL
+
+/* This change means that we don't loop through allocate_pty too many
+ times in the (rare) event of a failure. */
+
+#undef FIRST_PTY_LETTER
+#define FIRST_PTY_LETTER 'z'
+
+/* This sets the name of the master side of the PTY. */
+
+#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
+
+/* This sets the name of the slave side of the PTY. On SysVr4,
+ grantpt(3) forks a subprocess, so keep sigchld_handler() from
+ intercepting that death. If any child but grantpt's should die
+ within, it should be caught after sigrelse(2). */
+
+#define PTY_TTY_NAME_SPRINTF \
+ { \
+ char *ptsname(), *ptyname; \
+ \
+ sighold(SIGCLD); \
+ if (grantpt(fd) == -1) \
+ fatal("could not grant slave pty"); \
+ sigrelse(SIGCLD); \
+ if (unlockpt(fd) == -1) \
+ fatal("could not unlock slave pty"); \
+ if (!(ptyname = ptsname(fd))) \
+ fatal ("could not enable slave pty"); \
+ strncpy(pty_name, ptyname, sizeof(pty_name)); \
+ pty_name[sizeof(pty_name) - 1] = 0; \
+ }
+
+/* Push various streams modules onto a PTY channel. */
+
+#define SETUP_SLAVE_PTY \
+ if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
+ fatal ("ioctl I_PUSH ptem", errno); \
+ if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
+ fatal ("ioctl I_PUSH ldterm", errno); \
+ if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
+ fatal ("ioctl I_PUSH ttcompat", errno);
+
+/* The definition of this in usg5-3.h is not needed in 5.4. */
+
+#undef LIBX11_SYSTEM