Merge remote-tracking branch 'origin/master' into for-steve
[sxemacs] / src / s / hpux.h
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 SXEmacs
6
7 SXEmacs 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 3 of the License, or
10 (at your option) any later version.
11
12 SXEmacs 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 this program.  If not, see <http://www.gnu.org/licenses/>. */
19
20
21 /* Synched up with: FSF 19.31. */
22
23 /*
24  *      Define symbols to identify the version of Unix this is.
25  *      Define all the symbols that apply correctly.
26  */
27
28 #define USG                     /* System III, System V, etc */
29
30 #define USG5
31
32 #define HPUX
33
34 /* XEmacs change: HPUX_PRE_8_0 needs to be defined for HP-UX 7.X and
35    earlier.  DO NOT UNCOMMENT THE FOLLOWING IF HP-UX 8.0 OR LATER IS
36    BEING USED; HPUX_PRE_8_0 will be automatically #undef'd later, if
37    necessary. */
38 #define HPUX_PRE_8_0
39
40 /* SYSTEM_TYPE should indicate the kind of system you are using.
41  It sets the Lisp variable system-type.  */
42
43 #define SYSTEM_TYPE "hpux"
44
45 /* `nomultiplejobs' should be defined if your system's shell
46  does not have "job control" (the ability to stop a program,
47  run some other program, then continue the first one).
48
49  On hpux this depends on the precise kind of machine in use,
50  so the m- file defines this symbol if appropriate.  */
51
52 /* Letter to use in finding device name of first pty,
53   if system supports pty's.  'p' means it is /dev/ptym/ptyp0  */
54
55 #define FIRST_PTY_LETTER 'p'
56
57 /*
58  *      Define HAVE_PTYS if the system supports pty devices.
59  */
60
61 #define HAVE_PTYS
62
63 /* If your system uses COFF (Common Object File Format) then define the
64    preprocessor symbol "COFF". */
65
66 /* #define COFF */
67
68 /* define MAIL_USE_FLOCK if the mailer uses flock
69    to interlock access to /usr/spool/mail/$USER.
70    The alternative is that a lock file named
71    /usr/spool/mail/$USER.lock.  */
72
73 /* #define MAIL_USE_FLOCK */
74
75 /* The file containing the kernel's symbol table is called /hp-ux.  */
76
77 #define KERNEL_FILE "/hp-ux"
78
79 /* The symbol in the kernel where the load average is found
80    depends on the cpu type, so we let the m- files define LDAV_SYMBOL.  */
81
82 /* Special hacks needed to make Emacs run on this system.  */
83
84 /* On USG systems the system calls are interruptible by signals
85  that the user program has elected to catch.  Thus the system call
86  must be retried in these cases.  To handle this without massive
87  changes in the source code, we remap the standard system call names
88  to names for our own functions in sysdep.c that do the system call
89  with retries. */
90
91 #define INTERRUPTIBLE_OPEN
92 #define INTERRUPTIBLE_IO
93 /* XEmacs change */
94 #define INTERRUPTIBLE_CLOSE
95
96 /* Use the system provided termcap(3) library */
97 #define TERMINFO
98
99 /* The 48-bit versions are more winning for Emacs;
100    the ordinary ones don't give even 32 bits.  */
101 #define random lrand48
102 #define srandom srand48
103
104 /* In hpux, the symbol SIGIO is defined, but the feature
105    doesn't work in the way Emacs needs it to.
106
107    XEmacs change: XEmacs has patches Darryl Okhahata (?) submitted to
108    the FSF which allow interrupt input in emacs. */
109
110 /* #define BROKEN_SIGIO */
111
112 /* USG systems tend to put everything declared static
113    into the initialized data area, which becomes pure after dumping Emacs.
114    Foil this by defining NO_REMAP, which makes the purespace not pure.
115    (Formerly this was avoided by doing '#define static' but this just
116    fails with inline functions.) */
117
118 #ifndef DONT_DEFINE_NO_REMAP
119 #define NO_REMAP
120 #endif
121
122 /* Define extra libraries to load.
123    This should have -lBSD, but that library is said to make
124    `signal' fail to work.  */
125
126 #ifdef HPUX_NET
127 #define LIBS_SYSTEM "-ln"
128 #else
129 #define LIBS_SYSTEM
130 #endif
131
132 /* Some additional system facilities exist.  */
133
134 /* XEmacs change */
135                           /* #define HAVE_PERROR *//* Delete this line for version 6.  */
136
137 /* The following maps shared exec file to demand loaded exec.
138    Don't do this as demand loaded exec is broken in hpux.  */
139
140 #if 0
141
142 /* Adjust a header field for the executable file about to be dumped.  */
143
144 #define ADJUST_EXEC_HEADER   \
145   hdr.a_magic = ((ohdr.a_magic.file_type == OLDMAGIC.file_type) ?  \
146                  NEWMAGIC : ohdr.a_magic);
147
148 #endif
149
150 /* Baud-rate values in tty status have nonstandard meanings.  */
151
152 #define BAUD_CONVERT  \
153 { 0, 50, 75, 110, 135, 150, 200, 300, 600, 900, 1200,  \
154   1800, 2400, 3600, 4800, 7200, 9600, 19200, 38400 }
155
156 /* This is needed for HPUX version 6.2; it may not be needed for 6.2.1.  */
157 #define SHORT_CAST_BUG
158
159 /* This is how to get the device name of the tty end of a pty.  */
160 #define PTY_TTY_NAME_SPRINTF                                            \
161         do {                                                            \
162                 int sz = snprintf (pty_name, sizeof(pty_name),          \
163                                    "/dev/pty/tty%c%x", c, i);           \
164                 assert(sz>=0 && sz<sizeof(pty_name));                   \
165         } while(0)
166
167
168
169 /* This is how to get the device name of the control end of a pty.  */
170 #define PTY_NAME_SPRINTF                                        \
171         do {                                                    \
172                 int sz = snprintf (pty_name, sizeof(pty_name),  \
173                                    "/dev/ptym/pty%c%x", c, i);  \
174                 assert(sz>=0 && sz<sizeof(pty_name));           \
175         } while(0)
176
177 /* This triggers a conditional in xfaces.c.  */
178 #define XOS_NEEDS_TIME_H