]> code.delx.au - gnu-emacs/blobdiff - src/s/dgux.h
Typo in comment.
[gnu-emacs] / src / s / dgux.h
index 747afa65d6642515592f06890e9bed9c141c3cc0..4c4a84d9996d4187f095744a14aaa324450220f9 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions file for GNU Emacs running on Data General's DG/UX
-   version 4.32 and above.
-   Copyright (C) 1985, 1986, 1991 Free Software Foundation, Inc.
+   version 4.32 upto and including 5.4.1.
+   Copyright (C) 1994, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -16,8 +16,8 @@ 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.  */
-
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 /*
  *     Define symbols to identify the version of Unix this is.
@@ -33,13 +33,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define BSD4_2
 #define BSD4_3
 #define BSD4_4
-#define BSD
-#define SVR4
+#define BSD_SYSTEM
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
  It sets the Lisp variable system-type.  */
 
-#define SYSTEM_TYPE "dgc-unix"
+#define SYSTEM_TYPE "dgux"
 
 /* NOMULTIPLEJOBS should be defined if your system's shell
  does not have "job control" (the ability to stop a program,
@@ -63,33 +62,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
    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 '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_SETSID if the system supports POSIX disassociate
- *      terminal.
- */
-#define HAVE_SETSID
 /*
  *     Define HAVE_SOCKETS if the system supports sockets.
  */
@@ -100,7 +77,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  *     Define HAVE_UNIX_DOMAIN if the system supports Unix
  *      domain sockets.
  */
+
 #define HAVE_UNIX_DOMAIN
+
 /*
  *     Define HAVE_PTYS if the system supports pty devices.
  */
@@ -184,12 +163,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define        BAUD_CONVERT    { 0, 110, 134, 150, 300, 600, 1200, 1800, 2400, \
                          4800, 9600, 19200, 38400 }
 
-/*
- *     Define NLIST_STRUCT if the system has nlist.h
- */
-
-#define        NLIST_STRUCT
-
 /*
  *      Make WM Interface Compliant.
  */
@@ -226,12 +199,20 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #define        TERMINFO
 
+/*
+ *      Send signals to subprocesses using characters.
+ *
+ */
+
+#define SIGNALS_VIA_CHARACTERS
+
 /*
  *     Define HAVE_TERMIOS since this is POSIX,
- *     for terminal control.
+ *     for terminal control.  Prevent redundant inclusion of termio.h.
  */
 
 #define HAVE_TERMIOS
+#define NO_TERMIO
 
 /*
  *     Use a Berkeley style sys/wait.h.
@@ -244,12 +225,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  *      Use BSD and POSIX-style signals.  This is crucial!
  */
 
-/* pmr now says the GNU malloc works.  */
-/* pmr@rock.concert.net says Emacs fails without this.  We don't know why.  */
 /* #define SYSTEM_MALLOC */
 
 /* MAKING_MAKEFILE must be defined in "ymakefile" before including config.h */
-#ifndef THIS_IS_YMAKEFILE
+#ifndef NOT_C_CODE
 
 /* Make sure signal.h is included so macros below don't mess with it. */
 /* DG/UX include files prevent multiple inclusion. */
@@ -263,31 +242,20 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #define POSIX_SIGNALS
 
-/* Define this if you use System 5 Release 4 Streams */
-#define SYSV4_PTYS
-#define open  sys_open
-#define close sys_close
-#define read  sys_read
-#define write sys_write
-
-#define INTERRUPTIBLE_OPEN
-#define INTERRUPTIBLE_CLOSE
-/* can't hurt to define these, even though read/write should auto restart */
-#define INTERRUPTIBLE_IO
-
+#ifndef NO_DGUX_SIGNAL_REDEF
 /* Can't use sys_signal because then etc/server.c would need sysdep.o.  */
 extern struct sigaction act, oact;
 #define signal(SIG,FUNC) berk_signal(SIG,FUNC)
+#endif
 
-#else /* THIS_IS_YMAKEFILE */
-/* force gcc to be used */
-CC=gcc
-#endif /* not THIS_IS_YMAKEFILE */
+#endif /* not NOT_C_CODE */
+
+#ifndef __GNUC__
+#error You must use GCC to compiler Emascs on DGUX
+#endif
 
-#define LD_SWITCH_SYSTEM
-/* Cannot depend on /lib/crt0.o because make does not understand an elink(1) */
+#define ORDINARY_LINK
 #define START_FILES pre-crt0.o
-#define LIBS_SYSTEM -ldgc /lib/crt0.o
 #define LIB_GCC /usr/lib/gcc/libgcc.a
 
 #ifdef _M88KBCS_TARGET
@@ -299,41 +267,88 @@ CC=gcc
 \f
 /* definitions for xmakefile production */
 #ifdef COFF
-#define C_COMPILER \
-  TARGET_BINARY_INTERFACE=m88kdguxcoff gcc -traditional
-#define LINKER \
-  TARGET_BINARY_INTERFACE=m88kdguxcoff gcc -nostdlib
 
-#define MAKE_COMMAND \
-  TARGET_BINARY_INTERFACE=m88kdguxcoff make
+/* Define the following to use all of the available pty's. */
+
+#define PTY_ITERATION                                          \
+  for (c = 'p'; c < 't'; c++)                                  \
+    for (i = 0; (((c == 'p') && (i < 64)) || ((c != 'p') && (i < 16))); i++)
+
+#define PTY_NAME_SPRINTF                                       \
+      if (c == 'p')                                            \
+        sprintf (pty_name, "/dev/pty%c%d", c, i);              \
+      else                                                     \
+        sprintf (pty_name, "/dev/pty%c%x", c, i);
+
+#define PTY_TTY_NAME_SPRINTF                                   \
+      if (c == 'p')                                            \
+        sprintf (pty_name, "/dev/tty%c%d", c, i);              \
+      else                                                     \
+        sprintf (pty_name, "/dev/tty%c%x", c, i);
+
+#define C_DEBUG_SWITCH -g
 
-#define C_DEBUG_SWITCH
 #else /* not COFF */
 
-#define C_COMPILER \
-  TARGET_BINARY_INTERFACE=m88kdguxelf gcc -traditional
-#define LINKER \
-  TARGET_BINARY_INTERFACE=m88kdguxelf gcc -nostdlib
+/* We are generating ELF object format.  This makes the system more
+   SVR4 like. */
 
-#define MAKE_COMMAND \
-  TARGET_BINARY_INTERFACE=m88kdguxelf make
+#define SVR4
 
+/* Pseudo-terminal support under SVR4 only loops to deal with errors. */
+
+#define PTY_ITERATION for (i = 0; i < 1; i++)
+
+/* 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;                 \
+                                               \
+    sigblock(sigmask(SIGCLD));                         \
+    if (grantpt(fd) == -1)                     \
+      fatal("could not grant slave pty");      \
+    sigunblock(sigmask(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);
+
+#ifdef __GNUC__
 #define C_DEBUG_SWITCH -g -V2 -mversion-03.00 -mstandard
-#endif /* COFF */
-/* Define switches affecting x/ymakefile */
-#define C_OPTIMIZE_SWITCH
+#endif
+
+#endif /* ELF */
+
+/* Extra stuff which probably should be someplace else but is here out
+   of expediency. */
+
+#define LIB_X11_LIB -lX11
+#define LIB_MOTIF -lXm -lgen
 
-/* Paul M Reilly <pmr@rock.concert.net> writes:
-   On some systems (DGUX comes to mind real fast) FASYNC causes
-   background writes to the terminal to stop all processes in the
-   process group when invoked under the csh (and probably any shell
-   with job control). This stops Emacs dead in its tracks when coming
-   up under X11. */
-#define BROKEN_FASYNC
+/* Process groups work in the traditional BSD manner.  */
 
-/* (Assume) we do have vfork.  */
+#define BSD_PGRPS
 
-#define HAVE_VFORK
+/* arch-tag: 1b6d117d-82d2-4480-a6d0-3f7a8360f658
+   (do not change this comment) */