Sync to HEAD
[bpt/emacs.git] / src / m / hp9000s300.h
CommitLineData
20c428fd 1/* machine description file for hp9000 series 200 or 300 on either HPUX or BSD.
d8f6d720 2 Copyright (C) 1985, 2002 Free Software Foundation, Inc.
20c428fd
JB
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
17385adc 8the Free Software Foundation; either version 2, or (at your option)
20c428fd
JB
9any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to
3b7ad313
EN
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20c428fd
JB
20
21
177c0ea7 22/* The following line tells the configuration script what sort of
20c428fd
JB
23 operating system this machine is likely to run.
24 USUAL-OPSYS="note"
25
26NOTE-START
27HP 9000 series 200 or 300 (-machine=hp9000s300)
28
29 These machines are 68000-series CPUs running HP-UX
30 (a derivative of sysV with some BSD features) or BSD 4.3 ported by Utah.
31
32 If you're running HP-UX, specify `-opsystem=hpux'.
b7cceaf1 33 If you're running BSD, specify `-opsystem=bsd4-3'.
20c428fd
JB
34NOTE-END */
35
7b89707c
JB
36/* I don't understand why we have to do this at all! -JimB */
37#if 0
38
b7cceaf1
JB
39/* Do this here at the top of the file; including sys/wait.h may
40 include <endian.h>, which defines BIG_ENDIAN, which will conflict
41 with our definition of BIG_ENDIAN if we do this at the bottom. */
42#ifndef NOT_C_CODE
43#ifndef NO_SHORTNAMES
44#include <sys/wait.h>
45#define WAITTYPE int
46#endif
47#define WRETCODE(w) (((w) >> 8) & 0377)
48#endif
49
7b89707c
JB
50#endif
51
b7cceaf1 52/* Define NOMULTIPLEJOBS on versions of HPUX before 6.5. */
20c428fd
JB
53
54/* #define NOMULTIPLEJOBS */
55
56/* Define this symbol if you are running a version of HP-UX
57 which predates version 6.01 */
58
59/* #define HPUX_5 */
60
74d3f806
KH
61/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word
62 is the most significant byte. */
63
64#define WORDS_BIG_ENDIAN
65
20c428fd
JB
66/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
67 * group of arguments and treat it as an array of the arguments. */
68
69/* #define NO_ARG_ARRAY */
70
71/* Define WORD_MACHINE if addresses and such have
72 * to be corrected before they can be used as byte counts. */
73
74/* #define WORD_MACHINE */
75
20c428fd
JB
76/* Now define a symbol for the cpu type, if your compiler
77 does not define it automatically. */
78
79#ifndef hp9000s300
80#define hp9000s300
81#endif
82
83/* Use type int rather than a union, to represent Lisp_Object */
84/* This is desirable for most machines. */
85
86#define NO_UNION_TYPE
87
88/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
89 the 24-bit bit field into an int. In other words, if bit fields
90 are always unsigned.
91
92 If you use NO_UNION_TYPE, this flag does not matter. */
93
94#define EXPLICIT_SIGN_EXTEND
95
96/* Define CANNOT_DUMP on machines where unexec does not work.
97 Then the function dump-emacs will not be defined
98 and temacs will do (load "loadup") automatically unless told otherwise. */
99
100/* #define CANNOT_DUMP */
101
102/* Define VIRT_ADDR_VARIES if the virtual addresses of
103 pure and impure space as loaded can vary, and even their
104 relative order cannot be relied on.
105
106 Otherwise Emacs assumes that text space precedes data space,
107 numerically. */
108
109/* #define VIRT_ADDR_VARIES */
110\f
eb8c3be9 111/* For University of Utah 4.3bsd implementation on HP300s.
20c428fd
JB
112 The #ifndef __GNUC__ definitions are required for the "standard" cc,
113 a very old, brain-dead version of PCC. */
114
115#ifdef BSD4_3
b7cceaf1 116
20c428fd
JB
117/* Tell crt0.c that this is an ordinary 68020. */
118#undef hp9000s300
b7cceaf1
JB
119#define m68000
120
20c428fd
JB
121#define CRT0_DUMMIES bogus_a6,
122
20c428fd
JB
123#ifndef __GNUC__
124#define LIBS_DEBUG /* don't have -lg that works */
125#define C_DEBUG_SWITCH /* don't support -g */
126#endif
127
128#undef LOAD_AVE_TYPE
129#undef LOAD_AVE_CVT
130#define LOAD_AVE_TYPE long
131#define LOAD_AVE_CVT(x) ((int) (((double) (x)) / 2048.0 * 100.0))
132
133#endif /* BSD4_3 */
134\f
135#ifndef BSD4_3
136/* The following definitions are for HPUX only. */
137
138/* The symbol in the kernel where the load average is found
139 is named _avenrun on this machine. */
140
141#define LDAV_SYMBOL "_avenrun"
142
143/* Data type of load average, as read out of kmem. */
144
145#define LOAD_AVE_TYPE double
146
147/* Convert that into an integer that is 100 for a load average of 1.0 */
148
149#define LOAD_AVE_CVT(x) ((int) ((x) * 100.0))
150
151/* This library is needed with -g, on the 200/300 only. */
152
153#if !defined(__GNUC__) || defined(__HPUX_ASM__)
154#define LIBS_DEBUG /usr/lib/end.o
155#endif
156
0aaa80cc
RS
157/* Need a TEXT_START. On the HP9000/s300 that is 0. */
158#ifdef __GNUC__
159#define TEXT_START 0
160#endif
161
20c428fd
JB
162/* The symbol FIONREAD is defined, but the feature does not work
163 on the 200/300. */
164
165#define BROKEN_FIONREAD
166
167/* In older versions of hpux, for unknown reasons, S_IFLNK is defined
168 even though symbolic links do not exist.
169 Make sure our conditionals based on S_IFLNK are not confused.
170
171 Here we assume that stat.h is included before config.h
172 so that we can override it here.
173
174 Version 6 of HP-UX has symbolic links. */
175
176#ifdef HPUX_5
177#undef S_IFLNK
178#endif
179
180/* Define the BSTRING functions in terms of the sysV functions.
b7cceaf1
JB
181 Version 6 of HP-UX supplies these in the BSD library,
182 but that library has reported bugs in `signal'. */
20c428fd 183
b7cceaf1 184/* #ifdef HPUX_5 */
20c428fd
JB
185#define bcopy(a,b,s) memcpy (b,a,s)
186#define bzero(a,s) memset (a,0,s)
187#define bcmp memcmp
b7cceaf1 188/* #endif */
20c428fd
JB
189
190/* On USG systems these have different names.
b7cceaf1
JB
191 Version 6 of HP-UX supplies these in the BSD library,
192 which we currently want to avoid using. */
20c428fd 193
b7cceaf1 194/* #ifdef HPUX_5 */
20c428fd
JB
195#define index strchr
196#define rindex strrchr
b7cceaf1 197/* #endif */
20c428fd
JB
198
199/* Define C_SWITCH_MACHINE to be +X if you want the s200/300
200 * Emacs to run on both 68010 and 68020 based hp-ux's.
201 *
202 * Define OLD_HP_ASSEMBLER if you have an ancient assembler
203 *
204 * Define HPUX_68010 if you are using the new assembler but
205 * compiling for a s200 (upgraded) or s310. 68010 based
206 * processor without 68881.
207 */
208
209/* These switches increase the size of some internal C compiler tables.
210 They are required for compiling the X11 interface files. */
211
212#ifndef HPUX_5
213#ifndef __GNUC__
214#define C_SWITCH_MACHINE -Wc,-Nd4000,-Ns3000
215#endif
216#endif
217
20c428fd
JB
218/* Define NEED_BSDTTY if you have such. */
219
220#ifndef NOMULTIPLEJOBS
221#define NEED_BSDTTY
222#endif
223
b7cceaf1 224#endif /* not BSD4_3 */
6b61353c
KH
225
226/* arch-tag: 6e0001a5-ed62-4258-9235-204348f6bdb9
227 (do not change this comment) */