annotate src/s/usg5-4.h @ 108310:17d73312ed65

Move TERMINFO, LIBS_TERMCAP from cpp to configure. * configure.in (HAVE_LIBNCURSES): New local variable. (TERMINFO, LIBS_TERMCAP, TERMCAP_OBJ): New output variables, replacing cpp in src/s/*.h and src/Makefile.in. * src/Makefile.in (LIBS_TERMCAP): Set with configure, not cpp. (TERMCAP_OBJ): New, set by configure, replacing termcapobj. (termcapobj): Replace with TERMCAP_OBJ. (otherobj): Use $TERMCAP_OBJ instead of $termcapobj. (LIBES): Use LIBS_TERMCAP as a variable. * src/s/freebsd.h (osreldate.h): No longer include, since this file does not use __FreeBSD_version any more. * srs/s/aix4-2.h (TERMINFO): * srs/s/cygwin.h (TERMINFO): * srs/s/darwin.h (TERMINFO, LIBS_TERMCAP) [HAVE_LIBNCURSES]: * srs/s/freebsd.h (TERMINFO, LIBS_TERMCAP): * srs/s/gnu-linux.h (TERMINFO, LIBS_TERMCAP) [HAVE_LIBNCURSES]: * srs/s/gnu.h (TERMINFO, LIBS_TERMCAP) [HAVE_LIBNCURSES]: * srs/s/hpux10-20.h (TERMINFO, LIBS_TERMCAP): * srs/s/irix6-5.h (TERMINFO): * srs/s/netbsd.h (LIBS_TERMCAP): * srs/s/openbsd.h (TERMINFO, LIBS_TERMCAP): * srs/s/sol2-6.h (LIBS_TERMCAP) [!TERMINFO]: * srs/s/usg5-4.h (TERMINFO): Move to configure. * msdos/sed1v2.inp (LIBS_TERMCAP): Edit to empty. (TERMCAP_OBJ): Edit to tparam.o. * admin/CPP-DEFINES (LIBS_TERMCAP, TERMINFO): Remove.
author Glenn Morris <rgm@gnu.org>
date Fri, 07 May 2010 19:05:24 -0700
parents 8416c8d075e3
children f8e62c2bf3e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4
108310
17d73312ed65 Move TERMINFO, LIBS_TERMCAP from cpp to configure.
Glenn Morris <rgm@gnu.org>
parents: 108274
diff changeset
2
17d73312ed65 Move TERMINFO, LIBS_TERMCAP from cpp to configure.
Glenn Morris <rgm@gnu.org>
parents: 108274
diff changeset
3 Copyright (C) 1987, 1990, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
17d73312ed65 Move TERMINFO, LIBS_TERMCAP from cpp to configure.
Glenn Morris <rgm@gnu.org>
parents: 108274
diff changeset
4 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 This file is part of GNU Emacs.
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7
94715
1f134b61867c Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
8 GNU Emacs is free software: you can redistribute it and/or modify
1039
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
9 it under the terms of the GNU General Public License as published by
94715
1f134b61867c Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
10 the Free Software Foundation, either version 3 of the License, or
1f134b61867c Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
11 (at your option) any later version.
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12
1039
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
13 GNU Emacs is distributed in the hope that it will be useful,
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
16 GNU General Public License for more details.
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
17
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
18 You should have received a copy of the GNU General Public License
94715
1f134b61867c Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 /* This file written by James Van Artsdalen of Dell Computer Corporation.
2116
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
22 * james@bigtex.cactus.org. Subsequently improved for Dell 2.2 by Eric
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
23 * S. Raymond <esr@snark.thyrsus.com>.
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 /* Use the SysVr3 file for at least base configuration. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
28 #define USG /* System III, System V, etc */
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
30 #define USG5
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 #define USG5_4
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
33 /* SYSTEM_TYPE should indicate the kind of system you are using.
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
34 It sets the Lisp variable system-type. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
35
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
36 #define SYSTEM_TYPE "usg-unix-v"
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
37
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
38 /*
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
39 * Define HAVE_TERMIO if the system provides sysV-style ioctls
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
40 * for terminal control.
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
41 */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
42
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
43 #define HAVE_TERMIO
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
45 /*
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
46 * Define HAVE_PTYS if the system supports pty devices.
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
47 */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
48
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
49 /*
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
50 * Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
51 * library functions. Almost, but not quite the same as
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
52 * the 4.2 functions
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
53 */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
54 #define SYSV_SYSTEM_DIR
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
55
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
56 /* The file containing the kernel's symbol table is called /unix. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
57
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
58 #define KERNEL_FILE "/unix"
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
59
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
60 /* The symbol in the kernel where the load average is found
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
61 is named avenrun. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
62
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
63 #define LDAV_SYMBOL "avenrun"
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
64
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
65 /* setjmp and longjmp can safely replace _setjmp and _longjmp,
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
66 but they will run slower. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
67
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
68 #define _setjmp setjmp
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
69 #define _longjmp longjmp
4336
96d3869ae231 (bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents: 4295
diff changeset
70
96303
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
71 /* On USG systems these have different names */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
72 #ifndef HAVE_INDEX
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
73 #define index strchr
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
74 #endif /* ! defined (HAVE_INDEX) */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
75 #ifndef HAVE_RINDEX
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
76 #define rindex strrchr
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
77 #endif /* ! defined (HAVE_RINDEX) */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
78
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
79
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
80 /* The docs for system V/386 suggest v.3 has sigpause,
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
81 so let's give it a try. */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
82 #define HAVE_SYSV_SIGPAUSE
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
83
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
84
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
85 /* If we're using the System V X port, BSD bstring functions will be handy */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
86
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
87 #ifdef HAVE_X_WINDOWS
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
88 #define BSTRING
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
89 #endif /* HAVE_X_WINDOWS */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
90
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
91 /* On USG systems signal handlers return void */
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
92
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
93 #define SIGTYPE void
ddedcecb18ef * unexnext.c:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 94715
diff changeset
94
96378
1163f7459d65 Fix previous change: keep the correct branch of a
Dan Nicolaescu <dann@ics.uci.edu>
parents: 96303
diff changeset
95 #define ORDINARY_LINK
1163f7459d65 Fix previous change: keep the correct branch of a
Dan Nicolaescu <dann@ics.uci.edu>
parents: 96303
diff changeset
96
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
97 /* Undump with ELF */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
98
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99 #undef COFF
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
101 #define UNEXEC unexelf.o
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
104 * tchars. But get <termio.h> first to make sure ttold.h doesn't
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
105 * interfere. And don't try to use SIGIO yet.
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
106 */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
107
13466
e31afd8b6355 Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents: 12734
diff changeset
108 #ifndef NOT_C_CODE
e31afd8b6355 Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents: 12734
diff changeset
109 #include <sys/wait.h>
e31afd8b6355 Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents: 12734
diff changeset
110 #endif
e31afd8b6355 Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents: 12734
diff changeset
111
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
112 #ifdef emacs
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
113 #include <sys/filio.h>
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
114 #include <termio.h>
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
115 #include <sys/ttold.h>
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
116 #include <signal.h>
1039
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
117 #include <sys/stream.h>
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
118 #include <sys/stropts.h>
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
119 #include <sys/termios.h>
26090
63fd40a97a75 s/usg5-4.h:
Paul Eggert <eggert@twinsun.com>
parents: 23914
diff changeset
120 #define BROKEN_SIGIO
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
121 #endif
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
122
2116
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
123 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
124 * instead, there's a system variable _sys_nsig. Unfortunately, we need the
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
125 * constant to dimension an array. So wire in the appropriate value here.
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
126 */
26090
63fd40a97a75 s/usg5-4.h:
Paul Eggert <eggert@twinsun.com>
parents: 23914
diff changeset
127 #define NSIG_MINIMUM 32
2116
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
128
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129 /* We can support this */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
131 #define CLASH_DETECTION
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
132
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
133 #define HAVE_PTYS
2116
76df2de3dd55 * s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents: 1868
diff changeset
134 #define HAVE_TERMIOS
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
135
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136 /* It is possible to receive SIGCHLD when there are no children
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137 waiting, because a previous waitsys(2) cleaned up the carcass of child
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 without clearing the SIGCHLD pending info. So, use a non-blocking
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139 wait3 instead, which maps to waitpid(2) in SysVr4. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
140
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141 #define wait3(status, options, rusage) \
8283
32427329c42c (PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents: 7947
diff changeset
142 waitpid ((pid_t) -1, (status), (options))
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
143 #define WRETCODE(w) (w >> 8)
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
144
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
145 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147 this is all we need. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
148
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
149 #define TIOCSIGSEND TIOCSIGNAL
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
151 /* This change means that we don't loop through allocate_pty too many
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152 times in the (rare) event of a failure. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
154 #define FIRST_PTY_LETTER 'z'
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
155
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 /* This sets the name of the master side of the PTY. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
158 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
159
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
160 /* Push various streams modules onto a PTY channel. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
161
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
162 #define SETUP_SLAVE_PTY \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
163 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
164 fatal ("ioctl I_PUSH ptem", errno); \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
165 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166 fatal ("ioctl I_PUSH ldterm", errno); \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
167 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
168 fatal ("ioctl I_PUSH ttcompat", errno);
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
169
1039
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
170 /* This definition was suggested for next release.
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
171 So give it a try. */
8ab465f7a7ff *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
172 #define HAVE_SOCKETS
4336
96d3869ae231 (bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents: 4295
diff changeset
173
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 48457
diff changeset
174 /* arch-tag: 1a0ed909-5faa-434b-b7c3-9d86c63d53a6
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 48457
diff changeset
175 (do not change this comment) */