Mac OS 9
ConditionalMacros.h
Go to the documentation of this file.
1 
17 #ifndef __CONDITIONALMACROS__
18 #define __CONDITIONALMACROS__
19 
20 /*****************************************************************************************************
21  UNIVERSAL_INTERFACES_VERSION
22 
23  0x0400 --> version 4.0 (Mac OS X only)
24  0x0341 --> version 3.4.1
25  0x0340 --> version 3.4
26  0x0331 --> version 3.3.1
27  0x0330 --> version 3.3
28  0x0320 --> version 3.2
29  0x0310 --> version 3.1
30  0x0301 --> version 3.0.1
31  0x0300 --> version 3.0
32  0x0210 --> version 2.1
33  This conditional did not exist prior to version 2.1
34 ****************************************************************************************************/
35 #define UNIVERSAL_INTERFACES_VERSION 0x0341
36 
37 /*****************************************************************************************************
38 
39  TARGET_CPU_©
40  These conditionals specify which microprocessor instruction set is being
41  generated. At most one of these is true, the rest are false.
42 
43  TARGET_CPU_PPC - Compiler is generating PowerPC instructions
44  TARGET_CPU_68K - Compiler is generating 680x0 instructions
45  TARGET_CPU_X86 - Compiler is generating x86 instructions
46  TARGET_CPU_MIPS - Compiler is generating MIPS instructions
47  TARGET_CPU_SPARC - Compiler is generating Sparc instructions
48  TARGET_CPU_ALPHA - Compiler is generating Dec Alpha instructions
49 
50 
51  TARGET_OS_©
52  These conditionals specify in which Operating System the generated code will
53  run. At most one of the these is true, the rest are false.
54 
55  TARGET_OS_MAC - Generate code will run under Mac OS
56  TARGET_OS_WIN32 - Generate code will run under 32-bit Windows
57  TARGET_OS_UNIX - Generate code will run under some unix
58 
59 
60  TARGET_RT_©
61  These conditionals specify in which runtime the generated code will
62  run. This is needed when the OS and CPU support more than one runtime
63  (e.g. MacOS on 68K supports CFM68K and Classic 68k).
64 
65  TARGET_RT_LITTLE_ENDIAN - Generated code uses little endian format for
66 integers TARGET_RT_BIG_ENDIAN - Generated code uses big endian format for
67 integers TARGET_RT_MAC_CFM - TARGET_OS_MAC is true and CFM68K or PowerPC
68 CFM (TVectors) are used TARGET_RT_MAC_MACHO - TARGET_OS_MAC is true and
69 Mach-O style runtime TARGET_RT_MAC_68881 - TARGET_OS_MAC is true and 68881
70 floating point instructions used
71 
72 
73  TARGET__API_©_©
74  These conditionals are used to differentiate between sets of API's on the
75 same processor under the same OS. The first section after _API_ is the OS. The
76  second section is the API set. Unlike TARGET_OS_ and TARGET_CPU_, these
77  conditionals are not mutally exclusive. This file will attempt to
78 auto-configure all TARGET_API_©_© values, but will often need a TARGET_API_©_©
79 value predefined in order to disambiguate.
80 
81  TARGET_API_MAC_OS8 - Code is being compiled to run on System 7
82 through Mac OS 8.x TARGET_API_MAC_CARBON - Code is being compiled to run on
83 Mac OS 8 and Mac OS X via CarbonLib TARGET_API_MAC_OSX - Code is being
84 compiled to run on Mac OS X
85 
86 
87  PRAGMA_©
88  These conditionals specify whether the compiler supports particular
89 #pragma's
90 
91  PRAGMA_IMPORT - Compiler supports: #pragma import on/off/reset
92  PRAGMA_ONCE - Compiler supports: #pragma once
93  PRAGMA_STRUCT_ALIGN - Compiler supports: #pragma options
94 align=mac68k/power/reset PRAGMA_STRUCT_PACK - Compiler supports: #pragma
95 pack(n) PRAGMA_STRUCT_PACKPUSH - Compiler supports: #pragma pack(push,
96 n)/pack(pop) PRAGMA_ENUM_PACK - Compiler supports: #pragma
97 options(!pack_enums) PRAGMA_ENUM_ALWAYSINT - Compiler supports: #pragma
98 enumsalwaysint on/off/reset PRAGMA_ENUM_OPTIONS - Compiler supports: #pragma
99 options enum=int/small/reset
100 
101 
102  FOUR_CHAR_CODE
103  This conditional does the proper byte swapping to assue that a four
104 character code (e.g. 'TEXT') is compiled down to the correct value on all
105 compilers.
106 
107  FOUR_CHAR_CODE('abcd') - Convert a four-char-code to the correct 32-bit
108 value
109 
110 
111  TYPE_©
112  These conditionals specify whether the compiler supports particular types.
113 
114  TYPE_LONGLONG - Compiler supports "long long" 64-bit
115 integers TYPE_BOOL - Compiler supports "bool" TYPE_EXTENDED -
116 Compiler supports "extended" 80/96 bit floating point TYPE_LONGDOUBLE_IS_DOUBLE
117 - Compiler implements "long double" same as "double"
118 
119 
120  FUNCTION_©
121  These conditionals specify whether the compiler supports particular language
122 extensions to function prototypes and definitions.
123 
124  FUNCTION_PASCAL - Compiler supports "pascal void Foo()"
125  FUNCTION_DECLSPEC - Compiler supports "__declspec(xxx) void Foo()"
126  FUNCTION_WIN32CC - Compiler supports "void __cdecl Foo()" and
127 "void __stdcall Foo()"
128 
129 ****************************************************************************************************/
130 
131 #if defined(__MRC__)
135 #define TARGET_CPU_PPC 1
136 #define TARGET_CPU_68K 0
137 #define TARGET_CPU_X86 0
138 #define TARGET_CPU_MIPS 0
139 #define TARGET_CPU_SPARC 0
140 #define TARGET_CPU_ALPHA 0
141 #define TARGET_OS_MAC 1
142 #define TARGET_OS_WIN32 0
143 #define TARGET_OS_UNIX 0
144 #define TARGET_RT_LITTLE_ENDIAN 0
145 #define TARGET_RT_BIG_ENDIAN 1
146 #define TARGET_RT_MAC_CFM 1
147 #define TARGET_RT_MAC_MACHO 0
148 #define TARGET_RT_MAC_68881 0
149 #if (__MRC__ > 0x0200) && (__MRC__ < 0x0700)
150 #define PRAGMA_IMPORT 1
151 #else
152 #define PRAGMA_IMPORT 0
153 #endif
154 #define PRAGMA_STRUCT_ALIGN 1
155 #define PRAGMA_ONCE 1
156 #define PRAGMA_STRUCT_PACK 0
157 #define PRAGMA_STRUCT_PACKPUSH 0
158 #define PRAGMA_ENUM_PACK 1
159 #define PRAGMA_ENUM_ALWAYSINT 0
160 #define PRAGMA_ENUM_OPTIONS 0
161 #define FOUR_CHAR_CODE(x) (x)
162 
163 #if (__MRC__ > 0x0300) && (__MRC__ < 0x0700)
164 #if __option(longlong)
165 
166 #define TYPE_LONGLONG 1
167 
168 #else
169 #define TYPE_LONGLONG 0
170 #endif
171 #if __option(bool)
172 #define TYPE_BOOL 1
173 #else
174 #define TYPE_BOOL 0
175 #endif
176 #define SLASH_INCLUDES_UNSUPPORTED !__option(unix_includes)
177 #else
178 #define TYPE_LONGLONG 0
179 #define TYPE_BOOL 0
180 #define SLASH_INCLUDES_UNSUPPORTED 1
181 #endif
182 #define TYPE_EXTENDED 0
183 #define TYPE_LONGDOUBLE_IS_DOUBLE 0
184 
185 #define FUNCTION_PASCAL 1
186 #define FUNCTION_DECLSPEC 0
187 #define FUNCTION_WIN32CC 0
188 
189 #elif defined(__SC__) && (defined(MPW_CPLUS) || defined(MPW_C))
193 #define TARGET_CPU_PPC 0
194 #define TARGET_CPU_68K 1
195 #define TARGET_CPU_X86 0
196 #define TARGET_CPU_MIPS 0
197 #define TARGET_CPU_SPARC 0
198 #define TARGET_CPU_ALPHA 0
199 #define TARGET_OS_MAC 1
200 #define TARGET_OS_WIN32 0
201 #define TARGET_OS_UNIX 0
202 #define TARGET_RT_LITTLE_ENDIAN 0
203 #define TARGET_RT_BIG_ENDIAN 1
204 #if defined(__CFM68K__)
205 #define TARGET_RT_MAC_CFM 1
206 #else
207 #define TARGET_RT_MAC_CFM 0
208 #endif
209 #define TARGET_RT_MAC_MACHO 0
210 #if defined(mc68881)
211 #define TARGET_RT_MAC_68881 1
212 #else
213 #define TARGET_RT_MAC_68881 0
214 #endif
215 #if TARGET_RT_MAC_CFM
216 #define PRAGMA_IMPORT 1
217 #if (__SC__ <= 0x0810)
219 #define PRAGMA_IMPORT_OFF 1
220 #endif
221 #else
222 #define PRAGMA_IMPORT 0
223 #endif
224 #if (__SC__ >= 0x0801)
225 #define PRAGMA_STRUCT_ALIGN 1
226 #else
227 #define PRAGMA_STRUCT_ALIGN 0
228 #endif
229 #define PRAGMA_ONCE 0
230 #define PRAGMA_STRUCT_PACK 0
231 #define PRAGMA_STRUCT_PACKPUSH 0
232 #define PRAGMA_ENUM_PACK 1
233 #define PRAGMA_ENUM_ALWAYSINT 0
234 #define PRAGMA_ENUM_OPTIONS 0
235 #define FOUR_CHAR_CODE(x) (x)
236 
237 #define TYPE_LONGLONG 0
238 #define TYPE_EXTENDED 1
239 #define TYPE_LONGDOUBLE_IS_DOUBLE 0
240 #if (__SC__ > 0x0810)
241 #if __option(bool)
242 #define TYPE_BOOL 1
243 #else
244 #define TYPE_BOOL 0
245 #endif
246 #else
247 #define TYPE_BOOL 0
248 #endif
249 #if TARGET_RT_MAC_CFM
250 #define FUNCTION_PASCAL 0
251 #else
252 #define FUNCTION_PASCAL 1
253 #endif
254 #define FUNCTION_DECLSPEC 0
255 #define FUNCTION_WIN32CC 0
256 #define SLASH_INCLUDES_UNSUPPORTED !__option(unix_includes)
257 
258 #elif defined(__MWERKS__)
262 #if (__MWERKS__ < 0x0900) || macintosh
263 #define TARGET_OS_MAC 1
264 #define TARGET_OS_WIN32 0
265 #define TARGET_OS_UNIX 0
266 #define TARGET_CPU_X86 0
267 #define TARGET_CPU_MIPS 0
268 #define TARGET_CPU_SPARC 0
269 #define TARGET_CPU_ALPHA 0
270 #define TARGET_RT_LITTLE_ENDIAN 0
271 #define TARGET_RT_BIG_ENDIAN 1
272 #if powerc
273 #define TARGET_CPU_PPC 1
274 #define TARGET_CPU_68K 0
275 #define TARGET_RT_MAC_CFM 1
276 #define TARGET_RT_MAC_MACHO 0
277 #define TARGET_RT_MAC_68881 0
278 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
279 #else
280 #define TARGET_CPU_PPC 0
281 #define TARGET_CPU_68K 1
282 #if defined(__CFM68K__)
283 #define TARGET_RT_MAC_CFM 1
284 #else
285 #define TARGET_RT_MAC_CFM 0
286 #endif
287 #define TARGET_RT_MAC_MACHO 0
288 #if __MC68881__
289 #define TARGET_RT_MAC_68881 1
290 #else
291 #define TARGET_RT_MAC_68881 0
292 #endif
293 #if __option(IEEEdoubles)
294 #define TYPE_LONGDOUBLE_IS_DOUBLE 0
295 #else
296 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
297 #endif
298 #endif
299 #define PRAGMA_ONCE 1
300 #if (__MWERKS__ >= 0x0700)
301 #define PRAGMA_IMPORT TARGET_RT_MAC_CFM
302 #else
303 #define PRAGMA_IMPORT 0
304 #endif
305 #define PRAGMA_STRUCT_ALIGN 1
306 #define PRAGMA_STRUCT_PACK 0
307 #define PRAGMA_STRUCT_PACKPUSH 0
308 #define PRAGMA_ENUM_PACK 0
309 #define PRAGMA_ENUM_ALWAYSINT 1
310 #define PRAGMA_ENUM_OPTIONS 0
311 #if __option(enumsalwaysint) && __option(ANSI_strict)
312 #define FOUR_CHAR_CODE(x) \
313  ((long)(x))
315 #else
316 #define FOUR_CHAR_CODE(x) (x)
317 #endif
318 #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
319 #define FUNCTION_PASCAL 1
320 #else
321 #define FUNCTION_PASCAL 1
322 #endif
323 #if (__MWERKS__ >= 0x2000)
324 #define FUNCTION_DECLSPEC 1
325 #else
326 #define FUNCTION_DECLSPEC 0
327 #endif
328 #define FUNCTION_WIN32CC 0
329 
330 #elif (__MWERKS__ >= 0x0900) && __INTEL__
331 #define TARGET_CPU_PPC 0
332 #define TARGET_CPU_68K 0
333 #define TARGET_CPU_X86 1
334 #define TARGET_CPU_MIPS 0
335 #define TARGET_CPU_SPARC 0
336 #define TARGET_CPU_ALPHA 0
337 #define TARGET_OS_MAC 0
338 #define TARGET_OS_WIN32 1
339 #define TARGET_OS_UNIX 0
340 #define TARGET_RT_LITTLE_ENDIAN 1
341 #define TARGET_RT_BIG_ENDIAN 0
342 #define PRAGMA_ONCE 1
343 #define PRAGMA_IMPORT 0
344 #define PRAGMA_STRUCT_ALIGN 0
345 #define PRAGMA_STRUCT_PACK 1
346 #define PRAGMA_STRUCT_PACKPUSH 1
347 #define PRAGMA_ENUM_PACK 0
348 #define PRAGMA_ENUM_ALWAYSINT 1
349 #define PRAGMA_ENUM_OPTIONS 0
350 #define FOUR_CHAR_CODE(x) (x)
351 #define FUNCTION_PASCAL 0
352 #ifndef FUNCTION_DECLSPEC
354 #define FUNCTION_DECLSPEC 0
355 #endif
356 #ifndef FUNCTION_WIN32CC
357 #define FUNCTION_WIN32CC 1
358 #endif
359 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
360 
361 #elif (__MWERKS__ >= 0x1900) && __MIPS__
362 #define TARGET_CPU_PPC 0
363 #define TARGET_CPU_68K 0
364 #define TARGET_CPU_X86 0
365 #define TARGET_CPU_MIPS 1
366 #define TARGET_CPU_SPARC 0
367 #define TARGET_CPU_ALPHA 0
368 #define TARGET_OS_MAC 0
369 #define TARGET_OS_WIN32 0
370 #define TARGET_OS_UNIX 1
371 #if __option(little_endian)
372 #define TARGET_RT_LITTLE_ENDIAN 1
373 #define TARGET_RT_BIG_ENDIAN 0
374 #else
375 #define TARGET_RT_LITTLE_ENDIAN 0
376 #define TARGET_RT_BIG_ENDIAN 1
377 #endif
378 #define PRAGMA_ONCE 1
379 #define PRAGMA_IMPORT 0
380 #define PRAGMA_STRUCT_ALIGN 0
381 #define PRAGMA_STRUCT_PACK 1
382 #define PRAGMA_STRUCT_PACKPUSH 0
383 #define PRAGMA_ENUM_PACK 0
384 #define PRAGMA_ENUM_ALWAYSINT 1
385 #define PRAGMA_ENUM_OPTIONS 0
386 #define FOUR_CHAR_CODE(x) (x)
387 #define FUNCTION_PASCAL 0
388 #define FUNCTION_DECLSPEC 0
389 #define FUNCTION_WIN32CC 0
390 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
391 
392 #elif (__MWERKS__ >= 0x2110) && __MACH__
393 #define TARGET_CPU_PPC 1
394 #define TARGET_CPU_68K 0
395 #define TARGET_CPU_X86 0
396 #define TARGET_CPU_MIPS 0
397 #define TARGET_CPU_SPARC 0
398 #define TARGET_CPU_ALPHA 0
399 #define TARGET_OS_MAC 1
400 #define TARGET_OS_WIN32 0
401 #define TARGET_OS_UNIX 0
402 #if __option(little_endian)
403 #define TARGET_RT_LITTLE_ENDIAN 1
404 #define TARGET_RT_BIG_ENDIAN 0
405 #else
406 #define TARGET_RT_LITTLE_ENDIAN 0
407 #define TARGET_RT_BIG_ENDIAN 1
408 #endif
409 #define TARGET_RT_MAC_CFM 0
410 #define TARGET_RT_MAC_MACHO 1
411 #define TARGET_RT_MAC_68881 0
412 #define PRAGMA_ONCE 1
413 #define PRAGMA_IMPORT 0
414 #define PRAGMA_STRUCT_ALIGN 1
415 #define PRAGMA_STRUCT_PACK 1
416 #define PRAGMA_STRUCT_PACKPUSH 0
417 #define PRAGMA_ENUM_PACK 0
418 #define PRAGMA_ENUM_ALWAYSINT 1
419 #define PRAGMA_ENUM_OPTIONS 0
420 #define FOUR_CHAR_CODE(x) (x)
421 #define FUNCTION_PASCAL 1
422 #define FUNCTION_DECLSPEC 1
423 #define FUNCTION_WIN32CC 0
424 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
425 #else
426 #error unknown Metrowerks compiler
427 #endif
428 
429 #if (__MWERKS__ >= 0x1100)
430 #if __option(longlong)
431 #define TYPE_LONGLONG 1
432 #else
433 #define TYPE_LONGLONG 0
434 #endif
435 #else
436 #define TYPE_LONGLONG 0
437 #endif
438 #if (__MWERKS__ >= 0x1000)
439 #if __option(bool)
440 #define TYPE_BOOL 1
441 #else
442 #define TYPE_BOOL 0
443 #endif
444 #else
445 #define TYPE_BOOL 0
446 #endif
447 #define TYPE_EXTENDED 0
448 #define SLASH_INCLUDES_UNSUPPORTED 1
449 
450 #elif defined(SYMANTEC_CPLUS) || defined(SYMANTEC_C)
454 #define TARGET_OS_MAC 1
455 #define TARGET_OS_WIN32 0
456 #define TARGET_OS_UNIX 0
457 #define TARGET_CPU_X86 0
458 #define TARGET_CPU_MIPS 0
459 #define TARGET_CPU_SPARC 0
460 #define TARGET_CPU_ALPHA 0
461 #define TARGET_RT_LITTLE_ENDIAN 0
462 #define TARGET_RT_BIG_ENDIAN 1
463 #if powerc
464 #define TARGET_CPU_PPC 1
465 #define TARGET_CPU_68K 0
466 #define TARGET_RT_MAC_CFM 1
467 #define TARGET_RT_MAC_MACHO 0
468 #define TARGET_RT_MAC_68881 0
469 #else
470 #define TARGET_CPU_PPC 0
471 #define TARGET_CPU_68K 1
472 #if defined(__CFM68K)
473 #define TARGET_RT_MAC_CFM 1
474 #else
475 #define TARGET_RT_MAC_CFM 0
476 #endif
477 #define TARGET_RT_MAC_MACHO 0
478 #if mc68881
479 #define TARGET_RT_MAC_68881 1
480 #else
481 #define TARGET_RT_MAC_68881 0
482 #endif
483 #endif
484 #define PRAGMA_IMPORT 0
485 #define PRAGMA_ONCE 1
486 #define PRAGMA_STRUCT_ALIGN 1
487 #define PRAGMA_STRUCT_PACK 0
488 #define PRAGMA_STRUCT_PACKPUSH 0
489 #define PRAGMA_ENUM_PACK 1
490 #define PRAGMA_ENUM_ALWAYSINT 0
491 #define PRAGMA_ENUM_OPTIONS 0
492 #define FOUR_CHAR_CODE(x) (x)
493 
494 #if __useAppleExts__
495 #define TYPE_EXTENDED 1
496 #else
497 #define TYPE_EXTENDED 0
498 #endif
499 #define TYPE_LONGLONG 0
500 #define TYPE_BOOL 0
501 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
502 
503 #define FUNCTION_PASCAL 0
504 #define FUNCTION_DECLSPEC 0
505 #define FUNCTION_WIN32CC 0
506 #define SLASH_INCLUDES_UNSUPPORTED 1
507 
508 #elif defined(THINK_C)
512 #define TARGET_CPU_PPC 0
513 #define TARGET_CPU_68K 1
514 #define TARGET_CPU_X86 0
515 #define TARGET_CPU_MIPS 0
516 #define TARGET_CPU_SPARC 0
517 #define TARGET_CPU_ALPHA 0
518 #define TARGET_OS_MAC 1
519 #define TARGET_OS_WIN32 0
520 #define TARGET_OS_UNIX 0
521 #define TARGET_RT_LITTLE_ENDIAN 0
522 #define TARGET_RT_BIG_ENDIAN 1
523 #define TARGET_RT_MAC_CFM 0
524 #define TARGET_RT_MAC_MACHO 0
525 #if defined(mc68881)
526 #define TARGET_RT_MAC_68881 1
527 #else
528 #define TARGET_RT_MAC_68881 0
529 #endif
530 #define PRAGMA_IMPORT 0
531 #define PRAGMA_STRUCT_ALIGN 0
532 #define PRAGMA_ONCE 1
533 #define PRAGMA_STRUCT_PACK 0
534 #define PRAGMA_STRUCT_PACKPUSH 0
535 #define PRAGMA_ENUM_PACK 1
536 #define PRAGMA_ENUM_ALWAYSINT 0
537 #define PRAGMA_ENUM_OPTIONS 0
538 #define FOUR_CHAR_CODE(x) (x)
539 
540 #define TYPE_EXTENDED 1
541 #define TYPE_LONGLONG 0
542 #define TYPE_BOOL 0
543 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
544 
545 #define FUNCTION_PASCAL 1
546 #define FUNCTION_DECLSPEC 0
547 #define FUNCTION_WIN32CC 0
548 #define SLASH_INCLUDES_UNSUPPORTED 1
549 
550 #elif defined(__PPCC__)
555 #define TARGET_CPU_PPC 1
556 #define TARGET_CPU_68K 0
557 #define TARGET_CPU_X86 0
558 #define TARGET_CPU_MIPS 0
559 #define TARGET_CPU_SPARC 0
560 #define TARGET_CPU_ALPHA 0
561 #define TARGET_OS_MAC 1
562 #define TARGET_OS_WIN32 0
563 #define TARGET_OS_UNIX 0
564 #define TARGET_RT_LITTLE_ENDIAN 0
565 #define TARGET_RT_BIG_ENDIAN 1
566 #define TARGET_RT_MAC_CFM 1
567 #define TARGET_RT_MAC_MACHO 0
568 #define TARGET_RT_MAC_68881 0
569 #define PRAGMA_IMPORT 0
570 #define PRAGMA_STRUCT_ALIGN 1
571 #define PRAGMA_ONCE 0
572 #define PRAGMA_STRUCT_PACK 0
573 #define PRAGMA_STRUCT_PACKPUSH 0
574 #define PRAGMA_ENUM_PACK 0
575 #define PRAGMA_ENUM_ALWAYSINT 0
576 #define PRAGMA_ENUM_OPTIONS 0
577 #define FOUR_CHAR_CODE(x) (x)
578 
579 #define TYPE_EXTENDED 0
580 #define TYPE_LONGLONG 0
581 #define TYPE_BOOL 0
582 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
583 
584 #define FUNCTION_PASCAL 0
585 #define FUNCTION_DECLSPEC 0
586 #define FUNCTION_WIN32CC 0
587 #define SLASH_INCLUDES_UNSUPPORTED 1
588 
589 #elif defined(applec) && !defined(__SC__)
594 #define TARGET_CPU_PPC 0
595 #define TARGET_CPU_68K 1
596 #define TARGET_CPU_X86 0
597 #define TARGET_CPU_MIPS 0
598 #define TARGET_CPU_SPARC 0
599 #define TARGET_CPU_ALPHA 0
600 #define TARGET_OS_MAC 1
601 #define TARGET_OS_WIN32 0
602 #define TARGET_OS_UNIX 0
603 #define TARGET_RT_LITTLE_ENDIAN 0
604 #define TARGET_RT_BIG_ENDIAN 1
605 #define TARGET_RT_MAC_CFM 0
606 #define TARGET_RT_MAC_MACHO 0
607 #if defined(mc68881)
608 #define TARGET_RT_MAC_68881 1
609 #else
610 #define TARGET_RT_MAC_68881 0
611 #endif
612 #define PRAGMA_IMPORT 0
613 #define PRAGMA_STRUCT_ALIGN 0
614 #define PRAGMA_ONCE 0
615 #define PRAGMA_STRUCT_PACK 0
616 #define PRAGMA_STRUCT_PACKPUSH 0
617 #define PRAGMA_ENUM_PACK 0
618 #define PRAGMA_ENUM_ALWAYSINT 0
619 #define PRAGMA_ENUM_OPTIONS 0
622 #define FOUR_CHAR_CODE
623 
624 #define TYPE_EXTENDED 1
625 #define TYPE_LONGLONG 0
626 #define TYPE_BOOL 0
627 #define TYPE_LONGDOUBLE_IS_DOUBLE 0
628 
629 #define FUNCTION_PASCAL 1
630 #define FUNCTION_DECLSPEC 0
631 #define FUNCTION_WIN32CC 0
632 #define SLASH_INCLUDES_UNSUPPORTED 1
633 
634 #elif defined(__GNUC__) && \
635  (defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__NEXT_CPP__))
639 #if defined(__ppc__) || defined(powerpc) || defined(ppc)
640 #define TARGET_CPU_PPC 1
641 #define TARGET_CPU_68K 0
642 #define TARGET_CPU_X86 0
643 #define TARGET_CPU_MIPS 0
644 #define TARGET_CPU_SPARC 0
645 #define TARGET_CPU_ALPHA 0
646 #define TARGET_RT_MAC_68881 0
647 #define TARGET_RT_LITTLE_ENDIAN 0
648 #define TARGET_RT_BIG_ENDIAN 1
649 #ifdef __MACH__
650 #define TARGET_RT_MAC_MACHO 1
651 #define TARGET_RT_MAC_CFM 0
652 #else
653 #define TARGET_RT_MAC_MACHO 0
654 #define TARGET_RT_MAC_CFM 1
655 #endif
656 #elif defined(m68k)
657 #define TARGET_CPU_PPC 0
658 #define TARGET_CPU_68K 1
659 #define TARGET_CPU_X86 0
660 #define TARGET_CPU_MIPS 0
661 #define TARGET_CPU_SPARC 0
662 #define TARGET_CPU_ALPHA 0
663 #define TARGET_RT_MAC_CFM 0
664 #define TARGET_RT_MAC_MACHO 1
665 #define TARGET_RT_MAC_68881 0
666 #define TARGET_RT_LITTLE_ENDIAN 0
667 #define TARGET_RT_BIG_ENDIAN 1
668 #elif defined(sparc)
669 #define TARGET_CPU_PPC 0
670 #define TARGET_CPU_68K 0
671 #define TARGET_CPU_X86 0
672 #define TARGET_CPU_MIPS 0
673 #define TARGET_CPU_SPARC 1
674 #define TARGET_CPU_ALPHA 0
675 #define TARGET_RT_MAC_CFM 0
676 #define TARGET_RT_MAC_MACHO 1
677 #define TARGET_RT_MAC_68881 0
678 #define TARGET_RT_LITTLE_ENDIAN 0
679 #define TARGET_RT_BIG_ENDIAN 1
680 #elif defined(__i386__) || defined(i386) || defined(intel)
681 #define TARGET_CPU_PPC 0
682 #define TARGET_CPU_68K 0
683 #define TARGET_CPU_X86 1
684 #define TARGET_CPU_MIPS 0
685 #define TARGET_CPU_SPARC 0
686 #define TARGET_CPU_ALPHA 0
687 #define TARGET_RT_MAC_CFM 0
688 #define TARGET_RT_MAC_MACHO 1
689 #define TARGET_RT_MAC_68881 0
690 #define TARGET_RT_LITTLE_ENDIAN 1
691 #define TARGET_RT_BIG_ENDIAN 0
692 #else
693 #error unrecognized GNU C compiler
694 #endif
695 
696 #define TARGET_OS_MAC 1
697 #define TARGET_OS_WIN32 0
698 #define TARGET_OS_UNIX 0
699 
700 #define PRAGMA_IMPORT 0
701 #define PRAGMA_STRUCT_ALIGN 1
702 #define PRAGMA_ONCE 0
703 #define PRAGMA_STRUCT_PACK 0
704 #define PRAGMA_STRUCT_PACKPUSH 0
705 #define PRAGMA_ENUM_PACK 0
706 #define PRAGMA_ENUM_ALWAYSINT 0
707 #define PRAGMA_ENUM_OPTIONS 0
708 #define FOUR_CHAR_CODE(x) (x)
709 
710 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
711 #define TYPE_EXTENDED 0
712 #if __GNUC__ >= 2
713 #define TYPE_LONGLONG 1
714 #else
715 #define TYPE_LONGLONG 0
716 #endif
717 #ifdef __cplusplus
718 #define TYPE_BOOL 1
719 #else
720 #define TYPE_BOOL 0
721 #endif
722 
723 #define FUNCTION_PASCAL 0
724 #define FUNCTION_DECLSPEC 0
725 #define FUNCTION_WIN32CC 0
726 
727 #elif defined(__GNUC__) && defined(__linux__)
732 #if #cpu(powerpc)
733 #define TARGET_CPU_PPC 1
734 #define TARGET_CPU_68K 0
735 #define TARGET_CPU_X86 0
736 #define TARGET_CPU_MIPS 0
737 #define TARGET_CPU_SPARC 0
738 #define TARGET_CPU_ALPHA 0
739 #define TARGET_RT_MAC_CFM 1
740 #define TARGET_RT_MAC_MACHO 0
741 #define TARGET_RT_MAC_68881 0
742 #elif #cpu(m68k)
743 #define TARGET_CPU_PPC 0
744 #define TARGET_CPU_68K 1
745 #define TARGET_CPU_X86 0
746 #define TARGET_CPU_MIPS 0
747 #define TARGET_CPU_SPARC 0
748 #define TARGET_CPU_ALPHA 0
749 #define TARGET_RT_MAC_CFM 0
750 #define TARGET_RT_MAC_MACHO 0
751 #define TARGET_RT_MAC_68881 0
752 #else
753 #error unsupported GNU C compiler
754 #endif
755 
756 #if #system(macos)
757 #define TARGET_OS_MAC 1
758 #define TARGET_OS_WIN32 0
759 #define TARGET_OS_UNIX 0
760 #elif #system(unix)
761 #define TARGET_OS_MAC 0
762 #define TARGET_OS_WIN32 0
763 #define TARGET_OS_UNIX 1
764 #else
765 #error unsupported GNU C compiler
766 #endif
767 
768 #define TARGET_RT_LITTLE_ENDIAN 0
769 #define TARGET_RT_BIG_ENDIAN 1
770 #define PRAGMA_IMPORT 0
771 #define PRAGMA_STRUCT_ALIGN 0
772 #define PRAGMA_ONCE 0
773 #define PRAGMA_STRUCT_PACK 1
774 #define PRAGMA_STRUCT_PACKPUSH 0
775 #define PRAGMA_ENUM_PACK 0
776 #define PRAGMA_ENUM_ALWAYSINT 0
777 #define PRAGMA_ENUM_OPTIONS 0
778 #define FOUR_CHAR_CODE(x) (x)
779 
780 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
781 #define TYPE_EXTENDED 0
782 #ifdef _LONG_LONG
783 #define TYPE_LONGLONG 1
784 #else
785 #define TYPE_LONGLONG 0
786 #endif
787 #define TYPE_BOOL 0
788 
789 #define FUNCTION_PASCAL 0
790 #define FUNCTION_DECLSPEC 0
791 #define FUNCTION_WIN32CC 0
792 
793 #elif defined(__GNUC__) && defined(__MINGW32__)
797 #define TARGET_CPU_PPC 0
798 #define TARGET_CPU_68K 0
799 #define TARGET_CPU_X86 1
800 #define TARGET_CPU_MIPS 0
801 #define TARGET_CPU_SPARC 0
802 #define TARGET_CPU_ALPHA 0
803 #define TARGET_RT_MAC_CFM 0
804 #define TARGET_RT_MAC_MACHO 0
805 #define TARGET_RT_MAC_68881 0
806 #define TARGET_OS_MAC 0
807 #define TARGET_OS_WIN32 1
808 #define TARGET_OS_UNIX 0
809 #define TARGET_RT_LITTLE_ENDIAN 1
810 #define TARGET_RT_BIG_ENDIAN 0
811 #define PRAGMA_IMPORT 0
812 #define PRAGMA_STRUCT_ALIGN 0
813 #define PRAGMA_ONCE 0
814 #define PRAGMA_STRUCT_PACK 1
815 #define PRAGMA_STRUCT_PACKPUSH 0
816 #define PRAGMA_ENUM_PACK 0
817 #define PRAGMA_ENUM_ALWAYSINT 0
818 #define PRAGMA_ENUM_OPTIONS 0
819 #define FOUR_CHAR_CODE(x) (x)
820 #define TYPE_EXTENDED 0
821 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
822 #define TYPE_LONGLONG 1
823 #define TYPE_BOOL 1
824 #define FUNCTION_PASCAL 0
825 #define FUNCTION_DECLSPEC 0
826 #define FUNCTION_WIN32CC 0
827 
828 #elif defined(__GNUC__)
832 #if #cpu(powerpc)
833 #define TARGET_CPU_PPC 1
834 #define TARGET_CPU_68K 0
835 #define TARGET_CPU_X86 0
836 #define TARGET_CPU_MIPS 0
837 #define TARGET_CPU_SPARC 0
838 #define TARGET_CPU_ALPHA 0
839 #define TARGET_RT_MAC_CFM 1
840 #define TARGET_RT_MAC_MACHO 0
841 #define TARGET_RT_MAC_68881 0
842 #elif #cpu(m68k)
843 #define TARGET_CPU_PPC 0
844 #define TARGET_CPU_68K 1
845 #define TARGET_CPU_X86 0
846 #define TARGET_CPU_MIPS 0
847 #define TARGET_CPU_SPARC 0
848 #define TARGET_CPU_ALPHA 0
849 #define TARGET_RT_MAC_CFM 0
850 #define TARGET_RT_MAC_MACHO 0
851 #define TARGET_RT_MAC_68881 0
852 #else
853 #error unsupported GNU C compiler
854 #endif
855 
856 #if #system(macos)
857 #define TARGET_OS_MAC 1
858 #define TARGET_OS_WIN32 0
859 #define TARGET_OS_UNIX 0
860 #elif #system(unix)
861 #define TARGET_OS_MAC 0
862 #define TARGET_OS_WIN32 0
863 #define TARGET_OS_UNIX 1
864 #else
865 #error unsupported GNU C compiler
866 #endif
867 
868 #define TARGET_RT_LITTLE_ENDIAN 0
869 #define TARGET_RT_BIG_ENDIAN 1
870 #define PRAGMA_IMPORT 0
871 #define PRAGMA_STRUCT_ALIGN 1
872 #define PRAGMA_ONCE 0
873 #define PRAGMA_STRUCT_PACK 0
874 #define PRAGMA_STRUCT_PACKPUSH 0
875 #define PRAGMA_ENUM_PACK 0
876 #define PRAGMA_ENUM_ALWAYSINT 0
877 #define PRAGMA_ENUM_OPTIONS 0
878 #define FOUR_CHAR_CODE(x) (x)
879 
880 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
881 #define TYPE_EXTENDED 0
882 #ifdef _LONG_LONG
883 #define TYPE_LONGLONG 1
884 #else
885 #define TYPE_LONGLONG 0
886 #endif
887 #define TYPE_BOOL 0
888 
889 #define FUNCTION_PASCAL 0
890 #define FUNCTION_DECLSPEC 0
891 #define FUNCTION_WIN32CC 0
892 
893 #elif defined(__xlc) || defined(__xlC) || defined(__xlC__) || \
894  defined(__XLC121__)
898 #define TARGET_CPU_PPC 1
899 #define TARGET_CPU_68K 0
900 #define TARGET_CPU_X86 0
901 #define TARGET_CPU_MIPS 0
902 #define TARGET_CPU_SPARC 0
903 #define TARGET_CPU_ALPHA 0
904 #if defined(_AIX)
905 #define TARGET_OS_MAC 0
906 #define TARGET_OS_UNIX 1
907 #else
908 #define TARGET_OS_MAC 1
909 #define TARGET_OS_UNIX 0
910 #endif
911 #define TARGET_OS_WIN32 0
912 #define TARGET_RT_LITTLE_ENDIAN 0
913 #define TARGET_RT_BIG_ENDIAN 1
914 #define TARGET_RT_MAC_CFM 1
915 #define TARGET_RT_MAC_MACHO 0
916 #define TARGET_RT_MAC_68881 0
917 #define PRAGMA_IMPORT 0
918 #define PRAGMA_STRUCT_ALIGN 1
919 #define PRAGMA_ONCE 0
920 #define PRAGMA_STRUCT_PACK 0
921 #define PRAGMA_STRUCT_PACKPUSH 0
922 #define PRAGMA_ENUM_PACK 0
923 #define PRAGMA_ENUM_ALWAYSINT 0
924 #define PRAGMA_ENUM_OPTIONS 1
925 #define FOUR_CHAR_CODE(x) (x)
926 
927 #define TYPE_LONGDOUBLE_IS_DOUBLE 0
928 #define TYPE_EXTENDED 0
929 #ifdef _LONG_LONG
930 #define TYPE_LONGLONG 1
931 #else
932 #define TYPE_LONGLONG 0
933 #endif
934 #define TYPE_BOOL 0
935 
936 #define FUNCTION_PASCAL 0
937 #define FUNCTION_DECLSPEC 0
938 #define FUNCTION_WIN32CC 0
939 
940 #elif defined(_MSC_VER) && !defined(__MWERKS__)
944 #if defined(_M_M68K)
945 #define TARGET_CPU_PPC 0
946 #define TARGET_CPU_68K 1
947 #define TARGET_CPU_X86 0
948 #define TARGET_CPU_MIPS 0
949 #define TARGET_CPU_SPARC 0
950 #define TARGET_CPU_ALPHA 0
951 #define TARGET_OS_MAC 1
952 #define TARGET_OS_WIN32 0
953 #define TARGET_OS_UNIX 0
954 #define TARGET_RT_LITTLE_ENDIAN 0
955 #define TARGET_RT_BIG_ENDIAN 1
956 #define TARGET_RT_MAC_CFM 0
957 #define TARGET_RT_MAC_MACHO 0
958 #define TARGET_RT_MAC_68881 0
959 #define PRAGMA_IMPORT 0
960 #define PRAGMA_STRUCT_ALIGN 1
961 #define PRAGMA_ONCE 0
962 #define PRAGMA_STRUCT_PACK 1
963 #define PRAGMA_STRUCT_PACKPUSH 1
964 #define PRAGMA_ENUM_PACK 0
965 #define PRAGMA_ENUM_ALWAYSINT 0
966 #define PRAGMA_ENUM_OPTIONS 0
967 #define FOUR_CHAR_CODE(x) (x)
968 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
969 #define TYPE_EXTENDED 0
970 #define TYPE_LONGLONG 0
971 #define TYPE_BOOL 0
972 #define FUNCTION_PASCAL 1
973 #define FUNCTION_DECLSPEC 0
974 #define FUNCTION_WIN32CC 0
975 
976 #elif defined(_M_MPPC)
977 #define TARGET_CPU_PPC 1
978 #define TARGET_CPU_68K 0
979 #define TARGET_CPU_X86 0
980 #define TARGET_CPU_MIPS 0
981 #define TARGET_CPU_SPARC 0
982 #define TARGET_CPU_ALPHA 0
983 #define TARGET_OS_MAC 1
984 #define TARGET_OS_WIN32 0
985 #define TARGET_OS_UNIX 0
986 #define TARGET_RT_LITTLE_ENDIAN 0
987 #define TARGET_RT_BIG_ENDIAN 1
988 #define TARGET_RT_MAC_CFM 1
989 #define TARGET_RT_MAC_MACHO 0
990 #define TARGET_RT_MAC_68881 0
991 #define PRAGMA_IMPORT 0
992 #define PRAGMA_STRUCT_ALIGN 1
993 #define PRAGMA_ONCE 0
994 #define PRAGMA_STRUCT_PACK 1
995 #define PRAGMA_STRUCT_PACKPUSH 1
996 #define PRAGMA_ENUM_PACK 0
997 #define PRAGMA_ENUM_ALWAYSINT 0
998 #define PRAGMA_ENUM_OPTIONS 0
999 #define FOUR_CHAR_CODE(x) (x)
1000 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
1001 #define TYPE_EXTENDED 0
1002 #define TYPE_LONGLONG 0
1003 #define TYPE_BOOL 0
1004 #define FUNCTION_PASCAL 0
1005 #define FUNCTION_DECLSPEC 0
1006 #define FUNCTION_WIN32CC 0
1007 
1008 #elif defined(_M_IX86)
1009 #define TARGET_CPU_PPC 0
1010 #define TARGET_CPU_68K 0
1011 #define TARGET_CPU_X86 1
1012 #define TARGET_CPU_MIPS 0
1013 #define TARGET_CPU_SPARC 0
1014 #define TARGET_CPU_ALPHA 0
1015 #define TARGET_OS_MAC 0
1016 #define TARGET_OS_WIN32 1
1017 #define TARGET_OS_UNIX 0
1018 #define TARGET_RT_LITTLE_ENDIAN 1
1019 #define TARGET_RT_BIG_ENDIAN 0
1020 #define PRAGMA_IMPORT 0
1021 #define PRAGMA_STRUCT_ALIGN 0
1022 #define PRAGMA_ONCE 0
1023 #define PRAGMA_STRUCT_PACK 1
1024 #define PRAGMA_STRUCT_PACKPUSH 1
1025 #define PRAGMA_ENUM_PACK 0
1026 #define PRAGMA_ENUM_ALWAYSINT 0
1027 #define PRAGMA_ENUM_OPTIONS 0
1028 #define FOUR_CHAR_CODE(x) (x)
1029 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
1030 #define TYPE_EXTENDED 0
1031 #define TYPE_LONGLONG 1
1032 #define LONGLONG_TYPENAME __int64
1033 
1034 #define LONGLONG_SIGNED_MAX (9223372036854775807i64)
1035 #define LONGLONG_SIGNED_MIN (-9223372036854775807i64 - 1)
1036 #define LONGLONG_UNSIGNED_MAX (0xffffffffffffffffui64)
1037 
1038 #if defined(__cplusplus) && (_MSC_VER >= 1100)
1039 #define TYPE_BOOL 1
1040 #else
1041 #define TYPE_BOOL 0
1042 #endif
1043 #define FUNCTION_PASCAL 0
1044 #ifndef FUNCTION_DECLSPEC
1046 #define FUNCTION_DECLSPEC 0
1047 #endif
1048 #ifndef FUNCTION_WIN32CC
1049 #define FUNCTION_WIN32CC 1
1050 #endif
1054 #undef pascal
1055 #define pascal
1056 
1057 #elif defined(_M_ALPHA)
1058 #define TARGET_CPU_PPC 0
1059 #define TARGET_CPU_68K 0
1060 #define TARGET_CPU_X86 0
1061 #define TARGET_CPU_MIPS 0
1062 #define TARGET_CPU_SPARC 0
1063 #define TARGET_CPU_ALPHA 1
1064 #define TARGET_OS_MAC 0
1065 #define TARGET_OS_WIN32 1
1066 #define TARGET_OS_UNIX 0
1067 #define TARGET_RT_LITTLE_ENDIAN 1
1068 #define TARGET_RT_BIG_ENDIAN 0
1069 #define PRAGMA_IMPORT 0
1070 #define PRAGMA_STRUCT_ALIGN 0
1071 #define PRAGMA_ONCE 0
1072 #define PRAGMA_STRUCT_PACK 1
1073 #define PRAGMA_STRUCT_PACKPUSH 1
1074 #define PRAGMA_ENUM_PACK 0
1075 #define PRAGMA_ENUM_ALWAYSINT 0
1076 #define PRAGMA_ENUM_OPTIONS 0
1077 #define FOUR_CHAR_CODE(x) \
1078  (((unsigned long)((x) & 0x000000FF)) << 24) | \
1079  (((unsigned long)((x) & 0x0000FF00)) << 8) | \
1080  (((unsigned long)((x) & 0x00FF0000)) >> 8) | \
1081  (((unsigned long)((x) & 0xFF000000)) >> 24)
1082 #define TYPE_EXTENDED 0
1083 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
1084 #define TYPE_LONGLONG 0
1085 #define TYPE_BOOL 0
1086 #define FUNCTION_PASCAL 0
1087 #define FUNCTION_DECLSPEC 0
1088 #define FUNCTION_WIN32CC 0
1089 
1090 #elif defined(_M_PPC)
1091 #define TARGET_CPU_PPC 1
1092 #define TARGET_CPU_68K 0
1093 #define TARGET_CPU_X86 0
1094 #define TARGET_CPU_MIPS 0
1095 #define TARGET_CPU_SPARC 0
1096 #define TARGET_CPU_ALPHA 0
1097 #define TARGET_OS_MAC 0
1098 #define TARGET_OS_WIN32 1
1099 #define TARGET_OS_UNIX 0
1100 #define TARGET_RT_LITTLE_ENDIAN 1
1101 #define TARGET_RT_BIG_ENDIAN 0
1102 #define PRAGMA_IMPORT 0
1103 #define PRAGMA_STRUCT_ALIGN 0
1104 #define PRAGMA_ONCE 0
1105 #define PRAGMA_STRUCT_PACK 1
1106 #define PRAGMA_STRUCT_PACKPUSH 1
1107 #define PRAGMA_ENUM_PACK 0
1108 #define PRAGMA_ENUM_ALWAYSINT 0
1109 #define PRAGMA_ENUM_OPTIONS 0
1110 #define FOUR_CHAR_CODE(x) \
1111  (((unsigned long)((x) & 0x000000FF)) << 24) | \
1112  (((unsigned long)((x) & 0x0000FF00)) << 8) | \
1113  (((unsigned long)((x) & 0x00FF0000)) >> 8) | \
1114  (((unsigned long)((x) & 0xFF000000)) >> 24)
1115 #define TYPE_EXTENDED 0
1116 #define TYPE_LONGLONG 0
1117 #define TYPE_BOOL 0
1118 #define FUNCTION_PASCAL 0
1119 #define FUNCTION_DECLSPEC 0
1120 #define FUNCTION_WIN32CC 0
1121 
1122 #elif defined(_M_MRX000)
1123 #define TARGET_CPU_PPC 0
1124 #define TARGET_CPU_68K 0
1125 #define TARGET_CPU_X86 0
1126 #define TARGET_CPU_MIPS 1
1127 #define TARGET_CPU_SPARC 0
1128 #define TARGET_CPU_ALPHA 0
1129 #define TARGET_OS_MAC 0
1130 #define TARGET_OS_WIN32 1
1131 #define TARGET_OS_UNIX 0
1132 #define TARGET_RT_LITTLE_ENDIAN 1
1133 #define TARGET_RT_BIG_ENDIAN 0
1134 #define PRAGMA_IMPORT 0
1135 #define PRAGMA_STRUCT_ALIGN 0
1136 #define PRAGMA_ONCE 0
1137 #define PRAGMA_STRUCT_PACK 1
1138 #define PRAGMA_STRUCT_PACKPUSH 1
1139 #define PRAGMA_ENUM_PACK 0
1140 #define PRAGMA_ENUM_ALWAYSINT 0
1141 #define PRAGMA_ENUM_OPTIONS 0
1142 #define FOUR_CHAR_CODE(x) \
1143  (((unsigned long)((x) & 0x000000FF)) << 24) | \
1144  (((unsigned long)((x) & 0x0000FF00)) << 8) | \
1145  (((unsigned long)((x) & 0x00FF0000)) >> 8) | \
1146  (((unsigned long)((x) & 0xFF000000)) >> 24)
1147 #define TYPE_EXTENDED 0
1148 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
1149 #define TYPE_LONGLONG 0
1150 #define TYPE_BOOL 0
1151 #define FUNCTION_PASCAL 0
1152 #define FUNCTION_DECLSPEC 0
1153 #define FUNCTION_WIN32CC 0
1154 #endif
1155 
1156 #elif defined(__MOTO__)
1160 #define TARGET_CPU_PPC 1
1161 #define TARGET_CPU_68K 0
1162 #define TARGET_CPU_X86 0
1163 #define TARGET_CPU_MIPS 0
1164 #define TARGET_CPU_SPARC 0
1165 #define TARGET_CPU_ALPHA 0
1166 #define TARGET_OS_MAC 1
1167 #define TARGET_OS_WIN32 0
1168 #define TARGET_OS_UNIX 0
1169 #define TARGET_RT_LITTLE_ENDIAN 0
1170 #define TARGET_RT_BIG_ENDIAN 1
1171 #define TARGET_RT_MAC_CFM 1
1172 #define TARGET_RT_MAC_MACHO 0
1173 #define TARGET_RT_MAC_68881 0
1174 #define PRAGMA_IMPORT 0
1175 #define PRAGMA_STRUCT_ALIGN 1
1176 #if __MOTO__ >= 40702
1177 #define PRAGMA_ONCE 1
1178 #else
1179 #define PRAGMA_ONCE 0
1180 #endif
1181 #define PRAGMA_STRUCT_PACK 0
1182 #define PRAGMA_STRUCT_PACKPUSH 0
1183 #define PRAGMA_ENUM_PACK 0
1184 #define PRAGMA_ENUM_ALWAYSINT 0
1185 #define PRAGMA_ENUM_OPTIONS 0
1186 #define FOUR_CHAR_CODE(x) (x)
1187 #define TYPE_LONGLONG 0
1188 #ifdef _BOOL
1189 #define TYPE_BOOL 1
1190 #else
1191 #define TYPE_BOOL 0
1192 #endif
1193 #define TYPE_EXTENDED 0
1194 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
1195 #define FUNCTION_PASCAL 0
1196 #define FUNCTION_DECLSPEC 0
1197 #define FUNCTION_WIN32CC 0
1198 
1199 #elif defined(_MIPS_ISA)
1203 #define TARGET_CPU_PPC 0
1204 #define TARGET_CPU_68K 0
1205 #define TARGET_CPU_X86 0
1206 #define TARGET_CPU_MIPS 1
1207 #define TARGET_CPU_SPARC 0
1208 #define TARGET_CPU_ALPHA 0
1209 #define TARGET_OS_MAC 0
1210 #define TARGET_OS_WIN32 0
1211 #define TARGET_OS_UNIX 1
1212 #define TARGET_RT_LITTLE_ENDIAN 0
1213 #define TARGET_RT_BIG_ENDIAN 1
1214 #define PRAGMA_IMPORT 0
1215 #define PRAGMA_STRUCT_ALIGN 0
1216 #define PRAGMA_ONCE 0
1217 #define PRAGMA_STRUCT_PACK 1
1218 #define PRAGMA_STRUCT_PACKPUSH 0
1219 #define PRAGMA_ENUM_PACK 0
1220 #define PRAGMA_ENUM_ALWAYSINT 0
1221 #define PRAGMA_ENUM_OPTIONS 0
1222 #define FOUR_CHAR_CODE(x) (x)
1223 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
1224 #define TYPE_EXTENDED 0
1225 #define TYPE_LONGLONG 0
1226 #define TYPE_BOOL 0
1227 #define FUNCTION_PASCAL 0
1228 #define FUNCTION_DECLSPEC 0
1229 #define FUNCTION_WIN32CC 0
1230 
1231 #elif defined(__sparc)
1235 #define TARGET_CPU_PPC 0
1236 #define TARGET_CPU_68K 0
1237 #define TARGET_CPU_X86 0
1238 #define TARGET_CPU_MIPS 0
1239 #define TARGET_CPU_SPARC 1
1240 #define TARGET_CPU_ALPHA 0
1241 #define TARGET_OS_MAC 0
1242 #define TARGET_OS_WIN32 0
1243 #define TARGET_OS_UNIX 1
1244 #define TARGET_RT_LITTLE_ENDIAN 0
1245 #define TARGET_RT_BIG_ENDIAN 1
1246 #define PRAGMA_IMPORT 0
1247 #define PRAGMA_STRUCT_ALIGN 0
1248 #define PRAGMA_ONCE 0
1249 #define PRAGMA_STRUCT_PACK 1
1250 #define PRAGMA_STRUCT_PACKPUSH 0
1251 #define PRAGMA_ENUM_PACK 0
1252 #define PRAGMA_ENUM_ALWAYSINT 0
1253 #define PRAGMA_ENUM_OPTIONS 0
1254 #define FOUR_CHAR_CODE(x) \
1255  (((unsigned long)((x) & 0x000000FF)) << 24) | \
1256  (((unsigned long)((x) & 0x0000FF00)) << 8) | \
1257  (((unsigned long)((x) & 0x00FF0000)) >> 8) | \
1258  (((unsigned long)((x) & 0xFF000000)) >> 24)
1259 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
1260 #define TYPE_EXTENDED 0
1261 #define TYPE_LONGLONG 0
1262 #define TYPE_BOOL 0
1263 #define FUNCTION_PASCAL 0
1264 #define FUNCTION_DECLSPEC 0
1265 #define FUNCTION_WIN32CC 0
1266 
1267 #else
1272 #if defined(TARGET_CPU_PPC) && TARGET_CPU_PPC
1273 #define TARGET_CPU_68K 0
1274 #define TARGET_CPU_X86 0
1275 #define TARGET_CPU_MIPS 0
1276 #define TARGET_CPU_SPARC 0
1277 #define TARGET_CPU_ALPHA 0
1278 #elif defined(TARGET_CPU_68K) && TARGET_CPU_68K
1279 #define TARGET_CPU_PPC 0
1280 #define TARGET_CPU_X86 0
1281 #define TARGET_CPU_MIPS 0
1282 #define TARGET_CPU_SPARC 0
1283 #define TARGET_CPU_ALPHA 0
1284 #elif defined(TARGET_CPU_X86) && TARGET_CPU_X86
1285 #define TARGET_CPU_PPC 0
1286 #define TARGET_CPU_68K 0
1287 #define TARGET_CPU_MIPS 0
1288 #define TARGET_CPU_SPARC 0
1289 #define TARGET_CPU_ALPHA 0
1290 #elif defined(TARGET_CPU_MIPS) && TARGET_CPU_MIPS
1291 #define TARGET_CPU_PPC 0
1292 #define TARGET_CPU_68K 0
1293 #define TARGET_CPU_X86 0
1294 #define TARGET_CPU_SPARC 0
1295 #define TARGET_CPU_ALPHA 0
1296 #elif defined(TARGET_CPU_SPARC) && TARGET_CPU_SPARC
1297 #define TARGET_CPU_PPC 0
1298 #define TARGET_CPU_68K 0
1299 #define TARGET_CPU_X86 0
1300 #define TARGET_CPU_MIPS 0
1301 #define TARGET_CPU_ALPHA 0
1302 #elif defined(TARGET_CPU_ALPHA) && TARGET_CPU_ALPHA
1303 #define TARGET_CPU_PPC 0
1304 #define TARGET_CPU_68K 0
1305 #define TARGET_CPU_X86 0
1306 #define TARGET_CPU_MIPS 0
1307 #define TARGET_CPU_SPARC 0
1308 
1309 #else
1327 #error ConditionalMacros.h: unknown compiler (see comment above)
1328 #define TARGET_CPU_PPC 0
1329 #define TARGET_CPU_68K 0
1330 #define TARGET_CPU_X86 0
1331 #define TARGET_CPU_MIPS 0
1332 #define TARGET_CPU_SPARC 0
1333 #define TARGET_CPU_ALPHA 0
1334 #endif
1335 
1336 #if defined(TARGET_OS_MAC) && TARGET_OS_MAC
1337 #define TARGET_OS_WIN32 0
1338 #define TARGET_OS_UNIX 0
1339 #elif defined(TARGET_OS_WIN32) && TARGET_OS_WIN32
1340 #define TARGET_OS_MAC 0
1341 #define TARGET_OS_UNIX 0
1342 #elif defined(TARGET_OS_UNIX) && TARGET_OS_UNIX
1343 #define TARGET_OS_MAC 0
1344 #define TARGET_OS_WIN32 0
1345 #elif TARGET_CPU_PPC || TARGET_CPU_68K
1346 #define TARGET_OS_MAC 1
1347 #define TARGET_OS_WIN32 0
1348 #define TARGET_OS_UNIX 0
1349 #else
1350 #error ConditionalMacros.h: unknown target OS (see comment above)
1351 #endif
1352 
1353 #if !defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
1354 #if TARGET_OS_MAC
1355 #define TARGET_RT_LITTLE_ENDIAN 0
1356 #define TARGET_RT_BIG_ENDIAN 1
1357 #elif TARGET_OS_WIN32
1358 #define TARGET_RT_LITTLE_ENDIAN 1
1359 #define TARGET_RT_BIG_ENDIAN 0
1360 #endif
1361 #endif
1362 
1363 #if defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
1364 #define TARGET_RT_LITTLE_ENDIAN !TARGET_RT_BIG_ENDIAN
1365 #elif !defined(TARGET_RT_BIG_ENDIAN) && defined(TARGET_RT_LITTLE_ENDIAN)
1366 #define TARGET_RT_BIG_ENDIAN !TARGET_RT_LITTLE_ENDIAN
1367 #endif
1368 
1369 #if !defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
1370 #error unknown endianess of target processor
1371 #endif
1372 
1373 #if TARGET_OS_MAC
1374 #ifndef TARGET_RT_MAC_CFM
1375 #define TARGET_RT_MAC_CFM TARGET_CPU_PPC
1376 #endif
1377 #ifndef TARGET_RT_MAC_68881
1378 #define TARGET_RT_MAC_68881 0
1379 #endif
1380 #ifndef TARGET_RT_MAC_MACHO
1381 #define TARGET_RT_MAC_MACHO !TARGET_RT_MAC_CFM
1382 #endif
1383 #endif
1384 
1385 #ifndef PRAGMA_IMPORT
1386 #define PRAGMA_IMPORT 0
1387 #endif
1388 #ifndef PRAGMA_STRUCT_ALIGN
1389 #define PRAGMA_STRUCT_ALIGN 0
1390 #endif
1391 #ifndef PRAGMA_ONCE
1392 #define PRAGMA_ONCE 0
1393 #endif
1394 #ifndef PRAGMA_STRUCT_PACK
1395 #define PRAGMA_STRUCT_PACK 0
1396 #endif
1397 #ifndef PRAGMA_STRUCT_PACKPUSH
1398 #define PRAGMA_STRUCT_PACKPUSH 0
1399 #endif
1400 #ifndef PRAGMA_ENUM_PACK
1401 #define PRAGMA_ENUM_PACK 0
1402 #endif
1403 #ifndef PRAGMA_ENUM_ALWAYSINT
1404 #define PRAGMA_ENUM_ALWAYSINT 0
1405 #endif
1406 #ifndef PRAGMA_ENUM_OPTIONS
1407 #define PRAGMA_ENUM_OPTIONS 0
1408 #endif
1409 #ifndef FOUR_CHAR_CODE
1410 #define FOUR_CHAR_CODE(x) (x)
1411 #endif
1412 
1413 #ifndef TYPE_LONGDOUBLE_IS_DOUBLE
1414 #define TYPE_LONGDOUBLE_IS_DOUBLE 1
1415 #endif
1416 #ifndef TYPE_EXTENDED
1417 #define TYPE_EXTENDED 0
1418 #endif
1419 #ifndef TYPE_LONGLONG
1420 #define TYPE_LONGLONG 0
1421 #endif
1422 #ifndef TYPE_BOOL
1423 #define TYPE_BOOL 0
1424 #endif
1425 #ifndef FUNCTION_PASCAL
1426 #define FUNCTION_PASCAL 0
1427 #endif
1428 #ifndef FUNCTION_DECLSPEC
1429 #define FUNCTION_DECLSPEC 0
1430 #endif
1431 #ifndef FUNCTION_WIN32CC
1432 #define FUNCTION_WIN32CC 0
1433 #endif
1434 #endif
1435 
1436 /*****************************************************************************************************
1437 
1438  Under MacOS, the classic 68k runtime has two calling conventions: pascal or
1439 C Under Win32, there are two calling conventions: __cdecl or __stdcall Headers
1440 and implementation files can use the following macros to make their source more
1441 portable by hiding the calling convention details:
1442 
1443  EXTERN_API©
1444  These macros are used to specify the calling convention on a function
1445 prototype.
1446 
1447  EXTERN_API - Classic 68k: pascal, Win32: __cdecl
1448  EXTERN_API_C - Classic 68k: C, Win32: __cdecl
1449  EXTERN_API_STDCALL - Classic 68k: pascal, Win32: __stdcall
1450  EXTERN_API_C_STDCALL - Classic 68k: C, Win32: __stdcall
1451 
1452 
1453  DEFINE_API©
1454  These macros are used to specify the calling convention on a function
1455 definition.
1456 
1457  DEFINE_API - Classic 68k: pascal, Win32: __cdecl
1458  DEFINE_API_C - Classic 68k: C, Win32: __cdecl
1459  DEFINE_API_STDCALL - Classic 68k: pascal, Win32: __stdcall
1460  DEFINE_API_C_STDCALL - Classic 68k: C, Win32: __stdcall
1461 
1462 
1463  CALLBACK_API©
1464  These macros are used to specify the calling convention of a function
1465 pointer.
1466 
1467  CALLBACK_API - Classic 68k: pascal, Win32: __stdcall
1468  CALLBACK_API_C - Classic 68k: C, Win32: __stdcall
1469  CALLBACK_API_STDCALL - Classic 68k: pascal, Win32: __cdecl
1470  CALLBACK_API_C_STDCALL - Classic 68k: C, Win32: __cdecl
1471 
1472 ****************************************************************************************************/
1473 
1474 #if FUNCTION_PASCAL && !FUNCTION_DECLSPEC && !FUNCTION_WIN32CC
1476 #define _type extern pascal _type
1477 #define _type extern _type
1478 #define EXTERN_API_STDCALL(_type) extern pascal _type
1479 #define EXTERN_API_C_STDCALL(_type) extern _type
1480 
1481 #define DEFINE_API(_type) pascal _type
1482 #define DEFINE_API_C(_type) _type
1483 #define DEFINE_API_STDCALL(_type) pascal _type
1484 #define DEFINE_API_C_STDCALL(_type) _type
1485 
1486 #define CALLBACK_API(_type, _name) pascal _type(*_name)
1487 #define CALLBACK_API_C(_type, _name) _type(*_name)
1488 #define CALLBACK_API_STDCALL(_type, _name) pascal _type(*_name)
1489 #define CALLBACK_API_C_STDCALL(_type, _name) _type(*_name)
1490 
1491 #elif FUNCTION_PASCAL && FUNCTION_DECLSPEC && !FUNCTION_WIN32CC
1493 #define _type extern pascal __declspec(dllimport) _type
1494 #define _type extern __declspec(dllimport) _type
1495 #define EXTERN_API_STDCALL(_type) extern pascal __declspec(dllimport) _type
1496 #define EXTERN_API_C_STDCALL(_type) extern __declspec(dllimport) _type
1497 
1498 #define DEFINE_API(_type) pascal __declspec(dllexport) _type
1499 #define DEFINE_API_C(_type) __declspec(dllexport) _type
1500 #define DEFINE_API_STDCALL(_type) pascal __declspec(dllexport) _type
1501 #define DEFINE_API_C_STDCALL(_type) __declspec(dllexport) _type
1502 
1503 #define CALLBACK_API(_type, _name) pascal _type(*_name)
1504 #define CALLBACK_API_C(_type, _name) _type(*_name)
1505 #define CALLBACK_API_STDCALL(_type, _name) pascal _type(*_name)
1506 #define CALLBACK_API_C_STDCALL(_type, _name) _type(*_name)
1507 
1508 #elif !FUNCTION_PASCAL && FUNCTION_DECLSPEC && !FUNCTION_WIN32CC
1510 #define _type extern __declspec(dllimport) _type
1511 #define _type extern __declspec(dllimport) _type
1512 #define EXTERN_API_STDCALL(_type) extern __declspec(dllimport) _type
1513 #define EXTERN_API_C_STDCALL(_type) extern __declspec(dllimport) _type
1514 
1515 #define DEFINE_API(_type) __declspec(dllexport) _type
1516 #define DEFINE_API_C(_type) __declspec(dllexport) _type
1517 #define DEFINE_API_STDCALL(_type) __declspec(dllexport) _type
1518 #define DEFINE_API_C_STDCALL(_type) __declspec(dllexport) _type
1519 
1520 #define CALLBACK_API(_type, _name) _type(*_name)
1521 #define CALLBACK_API_C(_type, _name) _type(*_name)
1522 #define CALLBACK_API_STDCALL(_type, _name) _type(*_name)
1523 #define CALLBACK_API_C_STDCALL(_type, _name) _type(*_name)
1524 
1525 #elif !FUNCTION_PASCAL && FUNCTION_DECLSPEC && FUNCTION_WIN32CC
1527 #define _type __declspec(dllimport) _type __cdecl
1528 #define _type __declspec(dllimport) _type __cdecl
1529 #define EXTERN_API_STDCALL(_type) __declspec(dllimport) _type __stdcall
1530 #define EXTERN_API_C_STDCALL(_type) __declspec(dllimport) _type __stdcall
1531 
1532 #define DEFINE_API(_type) __declspec(dllexport) _type __cdecl
1533 #define DEFINE_API_C(_type) __declspec(dllexport) _type __cdecl
1534 #define DEFINE_API_STDCALL(_type) __declspec(dllexport) _type __stdcall
1535 #define DEFINE_API_C_STDCALL(_type) __declspec(dllexport) _type __stdcall
1536 
1537 #define CALLBACK_API(_type, _name) _type(__cdecl *_name)
1538 #define CALLBACK_API_C(_type, _name) _type(__cdecl *_name)
1539 #define CALLBACK_API_STDCALL(_type, _name) _type(__stdcall *_name)
1540 #define CALLBACK_API_C_STDCALL(_type, _name) _type(__stdcall *_name)
1541 
1542 #elif !FUNCTION_PASCAL && !FUNCTION_DECLSPEC && FUNCTION_WIN32CC
1544 #define _type _type __cdecl
1545 #define _type _type __cdecl
1546 #define EXTERN_API_STDCALL(_type) _type __stdcall
1547 #define EXTERN_API_C_STDCALL(_type) _type __stdcall
1548 
1549 #define DEFINE_API(_type) _type __cdecl
1550 #define DEFINE_API_C(_type) _type __cdecl
1551 #define DEFINE_API_STDCALL(_type) _type __stdcall
1552 #define DEFINE_API_C_STDCALL(_type) _type __stdcall
1553 
1554 #define CALLBACK_API(_type, _name) _type(__cdecl *_name)
1555 #define CALLBACK_API_C(_type, _name) _type(__cdecl *_name)
1556 #define CALLBACK_API_STDCALL(_type, _name) _type(__stdcall *_name)
1557 #define CALLBACK_API_C_STDCALL(_type, _name) _type(__stdcall *_name)
1558 
1559 #else
1561 #define _type extern _type
1562 #define _type extern _type
1563 #define EXTERN_API_STDCALL(_type) extern _type
1564 #define EXTERN_API_C_STDCALL(_type) extern _type
1565 
1566 #define DEFINE_API(_type) _type
1567 #define DEFINE_API_C(_type) _type
1568 #define DEFINE_API_STDCALL(_type) _type
1569 #define DEFINE_API_C_STDCALL(_type) _type
1570 
1571 #define CALLBACK_API(_type, _name) _type(*_name)
1572 #define CALLBACK_API_C(_type, _name) _type(*_name)
1573 #define CALLBACK_API_STDCALL(_type, _name) _type(*_name)
1574 #define CALLBACK_API_C_STDCALL(_type, _name) _type(*_name)
1575 #undef pascal
1576 #define pascal
1577 #endif
1578 
1582 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1583 #define CALLBACK_API_REGISTER68K(_type, _name, _params) \
1584  CALLBACK_API(void, _name)()
1585 #else
1586 #define CALLBACK_API_REGISTER68K(_type, _name, _params) \
1587  CALLBACK_API(_type, _name) _params
1588 #endif
1589 /*****************************************************************************************************
1590 
1591  Set up TARGET_API_©_© values
1592 
1593 ****************************************************************************************************/
1594 #if TARGET_OS_MAC
1595 #if !defined(TARGET_API_MAC_OS8) && !defined(TARGET_API_MAC_OSX) && \
1596  !defined(TARGET_API_MAC_CARBON)
1598 #if TARGET_RT_MAC_MACHO
1600 #define TARGET_API_MAC_OS8 0
1601 #define TARGET_API_MAC_CARBON 1
1602 #define TARGET_API_MAC_OSX 1
1603 #elif defined(TARGET_CARBON) && TARGET_CARBON
1605 #define TARGET_API_MAC_OS8 0
1606 #define TARGET_API_MAC_CARBON 1
1607 #define TARGET_API_MAC_OSX 0
1608 #elif TARGET_CPU_PPC && TARGET_RT_MAC_CFM
1610 #define TARGET_API_MAC_OS8 1
1611 #define TARGET_API_MAC_CARBON 0
1612 #define TARGET_API_MAC_OSX 0
1613 #else
1615 #define TARGET_API_MAC_OS8 1
1616 #define TARGET_API_MAC_CARBON 0
1617 #define TARGET_API_MAC_OSX 0
1618 #endif
1620 #else
1621 #ifndef TARGET_API_MAC_OS8
1622 #define TARGET_API_MAC_OS8 0
1623 #endif
1625 #ifndef TARGET_API_MAC_OSX
1626 #define TARGET_API_MAC_OSX TARGET_RT_MAC_MACHO
1627 #endif
1629 #ifndef TARGET_API_MAC_CARBON
1630 #define TARGET_API_MAC_CARBON TARGET_API_MAC_OSX
1631 #endif
1633 #endif
1636 #if TARGET_API_MAC_OS8 && TARGET_API_MAC_OSX
1637 #error TARGET_API_MAC_OS8 and TARGET_API_MAC_OSX are mutually exclusive
1638 #endif
1640 #if !TARGET_API_MAC_OS8 && !TARGET_API_MAC_CARBON && !TARGET_API_MAC_OSX
1641 #error At least one of TARGET_API_MAC_* must be true
1642 #endif
1645 #else
1646 #define TARGET_API_MAC_OS8 0
1647 #define TARGET_API_MAC_CARBON 0
1648 #define TARGET_API_MAC_OSX 0
1649 #endif
1652 #ifndef TARGET_CARBON
1653 #if TARGET_API_MAC_CARBON && !TARGET_API_MAC_OS8
1654 #define TARGET_CARBON 1
1655 #else
1656 #define TARGET_CARBON 0
1657 #endif
1659 #endif
1661 /*****************************************************************************************************
1662  Backward compatibility for clients expecting 2.x version on
1663 ConditionalMacros.h
1664 
1665  GENERATINGPOWERPC - Compiler is generating PowerPC instructions
1666  GENERATING68K - Compiler is generating 68k family instructions
1667  GENERATING68881 - Compiler is generating mc68881 floating point
1668 instructions GENERATINGCFM - Code being generated assumes CFM calling
1669 conventions CFMSYSTEMCALLS - No A-traps. Systems calls are made using
1670 CFM and UPP's PRAGMA_ALIGN_SUPPORTED - Compiler supports: #pragma options
1671 align=mac68k/power/reset PRAGMA_IMPORT_SUPPORTED - Compiler supports: #pragma
1672 import on/off/reset CGLUESUPPORTED - Clients can use all lowercase
1673 toolbox functions that take C strings instead of pascal strings
1674 
1675 ****************************************************************************************************/
1676 #if !TARGET_API_MAC_CARBON
1677 #define GENERATINGPOWERPC TARGET_CPU_PPC
1678 #define GENERATING68K TARGET_CPU_68K
1679 #define GENERATING68881 TARGET_RT_MAC_68881
1680 #define GENERATINGCFM TARGET_RT_MAC_CFM
1681 #define CFMSYSTEMCALLS TARGET_RT_MAC_CFM
1682 #ifndef CGLUESUPPORTED
1683 #define CGLUESUPPORTED 0
1684 #endif
1686 #ifndef OLDROUTINELOCATIONS
1687 #define OLDROUTINELOCATIONS 0
1688 #endif
1690 #define PRAGMA_ALIGN_SUPPORTED PRAGMA_STRUCT_ALIGN
1691 #define PRAGMA_IMPORT_SUPPORTED PRAGMA_IMPORT
1692 #else
1694 #define PRAGMA_ALIGN_SUPPORTED ..PRAGMA_ALIGN_SUPPORTED_is_obsolete..
1695 #define GENERATINGPOWERPC ..GENERATINGPOWERPC_is_obsolete..
1696 #define GENERATING68K ..GENERATING68K_is_obsolete..
1697 #define GENERATING68881 ..GENERATING68881_is_obsolete..
1698 #define GENERATINGCFM ..GENERATINGCFM_is_obsolete..
1699 #define CFMSYSTEMCALLS ..CFMSYSTEMCALLS_is_obsolete..
1700 #endif
1702 /*****************************************************************************************************
1703 
1704  OLDROUTINENAMES - "Old" names for Macintosh system calls are allowed
1705 in source code. (e.g. DisposPtr instead of DisposePtr). The names of system
1706 routine are now more sensitive to change because CFM binds by name. In the
1707  past, system routine names were compiled out to
1708 just an A-Trap. Macros have been added that each map an old name to its new
1709 name. This allows old routine names to be used in existing source files, but the
1710 macros only work if OLDROUTINENAMES is true. This support will be removed in
1711 the near future. Thus, all source code should be changed to use the new names!
1712 You can set OLDROUTINENAMES to false to see if your code has any old names left
1713 in it.
1714 
1715 ****************************************************************************************************/
1716 #ifndef OLDROUTINENAMES
1717 #define OLDROUTINENAMES 0
1718 #endif
1720 /*****************************************************************************************************
1721  The following macros isolate the use of 68K inlines in function prototypes.
1722  On the Mac OS under the Classic 68K runtime, function prototypes were
1723 followed by a list of 68K opcodes which the compiler inserted in the generated
1724 code instead of a JSR. Under Classic 68K on the Mac OS, this macro will put the
1725 opcodes in the right syntax. For all other OS's and runtimes the macro suppress
1726 the opcodes. Example:
1727 
1728  EXTERN_P void DrawPicture(PicHandle myPicture, const Rect *dstRect);
1729 
1730 ****************************************************************************************************/
1731 
1732 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1733 #define ONEWORDINLINE(w1) = w1
1734 #define TWOWORDINLINE(w1, w2) = {w1, w2}
1735 #define THREEWORDINLINE(w1, w2, w3) = {w1, w2, w3}
1736 #define FOURWORDINLINE(w1, w2, w3, w4) = {w1, w2, w3, w4}
1737 #define FIVEWORDINLINE(w1, w2, w3, w4, w5) = {w1, w2, w3, w4, w5}
1738 #define SIXWORDINLINE(w1, w2, w3, w4, w5, w6) = {w1, w2, w3, w4, w5, w6}
1739 #define SEVENWORDINLINE(w1, w2, w3, w4, w5, w6, w7) \
1740  = {w1, w2, w3, w4, w5, w6, w7}
1741 #define EIGHTWORDINLINE(w1, w2, w3, w4, w5, w6, w7, w8) \
1742  = {w1, w2, w3, w4, w5, w6, w7, w8}
1743 #define NINEWORDINLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9) \
1744  = {w1, w2, w3, w4, w5, w6, w7, w8, w9}
1745 #define TENWORDINLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10) \
1746  = {w1, w2, w3, w4, w5, w6, w7, w8, w9, w10}
1747 #define ELEVENWORDINLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11) \
1748  = {w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11}
1749 #define TWELVEWORDINLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12) \
1750  = {w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12}
1751 #else
1752 #define ONEWORDINLINE(w1)
1753 #define TWOWORDINLINE(w1, w2)
1754 #define THREEWORDINLINE(w1, w2, w3)
1755 #define FOURWORDINLINE(w1, w2, w3, w4)
1756 #define FIVEWORDINLINE(w1, w2, w3, w4, w5)
1757 #define SIXWORDINLINE(w1, w2, w3, w4, w5, w6)
1758 #define SEVENWORDINLINE(w1, w2, w3, w4, w5, w6, w7)
1759 #define EIGHTWORDINLINE(w1, w2, w3, w4, w5, w6, w7, w8)
1760 #define NINEWORDINLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9)
1761 #define TENWORDINLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10)
1762 #define ELEVENWORDINLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11)
1763 #define TWELVEWORDINLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12)
1764 #endif
1765 
1766 /*****************************************************************************************************
1767 
1768  TARGET_CARBON - default: false. Switches all of the above
1769 as described. Overrides all others
1770  - NOTE: If you set TARGET_CARBON to 1, then
1771 the other switches will be setup by ConditionalMacros, and should not be set
1772 manually.
1773 
1774  If you wish to do development for pre-Carbon Systems, you can set the
1775 following:
1776 
1777  OPAQUE_TOOLBOX_STRUCTS - default: false. True for Carbon builds,
1778 hides struct fields. OPAQUE_UPP_TYPES - default: false. True for
1779 Carbon builds, UPP types are unique and opaque. ACCESSOR_CALLS_ARE_FUNCTIONS -
1780 default: false. True for Carbon builds, enables accessor functions.
1781  CALL_NOT_IN_CARBON - default: true. False for Carbon builds,
1782 hides calls not supported in Carbon.
1783 
1784  Specifically, if you are building a non-Carbon application (one that links
1785 against InterfaceLib) but you wish to use some of the accessor functions, you
1786 can set ACCESSOR_CALLS_ARE_FUNCTIONS to 1 and link with CarbonAccessors.o, which
1787 implements just the accessor functions. This will help you preserve source
1788 compatibility between your Carbon and non-Carbon application targets.
1789 
1790  MIXEDMODE_CALLS_ARE_FUNCTIONS - deprecated.
1791 
1792 ****************************************************************************************************/
1793 #if TARGET_API_MAC_CARBON && !TARGET_API_MAC_OS8
1794 #ifndef OPAQUE_TOOLBOX_STRUCTS
1795 #define OPAQUE_TOOLBOX_STRUCTS 1
1796 #endif
1798 #ifndef OPAQUE_UPP_TYPES
1799 #define OPAQUE_UPP_TYPES 1
1800 #endif
1802 #ifndef ACCESSOR_CALLS_ARE_FUNCTIONS
1803 #define ACCESSOR_CALLS_ARE_FUNCTIONS 1
1804 #endif
1806 #ifndef CALL_NOT_IN_CARBON
1807 #define CALL_NOT_IN_CARBON 0
1808 #endif
1810 #ifndef MIXEDMODE_CALLS_ARE_FUNCTIONS
1811 #define MIXEDMODE_CALLS_ARE_FUNCTIONS 1
1812 #endif
1814 #else
1815 #ifndef OPAQUE_TOOLBOX_STRUCTS
1816 #define OPAQUE_TOOLBOX_STRUCTS 0
1817 #endif
1819 #ifndef OPAQUE_UPP_TYPES
1820 #define OPAQUE_UPP_TYPES 0
1821 #endif
1823 #ifndef ACCESSOR_CALLS_ARE_FUNCTIONS
1824 #define ACCESSOR_CALLS_ARE_FUNCTIONS 0
1825 #endif
1832 #if OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
1833 #error OPAQUE_TOOLBOX_STRUCTS cannot be true when ACCESSOR_CALLS_ARE_FUNCTIONS is false
1834 #endif
1836 #ifndef CALL_NOT_IN_CARBON
1837 #define CALL_NOT_IN_CARBON 1
1838 #endif
1840 #ifndef MIXEDMODE_CALLS_ARE_FUNCTIONS
1841 #define MIXEDMODE_CALLS_ARE_FUNCTIONS 0
1842 #endif
1844 #endif
1846 #endif