Mercurial > hg > xemacs-beta
comparison src/s/usg5-4.h @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | 25f70ba0133c |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
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 2, 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 XEmacs; see the file COPYING. If not, write to | |
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
19 Boston, MA 02111-1307, USA. */ | |
20 | |
21 /* Synched up with: FSF 19.31. */ | |
22 | |
23 /* This file written by James Van Artsdalen of Dell Computer Corporation. | |
24 * james@bigtex.cactus.org. Subsequently improved for Dell 2.2 by Eric | |
25 * S. Raymond <esr@snark.thyrsus.com>. | |
26 */ | |
27 | |
28 /* Use the SysVr3 file for at least base configuration. */ | |
29 | |
30 #define DONT_DEFINE_NO_REMAP /* `static' hack not needed */ | |
31 #include "usg5-3.h" | |
32 | |
33 #define USG5_4 | |
34 | |
35 #define LIBS_SYSTEM -lsocket -lnsl -lelf | |
36 #define ORDINARY_LINK | |
37 | |
38 #if 0 | |
39 #ifdef ORDINARY_LINK | |
40 #define LIB_STANDARD -lc /usr/ucblib/libucb.a | |
41 #else | |
42 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o | |
43 #define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o | |
44 #endif | |
45 #else | |
46 | |
47 #ifdef ORDINARY_LINK | |
48 #define LIB_STANDARD | |
49 #else | |
50 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o | |
51 #define LIB_STANDARD -lc /usr/ccs/lib/crtn.o | |
52 #endif | |
53 #endif | |
54 | |
55 /* there are no -lg libraries on this system, and no libPW */ | |
56 | |
57 #define LIBS_DEBUG | |
58 /* This is turned off because nobody actually uses LIBS_STANDARD (Nov 1995). | |
59 That name is a typo. The next step is to delete this entirely. */ | |
60 /* #define LIBS_STANDARD -lc */ | |
61 | |
62 /* No <sioctl.h> */ | |
63 | |
64 #define NO_SIOCTL_H | |
65 | |
66 /* Undump with ELF */ | |
67 | |
68 #undef COFF | |
69 | |
70 #define UNEXEC unexelf.o | |
71 | |
72 /* Get <sys/ttold.h> to get struct | |
73 * tchars. But get <termio.h> first to make sure ttold.h doesn't | |
74 * interfere. | |
75 */ | |
76 | |
77 #ifndef NOT_C_CODE | |
78 #include <sys/wait.h> | |
79 #endif | |
80 | |
81 #ifdef emacs | |
82 #include <sys/filio.h> | |
83 #include <termio.h> | |
84 #include <sys/ttold.h> | |
85 #include <signal.h> | |
86 #include <sys/stream.h> | |
87 #include <sys/stropts.h> | |
88 #include <sys/termios.h> | |
89 #endif | |
90 | |
91 #undef BROKEN_SIGIO | |
92 | |
93 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments; | |
94 * instead, there's a system variable _sys_nsig. Unfortunately, we need the | |
95 * constant to dimension an array. So wire in the appropriate value here. | |
96 */ | |
97 | |
98 #ifndef NSIG | |
99 #define NSIG 32 | |
100 #endif | |
101 | |
102 /* We need bss_end from emacs.c for undumping */ | |
103 | |
104 #ifndef USG_SHARED_LIBRARIES | |
105 #define USG_SHARED_LIBRARIES | |
106 #endif | |
107 | |
108 #define HAVE_PTYS | |
109 #undef BROKEN_TIOCGWINSZ | |
110 #undef BROKEN_TIOCGETC | |
111 | |
112 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY | |
113 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and | |
114 this is all we need. */ | |
115 | |
116 #define TIOCSIGSEND TIOCSIGNAL | |
117 | |
118 /* This change means that we don't loop through allocate_pty too many | |
119 times in the (rare) event of a failure. */ | |
120 | |
121 #undef FIRST_PTY_LETTER | |
122 #define FIRST_PTY_LETTER 'z' | |
123 | |
124 /* This sets the name of the master side of the PTY. */ | |
125 | |
126 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | |
127 | |
128 /* This sets the name of the slave side of the PTY. On SysVr4, | |
129 grantpt(3) forks a subprocess, so keep sigchld_handler() from | |
130 intercepting that death. If any child but grantpt's should die | |
131 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */ | |
132 | |
133 /* XEmacs change */ | |
134 #ifndef NOT_C_CODE | |
135 # if !__STDC__ && !defined(STDC_HEADERS) | |
136 char *ptsname (); | |
137 # endif | |
138 #endif | |
139 | |
140 #define PTY_TTY_NAME_SPRINTF \ | |
141 { \ | |
142 char *ptyname; \ | |
143 \ | |
144 EMACS_BLOCK_SIGCHLD; \ | |
145 if (grantpt (fd) == -1) \ | |
146 { close (fd); return -1; } \ | |
147 EMACS_UNBLOCK_SIGCHLD; \ | |
148 if (unlockpt (fd) == -1) \ | |
149 { close (fd); return -1; } \ | |
150 if (!(ptyname = ptsname (fd))) \ | |
151 { close (fd); return -1; } \ | |
152 strncpy (pty_name, ptyname, sizeof (pty_name)); \ | |
153 pty_name[sizeof (pty_name) - 1] = 0; \ | |
154 } | |
155 | |
156 /* Push various streams modules onto a PTY channel. */ | |
157 | |
158 #define SETUP_SLAVE_PTY \ | |
159 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ | |
160 fatal ("ioctl I_PUSH ptem: errno %d\n", errno); \ | |
161 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | |
162 fatal ("ioctl I_PUSH ldterm: errno %d\n", errno); \ | |
163 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \ | |
164 fatal ("ioctl I_PUSH ttcompat: errno %d\n", errno); | |
165 | |
166 /* Undo the SVr3 X11 library definition */ | |
167 #undef LIB_X11_LIB | |
168 | |
169 /* The definition of this in s-usg5-3.h is not needed in 5.4. */ | |
170 /* liblnsl_s should never be used. The _s suffix implies a shared | |
171 library, as opposed to a DLL. Share libraries were used in SVR3, and are | |
172 available only in order to allow SVR3 binaries to run. They should not be | |
173 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */ | |
174 #undef LIBX10_SYSTEM | |
175 #undef LIBX11_SYSTEM | |
176 | |
177 /* Tell x11term.c and keyboard.c we have the system V streams feature. */ | |
178 #define SYSV_STREAMS |