Annotation of GNUtools/emacs/src/s-usg5-4.h, revision 1.1

1.1     ! root        1: /* Definitions file for GNU Emacs running on AT&T's System V Release 4
        !             2:    Copyright (C) 1987, 1990 Free Software Foundation, Inc.
        !             3: 
        !             4: This file is part of GNU Emacs.
        !             5: 
        !             6: GNU Emacs is free software; you can redistribute it and/or modify
        !             7: it under the terms of the GNU General Public License as published by
        !             8: the Free Software Foundation; either version 1, or (at your option)
        !             9: any later version.
        !            10: 
        !            11: GNU Emacs is distributed in the hope that it will be useful,
        !            12: but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !            14: GNU General Public License for more details.
        !            15: 
        !            16: You should have received a copy of the GNU General Public License
        !            17: along with GNU Emacs; see the file COPYING.  If not, write to
        !            18: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
        !            19: 
        !            20: /* This file written by James Van Artsdalen of Dell Computer Corporation.
        !            21:  * [email protected].
        !            22:  */
        !            23: 
        !            24: /* Use the SysVr3 file for at least base configuration. */
        !            25: 
        !            26: #include "s-usg5-3.h"
        !            27: 
        !            28: #define USG5_4
        !            29: 
        !            30: /* We do have multiple jobs.  Handle ^Z. */
        !            31: 
        !            32: #undef NOMULTIPLEJOBS
        !            33: 
        !            34: #define LIBS_SYSTEM -lsocket -lnsl -lelf
        !            35: #define ORDINARY_LINK
        !            36: 
        !            37: #if 0 /* These should be unnecessary now because of ORDINARY_LINK.  */
        !            38: #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
        !            39: #define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
        !            40: #endif
        !            41: 
        !            42: /* No <sioctl.h> */
        !            43: 
        !            44: #define NO_SIOCTL_H
        !            45: 
        !            46: /* Undump with ELF */
        !            47: 
        !            48: #undef COFF
        !            49: 
        !            50: #define UNEXEC unexelf.o
        !            51: 
        !            52: /* Get FIONREAD from <sys/filio.h>.  Get <sys/ttold.h> to get struct
        !            53:  * tchars. But get <termio.h> first to make sure ttold.h doesn't
        !            54:  * interfere.  And don't try to use SIGIO yet.
        !            55:  */
        !            56: 
        !            57: #ifdef emacs
        !            58: #include <sys/filio.h>
        !            59: #include <termio.h>
        !            60: #include <sys/ttold.h>
        !            61: #include <signal.h>
        !            62: #include <sys/wait.h>
        !            63: #include <sys/stream.h>
        !            64: #include <sys/stropts.h>
        !            65: #include <sys/termios.h>
        !            66: #undef SIGIO
        !            67: #endif
        !            68: 
        !            69: /* libc has this stuff, but not utimes. */
        !            70: 
        !            71: #define HAVE_RENAME
        !            72: #define HAVE_SELECT
        !            73: #define HAVE_TIMEVAL
        !            74: #define HAVE_CLOSEDIR
        !            75: #define HAVE_GETTIMEOFDAY
        !            76: #define HAVE_DUP2
        !            77: 
        !            78: #define USE_UTIME
        !            79: 
        !            80: /* <sys/stat.h> *defines* stat(2) as a static function.  If "static"
        !            81:  * is blank, then many files will have a public definition for stat(2).
        !            82:  */
        !            83: 
        !            84: #undef static
        !            85: 
        !            86: /* We need bss_end from emacs.c for undumping */
        !            87: 
        !            88: #ifndef USG_SHARED_LIBRARIES
        !            89: #define USG_SHARED_LIBRARIES
        !            90: #endif
        !            91: 
        !            92: /* We can support this */
        !            93: 
        !            94: #define CLASH_DETECTION
        !            95: 
        !            96: #define HAVE_PTYS
        !            97: #define HAVE_SETSID
        !            98: #define HAVE_TCATTR
        !            99: 
        !           100: /* It is possible to receive SIGCHLD when there are no children
        !           101:    waiting, because a previous waitsys(2) cleaned up the carcass of child
        !           102:    without clearing the SIGCHLD pending info.  So, use a non-blocking
        !           103:    wait3 instead, which maps to waitpid(2) in SysVr4. */
        !           104: 
        !           105: #define HAVE_WAIT_HEADER
        !           106: #define WAITTYPE int
        !           107: #define wait3(status, options, rusage) \
        !           108:   waitpid((pid_t) -1, (status), (options))
        !           109: #define WRETCODE(w) (w >> 8)
        !           110: 
        !           111: /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
        !           112:    subprocesses the usual way.  But TIOCSIGNAL does work for PTYs, and
        !           113:    this is all we need.  */
        !           114: 
        !           115: #define TIOCSIGSEND TIOCSIGNAL
        !           116: 
        !           117: /* This change means that we don't loop through allocate_pty too many
        !           118:    times in the (rare) event of a failure. */
        !           119: 
        !           120: #undef FIRST_PTY_LETTER
        !           121: #define FIRST_PTY_LETTER 'z'
        !           122: 
        !           123: /* This sets the name of the master side of the PTY. */
        !           124: 
        !           125: #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
        !           126: 
        !           127: /* This sets the name of the slave side of the PTY.  On SysVr4,
        !           128:    grantpt(3) forks a subprocess, so keep sigchld_handler() from
        !           129:    intercepting that death.  If any child but grantpt's should die
        !           130:    within, it should be caught after sigrelse(2). */
        !           131: 
        !           132: #define PTY_TTY_NAME_SPRINTF                   \
        !           133:   {                                            \
        !           134:     char *ptsname(), *ptyname;                 \
        !           135:                                                \
        !           136:     sighold(SIGCLD);                           \
        !           137:     if (grantpt(fd) == -1)                     \
        !           138:       fatal("could not grant slave pty");      \
        !           139:     sigrelse(SIGCLD);                          \
        !           140:     if (unlockpt(fd) == -1)                    \
        !           141:       fatal("could not unlock slave pty");     \
        !           142:     if (!(ptyname = ptsname(fd)))              \
        !           143:       fatal ("could not enable slave pty");    \
        !           144:     strncpy(pty_name, ptyname, sizeof(pty_name)); \
        !           145:     pty_name[sizeof(pty_name) - 1] = 0;                \
        !           146:   }
        !           147: 
        !           148: /* Push various streams modules onto a PTY channel. */
        !           149: 
        !           150: #define SETUP_SLAVE_PTY \
        !           151:   if (ioctl (xforkin, I_PUSH, "ptem") == -1)   \
        !           152:     fatal ("ioctl I_PUSH ptem", errno);                \
        !           153:   if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
        !           154:     fatal ("ioctl I_PUSH ldterm", errno);      \
        !           155:   if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
        !           156:     fatal ("ioctl I_PUSH ttcompat", errno);
        !           157: 
        !           158: /* The definition of this in s-usg5-3.h is not needed in 5.4.  */
        !           159: /* liblnsl_s should never be used.  The _s suffix implies a shared
        !           160:    library, as opposed to a DLL.  Share libraries were used in SVR3, and are
        !           161:    available only in order to allow SVR3 binaries to run.  They should not be
        !           162:    linked in to new binaries. -- [email protected].  */
        !           163: #undef LIBX10_SYSTEM
        !           164: #undef LIBX11_SYSTEM
        !           165: 
        !           166: /* Tell x11term.c and keyboard.c we have the system V streams feature.  */
        !           167: #define SYSV_STREAMS
        !           168: 
        !           169: /* This definition was suggested for next release.
        !           170:    So give it a try.  */
        !           171: #define HAVE_SOCKETS

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.