aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/mpstd.h
diff options
context:
space:
mode:
authorRichard Kistruck2008-10-21 18:32:26 +0100
committerRichard Kistruck2008-10-21 18:32:26 +0100
commit7ad16fa35c871a3f14966a65da6321c5ee1c5566 (patch)
tree0694d1d9c2d144b0e149d52de4c8914f345650e7 /mps/code/mpstd.h
parent9fb009a3b00c0e2af8848c0b2847587a75330a25 (diff)
downloademacs-7ad16fa35c871a3f14966a65da6321c5ee1c5566.tar.gz
emacs-7ad16fa35c871a3f14966a65da6321c5ee1c5566.zip
Mps br/vc9: mpstd.h: (for all remaining platforms)
- fix broken behaviour if CONFIG_PF_* is set (result depends on order of the various platform elifs!); change it to always use platform detection by looking at preprocessor symbols, and then (if CONFIG_PF_STRING *and* CONFIG_PF_* are set) check that CONFIG and detection match; xcppgc.gmk: define both CONFIG_PF_STRING and CONFIG_PF_*. Copied from Perforce Change: 166513 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/mpstd.h')
-rw-r--r--mps/code/mpstd.h132
1 files changed, 85 insertions, 47 deletions
diff --git a/mps/code/mpstd.h b/mps/code/mpstd.h
index e8da6a0c904..fb721e8bdda 100644
--- a/mps/code/mpstd.h
+++ b/mps/code/mpstd.h
@@ -63,9 +63,11 @@
63 * them. Alignment from testing. 63 * them. Alignment from testing.
64 */ 64 */
65 65
66#if defined(CONFIG_PF_I5M2CC) \ 66#if defined(__sgi) && defined(__unix) && defined(__mips) \
67 || defined(__sgi) && defined(__unix) && defined(__mips) \ 67 && defined(_SYSTYPE_SVR4) && (_MIPS_FPSET == 16)
68 && defined(_SYSTYPE_SVR4) && (_MIPS_FPSET == 16) 68#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_I5M2CC)
69#error "specified CONFIG_PF_... inconsistent with detected i5m2cc"
70#endif
69#define MPS_PF_I5M2CC 71#define MPS_PF_I5M2CC
70#define MPS_PF_STRING "i5m2cc" 72#define MPS_PF_STRING "i5m2cc"
71#define MPS_OS_I5 73#define MPS_OS_I5
@@ -78,9 +80,11 @@
78 80
79/* See above. Alignment from testing. */ 81/* See above. Alignment from testing. */
80 82
81#elif defined(CONFIG_PF_IAM4CC) \ 83#elif defined(__sgi) && defined(__unix) && defined(__mips) \
82 || defined(__sgi) && defined(__unix) && defined(__mips) \ 84 && defined(_SYSTYPE_SVR4) && defined(_ABIN32)
83 && defined(_SYSTYPE_SVR4) && defined(_ABIN32) 85#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_IAM4CC)
86#error "specified CONFIG_PF_... inconsistent with detected iam4cc"
87#endif
84#define MPS_PF_IAM4CC 88#define MPS_PF_IAM4CC
85#define MPS_PF_STRING "iam4cc" 89#define MPS_PF_STRING "iam4cc"
86#define MPS_OS_IA 90#define MPS_OS_IA
@@ -93,8 +97,10 @@
93 97
94/* winnt.h from MS VC 2.0 */ 98/* winnt.h from MS VC 2.0 */
95 99
96#elif defined(CONFIG_PF_W3ALMV) \ 100#elif defined(_MSC_VER) && defined(_WIN32) && defined(_M_ALPHA)
97 || defined(_MSC_VER) && defined(_WIN32) && defined(_M_ALPHA) 101#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_W3ALMV)
102#error "specified CONFIG_PF_... inconsistent with detected w3almv"
103#endif
98#define MPS_PF_W3ALMV 104#define MPS_PF_W3ALMV
99#define MPS_PF_STRING "w3almv" 105#define MPS_PF_STRING "w3almv"
100#define MPS_OS_W3 106#define MPS_OS_W3
@@ -107,8 +113,10 @@
107 113
108/* winnt.h from MS VC 2.0 */ 114/* winnt.h from MS VC 2.0 */
109 115
110#elif defined(CONFIG_PF_W3PPMV) \ 116#elif defined(_MSC_VER) && defined(_WIN32) && defined(_M_PPC)
111 || defined(_MSC_VER) && defined(_WIN32) && defined(_M_PPC) 117#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_W3PPMV)
118#error "specified CONFIG_PF_... inconsistent with detected w3ppmv"
119#endif
112#define MPS_PF_W3PPMV 120#define MPS_PF_W3PPMV
113#define MPS_PF_STRING "w3ppmv" 121#define MPS_PF_STRING "w3ppmv"
114#define MPS_OS_W3 122#define MPS_OS_W3
@@ -162,8 +170,10 @@
162 * a way to determine the OS -- we assume MacOS 7. 170 * a way to determine the OS -- we assume MacOS 7.
163 */ 171 */
164 172
165#elif defined(CONFIG_PF_S760MW) \ 173#elif (defined(__MWERKS__) && __MC68K__ == 1)
166 || (defined(__MWERKS__) && __MC68K__ == 1) 174#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_S760MW)
175#error "specified CONFIG_PF_... inconsistent with detected s760mw"
176#endif
167#define MPS_PF_S760MW 177#define MPS_PF_S760MW
168#define MPS_PF_STRING "s760mw" 178#define MPS_PF_STRING "s760mw"
169#define MPS_OS_S7 179#define MPS_OS_S7
@@ -178,8 +188,10 @@
178 * a way to determine the OS -- we assume MacOS 7. 188 * a way to determine the OS -- we assume MacOS 7.
179 */ 189 */
180 190
181#elif defined(CONFIG_PF_S7PPMW) \ 191#elif defined(__MWERKS__) && __POWERPC__ == 1
182 || defined(__MWERKS__) && __POWERPC__ == 1 192#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_S7PPMW)
193#error "specified CONFIG_PF_... inconsistent with detected s7ppmw"
194#endif
183#define MPS_PF_S7PPMW 195#define MPS_PF_S7PPMW
184#define MPS_PF_STRING "s7ppmw" 196#define MPS_PF_STRING "s7ppmw"
185#define MPS_OS_S7 197#define MPS_OS_S7
@@ -196,8 +208,10 @@
196 * which lets us determine the system version. 208 * which lets us determine the system version.
197 */ 209 */
198 210
199#elif defined(CONFIG_PF_S760AC) \ 211#elif defined(m68k) && (defined (applec) || defined(__SC__))
200 || defined(m68k) && (defined (applec) || defined(__SC__)) 212#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_S760AC)
213#error "specified CONFIG_PF_... inconsistent with detected s760ac"
214#endif
201#define MPS_PF_S760AC 215#define MPS_PF_S760AC
202#define MPS_PF_STRING "s760ac" 216#define MPS_PF_STRING "s760ac"
203#define MPS_OS_S7 217#define MPS_OS_S7
@@ -214,8 +228,10 @@
214 * which lets us determine the system version. 228 * which lets us determine the system version.
215 */ 229 */
216 230
217#elif defined(CONFIG_PF_S7PPAC) \ 231#elif defined(__PPCC__) || (defined(__MRC__) && defined(__POWERPC))
218 || defined(__PPCC__) || (defined(__MRC__) && defined(__POWERPC)) 232#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_S7PPAC)
233#error "specified CONFIG_PF_... inconsistent with detected s7ppac"
234#endif
219#define MPS_PF_S7PPAC 235#define MPS_PF_S7PPAC
220#define MPS_PF_STRING "s7ppac" 236#define MPS_PF_STRING "s7ppac"
221#define MPS_OS_S7 237#define MPS_OS_S7
@@ -231,9 +247,11 @@
231 * ools/Preprocessor/Preprocessor.[ef].html> 247 * ools/Preprocessor/Preprocessor.[ef].html>
232 */ 248 */
233 249
234#elif defined(CONFIG_PF_XCPPGC) \ 250#elif defined(__APPLE__) && defined(__ppc__) && defined(__MACH__) \
235 || defined(__APPLE__) && defined(__ppc__) && defined(__MACH__) \ 251 && defined(__GNUC__)
236 && defined(__GNUC__) 252#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_XCPPGC)
253#error "specified CONFIG_PF_... inconsistent with detected xcppgc"
254#endif
237#define MPS_PF_XCPPGC 255#define MPS_PF_XCPPGC
238#define MPS_PF_STRING "xcppgc" 256#define MPS_PF_STRING "xcppgc"
239#define MPS_OS_XC 257#define MPS_OS_XC
@@ -249,9 +267,11 @@
249 * And above for xcppgc. 267 * And above for xcppgc.
250 */ 268 */
251 269
252#elif defined(CONFIG_PF_XCI3GC) \ 270#elif defined(__APPLE__) && defined(__i386__) && defined(__MACH__) \
253 || defined(__APPLE__) && defined(__i386__) && defined(__MACH__) \ 271 && defined(__GNUC__)
254 && defined(__GNUC__) 272#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_XCI3GC)
273#error "specified CONFIG_PF_... inconsistent with detected xci3gc"
274#endif
255#define MPS_PF_XCI3GC 275#define MPS_PF_XCI3GC
256#define MPS_PF_STRING "xci3gc" 276#define MPS_PF_STRING "xci3gc"
257#define MPS_OS_XC 277#define MPS_OS_XC
@@ -264,9 +284,11 @@
264 284
265/* GCC 2.5.8, gcc -E -dM, (__SVR4 indicates Solaris) */ 285/* GCC 2.5.8, gcc -E -dM, (__SVR4 indicates Solaris) */
266 286
267#elif defined(CONFIG_PF_SUS8GC) \ 287#elif defined(__sun__) && defined(__sparc__) && defined(__GNUC__) \
268 || defined(__sun__) && defined(__sparc__) && defined(__GNUC__) \ 288 && !defined(__svr4__)
269 && !defined(__svr4__) 289#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_SUS8GC)
290#error "specified CONFIG_PF_... inconsistent with detected sus8gc"
291#endif
270#define MPS_PF_SUS8GC 292#define MPS_PF_SUS8GC
271#define MPS_PF_STRING "sus8gc" 293#define MPS_PF_STRING "sus8gc"
272#define MPS_OS_SU 294#define MPS_OS_SU
@@ -279,9 +301,11 @@
279 301
280/* LCC 3.4 (ish), man page */ 302/* LCC 3.4 (ish), man page */
281 303
282#elif defined(CONFIG_PF_SUS8LC) \ 304#elif defined(sun) && defined(sparc) && defined(__LCC__) \
283 || defined(sun) && defined(sparc) && defined(__LCC__) \ 305 && !defined(__svr4__)
284 && !defined(__svr4__) 306#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_SUS8LC)
307#error "specified CONFIG_PF_... inconsistent with detected sus8lc"
308#endif
285#define MPS_PF_SUS8LC 309#define MPS_PF_SUS8LC
286#define MPS_PF_STRING "sus8lc" 310#define MPS_PF_STRING "sus8lc"
287#define MPS_OS_SU 311#define MPS_OS_SU
@@ -294,9 +318,11 @@
294 318
295/* GCC 2.5.8, gcc -E -dM */ 319/* GCC 2.5.8, gcc -E -dM */
296 320
297#elif defined(CONFIG_PF_SOS8GC) \ 321#elif defined(__sun__) && defined(__sparc__) && defined(__GNUC__) \
298 || defined(__sun__) && defined(__sparc__) && defined(__GNUC__) \ 322 && defined(__svr4__)
299 && defined(__svr4__) 323#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_SOS8GC)
324#error "specified CONFIG_PF_... inconsistent with detected sos8gc"
325#endif
300#define MPS_PF_SOS8GC 326#define MPS_PF_SOS8GC
301#define MPS_PF_STRING "sos8gc" 327#define MPS_PF_STRING "sos8gc"
302#define MPS_OS_SO 328#define MPS_OS_SO
@@ -312,9 +338,11 @@
312 * macros for that. 338 * macros for that.
313 */ 339 */
314 340
315#elif defined(CONFIG_PF_SOS9SC) \ 341#elif defined(__sun) && defined(__SUNPRO_C) && defined(__SVR4) \
316 || defined(__sun) && defined(__SUNPRO_C) && defined(__SVR4) \ 342 && defined(__sparc)
317 && defined(__sparc) 343#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_SOS9SC)
344#error "specified CONFIG_PF_... inconsistent with detected sos9sc"
345#endif
318#define MPS_PF_SOS9SC 346#define MPS_PF_SOS9SC
319#define MPS_PF_STRING "sos9sc" 347#define MPS_PF_STRING "sos9sc"
320#define MPS_OS_SO 348#define MPS_OS_SO
@@ -327,8 +355,10 @@
327 355
328/* GCC 2.6.3, gcc -E -dM */ 356/* GCC 2.6.3, gcc -E -dM */
329 357
330#elif defined(CONFIG_PF_O1ALGC) \ 358#elif defined(__osf__) && defined(__alpha__) && defined(__GNUC__)
331 || defined(__osf__) && defined(__alpha__) && defined(__GNUC__) 359#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_O1ALGC)
360#error "specified CONFIG_PF_... inconsistent with detected o1algc"
361#endif
332#define MPS_PF_O1ALGC 362#define MPS_PF_O1ALGC
333#define MPS_PF_STRING "o1algc" 363#define MPS_PF_STRING "o1algc"
334#define MPS_OS_O1 364#define MPS_OS_O1
@@ -341,8 +371,10 @@
341 371
342/* From the cc(1) man page */ 372/* From the cc(1) man page */
343 373
344#elif defined(CONFIG_PF_O1ALCC) \ 374#elif defined(__osf__) && defined(__alpha) && defined(__DECC)
345 || defined(__osf__) && defined(__alpha) && defined(__DECC) 375#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_O1ALCC)
376#error "specified CONFIG_PF_... inconsistent with detected o1alcc"
377#endif
346#define MPS_PF_O1ALCC 378#define MPS_PF_O1ALCC
347#define MPS_PF_STRING "o1alcc" 379#define MPS_PF_STRING "o1alcc"
348#define MPS_OS_O1 380#define MPS_OS_O1
@@ -358,8 +390,10 @@
358 * all 4. 390 * all 4.
359 */ 391 */
360 392
361#elif defined(CONFIG_PF_LII4GC) \ 393#elif defined(__linux__) && defined(__i386__) && defined(__GNUC__)
362 || defined(__linux__) && defined(__i386__) && defined(__GNUC__) 394#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_LII4GC)
395#error "specified CONFIG_PF_... inconsistent with detected lii4gc"
396#endif
363#define MPS_PF_LII4GC 397#define MPS_PF_LII4GC
364#define MPS_PF_STRING "lii4gc" 398#define MPS_PF_STRING "lii4gc"
365#define MPS_OS_LI 399#define MPS_OS_LI
@@ -372,8 +406,10 @@
372 406
373/* GCC 2.7.2, gcc -E -dM */ 407/* GCC 2.7.2, gcc -E -dM */
374 408
375#elif defined(CONFIG_PF_LIPPGC) \ 409#elif defined(__linux__) && defined(__PPC__) && defined(__GNUC__)
376 || defined(__linux__) && defined(__PPC__) && defined(__GNUC__) 410#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_LIPPGC)
411#error "specified CONFIG_PF_... inconsistent with detected lippgc"
412#endif
377#define MPS_PF_LIPPGC 413#define MPS_PF_LIPPGC
378#define MPS_PF_STRING "lippgc" 414#define MPS_PF_STRING "lippgc"
379#define MPS_OS_LI 415#define MPS_OS_LI
@@ -387,8 +423,10 @@
387/* GCC 2.95.3, gcc -E -dM 423/* GCC 2.95.3, gcc -E -dM
388 */ 424 */
389 425
390#elif defined(CONFIG_PF_FRI4GC) \ 426#elif defined(__FreeBSD__) && defined (__i386__) && defined (__GNUC__)
391 || defined(__FreeBSD__) && defined (__i386__) && defined (__GNUC__) 427#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_FRI4GC)
428#error "specified CONFIG_PF_... inconsistent with detected fri4gc"
429#endif
392#define MPS_PF_FRI4GC 430#define MPS_PF_FRI4GC
393#define MPS_PF_STRING "fri4gc" 431#define MPS_PF_STRING "fri4gc"
394#define MPS_OS_FR 432#define MPS_OS_FR
@@ -409,7 +447,7 @@
409 447
410/* C. COPYRIGHT AND LICENSE 448/* C. COPYRIGHT AND LICENSE
411 * 449 *
412 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 450 * Copyright (C) 2001-2002,2008 Ravenbrook Limited <http://www.ravenbrook.com/>.
413 * All rights reserved. This is an open source license. Contact 451 * All rights reserved. This is an open source license. Contact
414 * Ravenbrook for commercial licensing options. 452 * Ravenbrook for commercial licensing options.
415 * 453 *