Initial git import
[sxemacs] / src / m / intel386.h
1 /* Machine description file for intel 386.
2    Copyright (C) 1987 Free Software Foundation, Inc.
3
4 This file is part of SXEmacs
5
6 SXEmacs 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 3 of the License, or
9 (at your option) any later version.
10
11 SXEmacs 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 this program.  If not, see <http://www.gnu.org/licenses/>. */
18
19
20 /* Synched up with: FSF 19.31. */
21
22 /* The following line tells the configuration script what sort of 
23    operating system this machine is likely to run.
24    USUAL-OPSYS="note"
25
26 NOTE-START
27 Intel 386 (-machine=intel386 or -machine=is386.h)
28
29   The possibilities for -opsystem are: bsd4-2, usg5-2-2, usg5-3,
30   isc2-2, 386-ix, esix, linux, sco3.2v4, and xenix.
31
32   18.58 should support a wide variety of operating systems.
33   Use isc2-2 for Interactive 386/ix version 2.2.
34   Use 386ix for prior versions.
35   Use esix for Esix.
36   Use linux for Linux.
37   It isn't clear what to do on an SCO system.
38
39   -machine=is386 is used for an Integrated Solutions 386 machine.
40   It may also be correct for Microport systems.
41
42 Cubix QBx/386 (-machine=intel386 -opsystem=usg5-3)
43
44   Changes merged in 19.1.  Systems before 2/A/0 may fail to compile etags.c
45   due to a compiler bug.
46
47 Prime EXL (-machine=intel386 -opsystem=usg5-3)
48
49   Minor changes merged in 19.1.
50 NOTE-END */
51
52 /* Now define a symbol for the cpu type, if your compiler
53    does not define it automatically:
54    Ones defined so far include vax, m68000, ns16000, pyramid,
55    orion, tahoe, APOLLO and many others */
56
57 #define INTEL386
58
59 /* crt0.c, if it is used, should use the i386-bsd style of entry.
60    with no extra dummy args.  On USG and XENIX,
61    NO_REMAP says this isn't used. */
62
63 /* Mly 16-Jan-96 16:38:32: this is part of a prototype -- same bug present in 
64    other m*.h files */
65 #define CRT0_DUMMIES int bogus_fp,
66
67 /* crt0.c should define a symbol `start' and do .globl with a dot.  */
68
69 #define DOT_GLOBAL_START
70
71 #ifdef XENIX
72 /* Data type of load average, as read out of kmem.  */
73 #define LOAD_AVE_TYPE short
74
75 /* Convert that into an integer that is 100 for a load average of 1.0  */
76 #define LOAD_AVE_CVT(x) (((double) (x)) * 100.0 / FSCALE)
77
78 #define FSCALE 256.0            /* determined by experimentation...  */
79 #endif
80
81 #ifdef SOLARIS2
82 /* Data type of load average, as read out of kmem.  */
83 #define LOAD_AVE_TYPE long
84
85 /* Convert that into an integer that is 100 for a load average of 1.0  */
86 /* This is totally uncalibrated. */
87 #define LOAD_AVE_CVT(x) ((int) (((double) (x)) * 100.0 / FSCALE))
88
89 /* configure thinks solaris X86 has gethostname, but it does not work,
90    so undefine it.  */
91 #undef HAVE_GETHOSTNAME
92
93 #else                           /* not SOLARIS2 */
94 #ifdef USG5_4                   /* Older USG systems do not support the load average.  */
95 /* Data type of load average, as read out of kmem.  */
96
97 #define LOAD_AVE_TYPE long
98
99 /* Convert that into an integer that is 100 for a load average of 1.0  */
100 /* This is totally uncalibrated. */
101
102 #define LOAD_AVE_CVT(x) ((int) (((double) (x)) * 100.0 / FSCALE))
103 #define FSCALE 256.0
104 #endif
105 #endif                          /* not SOLARIS2 */
106
107 /* Define CANNOT_DUMP on machines where unexec does not work.
108    Then the function dump-emacs will not be defined
109    and temacs will do (load "loadup") automatically unless told otherwise.  */
110
111 /* #define CANNOT_DUMP */
112
113 #ifdef XENIX
114
115 /* Define NO_REMAP if memory segmentation makes it not work well
116    to change the boundary between the text section and data section
117    when Emacs is dumped.  If you define this, the preloaded Lisp
118    code will not be sharable; but that's better than failing completely.  */
119
120 #define NO_REMAP
121
122 #define STACK_DIRECTION -1
123
124 /* Since cannot purify, use standard Xenix 386 startup code. */
125
126 #define START_FILES "/lib/386/Sseg.o pre-crt0.o /lib/386/Scrt0.o"
127
128 /* These really use terminfo.  */
129
130 #define LIBS_TERMCAP "/lib/386/Slibcurses.a /lib/386/Slibtinfo.a /lib/386/Slibx.a"
131
132 /* Standard libraries for this machine.  Since `-l' doesn't work in `ld'.  */
133 /* '__fltused' is unresolved w/o Slibcfp.a */
134 #define LIB_STANDARD "/lib/386/Slibcfp.a /lib/386/Slibc.a"
135 #else                           /* not XENIX */
136
137 #ifdef USG
138
139 #define NO_REMAP
140 #define TEXT_START 0
141 #endif                          /* USG */
142 #endif                          /* not XENIX */
143
144 #ifdef linux
145 /* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */
146 /* we cannot get the maximum address for brk */
147 #define ULIMIT_BREAK_VALUE (32*1024*1024)
148
149 #define SEGMENT_MASK ((SEGMENT_SIZE)-1)
150 #endif
151
152 #ifdef __GNUC__
153 /* GCC's alloca() is semi-broken.  See lisp.h.
154
155    This brokenness has been confirmed under both Linux and NetBSD.
156    It may also exist on non-Intel architectures. */
157 #undef BROKEN_ALLOCA_IN_FUNCTION_CALLS
158 #define BROKEN_ALLOCA_IN_FUNCTION_CALLS 1
159 #endif
160
161 /* XEmacs change: John Hughes <john@AtlanTech.COM> says using vfork
162    under i386-unknown-sysv4.2 makes C-g sometimes cause a SIGSEGV
163    in TTY mode; the problem goes away if you use fork */
164 #ifdef USG5_4_2
165 #define vfork fork
166 #endif