0
|
1 /* Definitions file for GNU Emacs running on HPUX release 7.0.
|
|
2 Based on AT&T System V.2.
|
|
3 Copyright (C) 1985, 1986 Free Software Foundation, Inc.
|
|
4
|
|
5 This file is part of GNU Emacs.
|
|
6
|
|
7 GNU Emacs is free software; you can redistribute it and/or modify
|
|
8 it under the terms of the GNU General Public License as published by
|
|
9 the Free Software Foundation; either version 2, or (at your option)
|
|
10 any later version.
|
|
11
|
|
12 GNU Emacs is distributed in the hope that it will be useful,
|
|
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 GNU General Public License for more details.
|
|
16
|
|
17 You should have received a copy of the GNU General Public License
|
|
18 along with XEmacs; see the file COPYING. If not, write to
|
|
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
20 Boston, MA 02111-1307, USA. */
|
|
21
|
|
22 /* Synched up with: FSF 19.31. */
|
|
23
|
|
24 /*
|
|
25 * Define symbols to identify the version of Unix this is.
|
|
26 * Define all the symbols that apply correctly.
|
|
27 */
|
|
28
|
|
29 #define USG /* System III, System V, etc */
|
|
30
|
|
31 #define USG5
|
|
32
|
|
33 #define HPUX
|
|
34
|
|
35 /* XEmacs change: HPUX_PRE_8_0 needs to be defined for HP-UX 7.X and
|
|
36 earlier. DO NOT UNCOMMENT THE FOLLOWING IF HP-UX 8.0 OR LATER IS
|
|
37 BEING USED; HPUX_PRE_8_0 will be automatically #undef'd later, if
|
|
38 necessary. */
|
|
39 #define HPUX_PRE_8_0
|
|
40
|
|
41 /* SYSTEM_TYPE should indicate the kind of system you are using.
|
|
42 It sets the Lisp variable system-type. */
|
|
43
|
|
44 #define SYSTEM_TYPE "hpux"
|
|
45
|
|
46 /* `nomultiplejobs' should be defined if your system's shell
|
|
47 does not have "job control" (the ability to stop a program,
|
|
48 run some other program, then continue the first one).
|
|
49
|
|
50 On hpux this depends on the precise kind of machine in use,
|
|
51 so the m- file defines this symbol if appropriate. */
|
|
52
|
|
53 /* Letter to use in finding device name of first pty,
|
|
54 if system supports pty's. 'p' means it is /dev/ptym/ptyp0 */
|
|
55
|
|
56 #define FIRST_PTY_LETTER 'p'
|
|
57
|
|
58 /*
|
|
59 * Define HAVE_PTYS if the system supports pty devices.
|
|
60 */
|
|
61
|
|
62 #define HAVE_PTYS
|
|
63
|
|
64 /* If your system uses COFF (Common Object File Format) then define the
|
|
65 preprocessor symbol "COFF". */
|
|
66
|
|
67 /* #define COFF */
|
|
68
|
|
69 /* define MAIL_USE_FLOCK if the mailer uses flock
|
|
70 to interlock access to /usr/spool/mail/$USER.
|
|
71 The alternative is that a lock file named
|
|
72 /usr/spool/mail/$USER.lock. */
|
|
73
|
|
74 /* #define MAIL_USE_FLOCK */
|
|
75
|
|
76 /* The file containing the kernel's symbol table is called /hp-ux. */
|
|
77
|
|
78 #define KERNEL_FILE "/hp-ux"
|
|
79
|
|
80 /* The symbol in the kernel where the load average is found
|
|
81 depends on the cpu type, so we let the m- files define LDAV_SYMBOL. */
|
|
82
|
|
83 /* Special hacks needed to make Emacs run on this system. */
|
|
84
|
|
85 /* On USG systems the system calls are interruptible by signals
|
|
86 that the user program has elected to catch. Thus the system call
|
|
87 must be retried in these cases. To handle this without massive
|
|
88 changes in the source code, we remap the standard system call names
|
|
89 to names for our own functions in sysdep.c that do the system call
|
|
90 with retries. */
|
|
91
|
|
92 #define INTERRUPTIBLE_OPEN
|
|
93 #define INTERRUPTIBLE_IO
|
|
94 /* XEmacs change */
|
|
95 #define INTERRUPTIBLE_CLOSE
|
|
96
|
|
97 /* Use the system provided termcap(3) library */
|
|
98 #define TERMINFO
|
|
99
|
|
100 /* The 48-bit versions are more winning for Emacs;
|
|
101 the ordinary ones don't give even 32 bits. */
|
|
102 #define random lrand48
|
|
103 #define srandom srand48
|
|
104
|
|
105 /* In hpux, the symbol SIGIO is defined, but the feature
|
|
106 doesn't work in the way Emacs needs it to.
|
|
107
|
|
108 XEmacs change: XEmacs has patches Darryl Okhahata (?) submitted to
|
|
109 the FSF which allow interrupt input in emacs. */
|
|
110
|
|
111 /* #define BROKEN_SIGIO */
|
|
112
|
|
113 /* USG systems tend to put everything declared static
|
|
114 into the initialized data area, which becomes pure after dumping Emacs.
|
|
115 Foil this by defining NO_REMAP, which makes the purespace not pure.
|
|
116 (Formerly this was avoided by doing '#define static' but this just
|
|
117 fails with inline functions.) */
|
|
118
|
|
119 #ifndef DONT_DEFINE_NO_REMAP
|
|
120 #define NO_REMAP
|
|
121 #endif
|
|
122
|
|
123 /* Define extra libraries to load.
|
|
124 This should have -lBSD, but that library is said to make
|
|
125 `signal' fail to work. */
|
|
126
|
|
127 #ifdef HPUX_NET
|
163
|
128 #define LIBS_SYSTEM "-ln"
|
0
|
129 #else
|
|
130 #define LIBS_SYSTEM
|
|
131 #endif
|
|
132
|
|
133 /* Some additional system facilities exist. */
|
|
134
|
|
135 /* XEmacs change */
|
|
136 /* #define HAVE_PERROR */ /* Delete this line for version 6. */
|
|
137
|
|
138 /* The following maps shared exec file to demand loaded exec.
|
|
139 Don't do this as demand loaded exec is broken in hpux. */
|
|
140
|
|
141 #if 0
|
|
142
|
|
143 /* Adjust a header field for the executable file about to be dumped. */
|
|
144
|
|
145 #define ADJUST_EXEC_HEADER \
|
|
146 hdr.a_magic = ((ohdr.a_magic.file_type == OLDMAGIC.file_type) ? \
|
|
147 NEWMAGIC : ohdr.a_magic);
|
|
148
|
|
149 #endif
|
|
150
|
|
151 /* Baud-rate values in tty status have nonstandard meanings. */
|
|
152
|
|
153 #define BAUD_CONVERT \
|
|
154 { 0, 50, 75, 110, 135, 150, 200, 300, 600, 900, 1200, \
|
|
155 1800, 2400, 3600, 4800, 7200, 9600, 19200, 38400 }
|
|
156
|
|
157 /* This is needed for HPUX version 6.2; it may not be needed for 6.2.1. */
|
|
158 #define SHORT_CAST_BUG
|
|
159
|
365
|
160 #if defined(HAVE_GRANTPT) && defined(HAVE_UNLOCKPT) && defined(HAVE_PTSNAME)
|
|
161 /* UNIX98 PTYs are available.
|
|
162 Added by Florian Weimer <Florian.Weimer@RUS.Uni-Stuttgart.DE>,
|
|
163 RUS-CERT, University of Stuttgart. Based on Emacs code for DGUX. */
|
|
164
|
|
165 #ifdef emacs
|
|
166 #include <grp.h>
|
|
167 #include <sys/stropts.h>
|
|
168 #endif
|
|
169
|
|
170 #define PTY_ITERATION for (i = 0; i < 1; i++)
|
|
171 /* no iteration at all */
|
|
172
|
|
173 /* the master PTY device */
|
|
174 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
|
|
175
|
|
176 /* This sets the name of the slave side of the PTY. grantpt(3) and
|
|
177 unlockpt(3) may fork a subprocess, so keep sigchld_handler() from
|
|
178 intercepting that death. grantpt() behavior on HP-UX differs from
|
|
179 what's specified in the man page: the group of the slave PTY is set
|
|
180 to the user's primary group, and we fix that. */
|
|
181
|
|
182 #define PTY_TTY_NAME_SPRINTF \
|
|
183 { \
|
|
184 char *ptsname(), *ptyname; \
|
|
185 struct group *getgrnam (), *tty_group = getgrnam ("tty"); \
|
|
186 if (tty_group == NULL) \
|
|
187 fatal ("group tty not found"); \
|
|
188 \
|
|
189 sigblock(sigmask(SIGCHLD)); \
|
|
190 if (grantpt(fd) == -1) \
|
|
191 fatal("could not grant slave pty"); \
|
|
192 if (!(ptyname = ptsname(fd))) \
|
|
193 fatal ("could not enable slave pty"); \
|
|
194 strncpy(pty_name, ptyname, sizeof(pty_name)); \
|
|
195 pty_name[sizeof(pty_name) - 1] = 0; \
|
|
196 if (chown (pty_name, (uid_t) -1, tty_group->gr_gid) == -1) \
|
|
197 fatal ("could not chown slave pty"); \
|
|
198 if (unlockpt(fd) == -1) \
|
|
199 fatal("could not unlock slave pty"); \
|
|
200 sigunblock(sigmask(SIGCHLD)); \
|
|
201 }
|
|
202
|
|
203 /* Push various streams modules onto a PTY channel. */
|
|
204
|
|
205 #define SETUP_SLAVE_PTY \
|
|
206 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
|
|
207 fatal ("ioctl I_PUSH ptem", errno); \
|
|
208 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
|
|
209 fatal ("ioctl I_PUSH ldterm", errno);
|
|
210
|
|
211 #else /* no UNIX98 PTYs */
|
|
212
|
0
|
213 /* This is how to get the device name of the tty end of a pty. */
|
|
214 #define PTY_TTY_NAME_SPRINTF \
|
|
215 sprintf (pty_name, "/dev/pty/tty%c%x", c, i);
|
|
216
|
|
217 /* This is how to get the device name of the control end of a pty. */
|
|
218 #define PTY_NAME_SPRINTF \
|
|
219 sprintf (pty_name, "/dev/ptym/pty%c%x", c, i);
|
|
220
|
365
|
221 #endif /* UNIX 98 PTYs */
|
|
222
|
0
|
223 /* This triggers a conditional in xfaces.c. */
|
|
224 #define XOS_NEEDS_TIME_H
|