|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25: /*
26: File: ConditionalMacros.h
27:
28: Contains: Set up for compiler independent conditionals
29:
30: Version: Universal Interface Files 3.0dx
31:
32: DRI: Nick Kledzik
33:
34: Copyright: � 1993-1997 by Apple Computer, Inc., all rights reserved
35:
36: Warning: *** APPLE INTERNAL USE ONLY ***
37: This file may contain unreleased API's
38:
39: BuildInfo: Built by: Scott Roberts
40: With Interfacer: 3.0d2 (PowerPC native)
41: From: ConditionalMacros.i
42: Revision: 75
43: Dated: 6/11/97
44: Last change by: ngk
45: Last comment: Restore TYPE_LONGLONG for MrC - changed type for AbsoluteTime in
46:
47: Bugs: Report bugs to Radar component "System Interfaces", "Latest"
48: List the version information (from above) in the Problem Description.
49:
50: */
51: #ifndef __CONDITIONALMACROS__
52: #define __CONDITIONALMACROS__
53:
54: /****************************************************************************************************
55: UNIVERSAL_INTERFACES_VERSION
56:
57: 0x0300 => version 3.0
58: 0x0210 => version 2.1
59: This conditional did not exist prior to version 2.1
60: ****************************************************************************************************/
61: #define UNIVERSAL_INTERFACES_VERSION 0x0300
62:
63: /****************************************************************************************************
64:
65: TARGET_CPU_�
66: These conditionals specify which microprocessor instruction set is being
67: generated. At most one of these is true, the rest are false.
68:
69: TARGET_CPU_PPC - Compiler is generating PowerPC instructions
70: TARGET_CPU_68K - Compiler is generating 680x0 instructions
71: TARGET_CPU_X86 - Compiler is generating x86 instructions
72: TARGET_CPU_MIPS - Compiler is generating MIPS instructions
73: TARGET_CPU_SPARC - Compiler is generating Sparc instructions
74: TARGET_CPU_ALPHA - Compiler is generating Dec Alpha instructions
75:
76:
77: TARGET_OS_�
78: These conditionals specify in which Operating System the generated code will
79: run. At most one of the these is true, the rest are false.
80:
81: TARGET_OS_MAC - Generate code will run under Mac OS
82: TARGET_OS_WIN32 - Generate code will run under 32-bit Windows
83: TARGET_OS_UNIX - Generate code will run under some unix
84: TARGET_OS_RHAPSODY - Generate code will run under Rhapsody
85:
86:
87: TARGET_RT_�
88: These conditionals specify in which runtime the generated code will
89: run. This is needed when the OS and CPU support more than one runtime
90: (e.g. MacOS on 68K supports CFM68K and Classic 68k).
91:
92: TARGET_RT_LITTLE_ENDIAN - Generated code uses little endian format for integers
93: TARGET_RT_BIG_ENDIAN - Generated code uses big endian format for integers
94: TARGET_RT_MAC_CFM - TARGET_OS_MAC is true and CFM68K or PowerPC CFM being used
95: TARGET_RT_MAC_68881 - TARGET_OS_MAC is true and 68881 floating point instructions used
96:
97:
98: PRAGMA_�
99: These conditionals specify whether the compiler supports particular #pragma's
100:
101: PRAGMA_IMPORT - Compiler supports: #pragma import on/off/reset
102: PRAGMA_ONCE - Compiler supports: #pragma once
103: PRAGMA_STRUCT_ALIGN - Compiler supports: #pragma options align=mac68k/power/reset
104: PRAGMA_STRUCT_PACK - Compiler supports: #pragma pack(n)
105: PRAGMA_STRUCT_PACKPUSH - Compiler supports: #pragma pack(push, n)/pack(pop)
106: PRAGMA_ENUM_PACK - Compiler supports: #pragma options(!pack_enums)
107: PRAGMA_ENUM_ALWAYSINT - Compiler supports: #pragma enumsalwaysint on/off/reset
108: PRAGMA_ENUM_OPTIONS - Compiler supports: #pragma options enum=int/small/reset
109:
110: FOUR_CHAR_CODE
111: This conditional does the proper byte swapping to assue that a four character code (e.g. 'TEXT')
112: is compiled down to the correct value on all compilers.
113:
114: FOUR_CHAR_CODE('abcd') - Convert a four-char-code to the correct 32-bit value
115:
116: TYPE_�
117: These conditionals specify whether the compiler supports particular types.
118:
119: TYPE_LONGLONG - Compiler supports "long long" 64-bit integers
120: TYPE_BOOL - Compiler supports "bool"
121: TYPE_EXTENDED - Compiler supports "extended" 80/96 bit floating point
122:
123: ****************************************************************************************************/
124:
125: #if defined(__MRC__)
126: /*
127: MrC[pp] compiler from Apple Computer, Inc.
128: */
129: #define TARGET_CPU_PPC 1
130: #define TARGET_CPU_68K 0
131: #define TARGET_CPU_X86 0
132: #define TARGET_CPU_MIPS 0
133: #define TARGET_CPU_SPARC 0
134: #define TARGET_CPU_ALPHA 0
135: #define TARGET_OS_MAC 1
136: #define TARGET_OS_WIN32 0
137: #define TARGET_OS_UNIX 0
138: #define TARGET_RT_LITTLE_ENDIAN 0
139: #define TARGET_RT_BIG_ENDIAN 1
140: #define TARGET_RT_MAC_CFM 1
141: #define TARGET_RT_MAC_68881 0
142: #if (__MRC__ > 0x0200) && (__MRC__ < 0x0700)
143: #define PRAGMA_IMPORT 1
144: #else
145: #define PRAGMA_IMPORT 0
146: #endif
147: #define PRAGMA_STRUCT_ALIGN 1
148: #define PRAGMA_ONCE 1
149: #define PRAGMA_STRUCT_PACK 0
150: #define PRAGMA_STRUCT_PACKPUSH 0
151: #define PRAGMA_ENUM_PACK 0
152: #define PRAGMA_ENUM_ALWAYSINT 0
153: #define PRAGMA_ENUM_OPTIONS 0
154: #define FOUR_CHAR_CODE(x) (x)
155:
156: #if (__MRC__ > 0x0300) && (__MRC__ < 0x0700)
157: #if __option(longlong)
158: #define TYPE_LONGLONG 1
159: #else
160: #define TYPE_LONGLONG 0
161: #endif
162: #if __option(bool)
163: #define TYPE_BOOL 1
164: #else
165: #define TYPE_BOOL 0
166: #endif
167: #else
168: #define TYPE_LONGLONG 0
169: #define TYPE_BOOL 0
170: #endif
171: #define TYPE_EXTENDED 0
172:
173:
174:
175: #elif defined(__SC__) && (defined(MPW_CPLUS) || defined(MPW_C))
176: /*
177: SC[pp] compiler from Apple Computer, Inc.
178: */
179: #define TARGET_CPU_PPC 0
180: #define TARGET_CPU_68K 1
181: #define TARGET_CPU_X86 0
182: #define TARGET_CPU_MIPS 0
183: #define TARGET_CPU_SPARC 0
184: #define TARGET_CPU_ALPHA 0
185: #define TARGET_OS_MAC 1
186: #define TARGET_OS_WIN32 0
187: #define TARGET_OS_UNIX 0
188: #define TARGET_RT_LITTLE_ENDIAN 0
189: #define TARGET_RT_BIG_ENDIAN 1
190: #if defined(__CFM68K__)
191: #define TARGET_RT_MAC_CFM 1
192: #else
193: #define TARGET_RT_MAC_CFM 0
194: #endif
195: #if defined(mc68881)
196: #define TARGET_RT_MAC_68881 1
197: #else
198: #define TARGET_RT_MAC_68881 0
199: #endif
200: #if TARGET_RT_MAC_CFM
201: #define PRAGMA_IMPORT 1
202: #if (__SC__ <= 0x0810)
203: /* old versions of SC don't support �#pragma import reset� */
204: #define PRAGMA_IMPORT_OFF 1
205: #endif
206: #else
207: #define PRAGMA_IMPORT 0
208: #endif
209: #define PRAGMA_STRUCT_ALIGN 0
210: #define PRAGMA_ONCE 0
211: #define PRAGMA_STRUCT_PACK 0
212: #define PRAGMA_STRUCT_PACKPUSH 0
213: #define PRAGMA_ENUM_PACK 1
214: #define PRAGMA_ENUM_ALWAYSINT 0
215: #define PRAGMA_ENUM_OPTIONS 0
216: #define FOUR_CHAR_CODE(x) (x)
217:
218: #define TYPE_LONGLONG 0
219: #define TYPE_EXTENDED 1
220: #if (__SC__ > 0x0810)
221: #if __option(bool)
222: #define TYPE_BOOL 1
223: #else
224: #define TYPE_BOOL 0
225: #endif
226: #else
227: #define TYPE_BOOL 0
228: #endif
229:
230:
231:
232: #elif defined(__MWERKS__)
233: /*
234: CodeWarrior compiler from Metrowerks, Inc.
235: */
236: #if (__MWERKS__ < 0x0900) || macintosh
237: #define TARGET_OS_MAC 0
238: #define TARGET_OS_WIN32 0
239: #define TARGET_OS_UNIX 1
240: #define TARGET_CPU_X86 0
241: #define TARGET_CPU_MIPS 0
242: #define TARGET_CPU_SPARC 0
243: #define TARGET_CPU_ALPHA 0
244: #define TARGET_RT_LITTLE_ENDIAN 0
245: #define TARGET_RT_BIG_ENDIAN 1
246: #if powerc
247: #define TARGET_CPU_PPC 1
248: #define TARGET_CPU_68K 0
249: #define TARGET_RT_MAC_CFM 1
250: #define TARGET_RT_MAC_68881 0
251: #else
252: #define TARGET_CPU_PPC 0
253: #define TARGET_CPU_68K 1
254: #if defined(__CFM68K__)
255: #define TARGET_RT_MAC_CFM 1
256: #else
257: #define TARGET_RT_MAC_CFM 0
258: #endif
259: #if __MC68881__
260: #define TARGET_RT_MAC_68881 1
261: #else
262: #define TARGET_RT_MAC_68881 0
263: #endif
264: #endif
265: #elif (__MWERKS__ >= 0x0900) && __INTEL__
266: #define TARGET_CPU_PPC 0
267: #define TARGET_CPU_68K 0
268: #define TARGET_CPU_X86 1
269: #define TARGET_CPU_MIPS 0
270: #define TARGET_CPU_SPARC 0
271: #define TARGET_CPU_ALPHA 0
272: #define TARGET_OS_MAC 0
273: #define TARGET_OS_WIN32 1
274: #define TARGET_OS_UNIX 0
275: #define TARGET_RT_LITTLE_ENDIAN 1
276: #define TARGET_RT_BIG_ENDIAN 0
277: #define TARGET_RT_MAC_CFM 0
278: #define TARGET_RT_MAC_68881 0
279: #else
280: #error unknown Metrowerks compiler
281: #endif
282:
283:
284: #if (__MWERKS__ >= 0x0700)
285: #define PRAGMA_IMPORT TARGET_RT_MAC_CFM
286: #else
287: #define PRAGMA_IMPORT 0
288: #endif
289: #define PRAGMA_STRUCT_ALIGN 1
290: #define PRAGMA_ONCE 1
291: #define PRAGMA_STRUCT_PACK 0
292: #define PRAGMA_STRUCT_PACKPUSH 0
293: #define PRAGMA_ENUM_PACK 0
294: #define PRAGMA_ENUM_ALWAYSINT 1
295: #define PRAGMA_ENUM_OPTIONS 0
296: #define FOUR_CHAR_CODE(x) (x)
297:
298: #if (__MWERKS__ >= 0x1100)
299: #if __option(longlong)
300: #define TYPE_LONGLONG 1
301: #define _LONG_LONG 1 /* temporary */
302: #else
303: #define TYPE_LONGLONG 0
304: #endif
305: #else
306: #define TYPE_LONGLONG 0
307: #endif
308: #if (__MWERKS__ >= 0x1000)
309: #if __option(bool)
310: #define TYPE_BOOL 1
311: #else
312: #define TYPE_BOOL 0
313: #endif
314: #else
315: #define TYPE_BOOL 0
316: #endif
317:
318: #if TARGET_OS_MAC && TARGET_CPU_68K
319: typedef long double extended;
320: #define TYPE_EXTENDED 1
321: #else
322: #define TYPE_EXTENDED 0
323: #endif
324:
325:
326:
327: #elif defined(SYMANTEC_CPLUS) || defined(SYMANTEC_C)
328: /*
329: C and C++ compiler from Symantec, Inc.
330: */
331: #define TARGET_OS_MAC 1
332: #define TARGET_OS_WIN32 0
333: #define TARGET_OS_UNIX 0
334: #define TARGET_CPU_X86 0
335: #define TARGET_CPU_MIPS 0
336: #define TARGET_CPU_SPARC 0
337: #define TARGET_CPU_ALPHA 0
338: #define TARGET_RT_LITTLE_ENDIAN 0
339: #define TARGET_RT_BIG_ENDIAN 1
340: #if powerc
341: #define TARGET_CPU_PPC 1
342: #define TARGET_CPU_68K 0
343: #define TARGET_RT_MAC_CFM 1
344: #define TARGET_RT_MAC_68881 0
345: #else
346: #define TARGET_CPU_PPC 0
347: #define TARGET_CPU_68K 1
348: #if defined(__CFM68K)
349: #define TARGET_RT_MAC_CFM 1
350: #else
351: #define TARGET_RT_MAC_CFM 0
352: #endif
353: #if mc68881
354: #define TARGET_RT_MAC_68881 1
355: #else
356: #define TARGET_RT_MAC_68881 0
357: #endif
358: #endif
359: #define PRAGMA_IMPORT 0
360: #define PRAGMA_ONCE 1
361: #define PRAGMA_STRUCT_ALIGN 1
362: #define PRAGMA_STRUCT_PACK 0
363: #define PRAGMA_STRUCT_PACKPUSH 0
364: #define PRAGMA_ENUM_PACK 1
365: #define PRAGMA_ENUM_ALWAYSINT 0
366: #define PRAGMA_ENUM_OPTIONS 0
367: #define FOUR_CHAR_CODE(x) (x)
368:
369: #if __useAppleExts__
370: #define TYPE_EXTENDED 1
371: #else
372: #define TYPE_EXTENDED 0
373: #endif
374: #define TYPE_LONGLONG 0
375: #define TYPE_BOOL 0
376:
377:
378:
379: #elif defined(THINK_C)
380: /*
381: THINK C compiler from Symantec, Inc. << WARNING: Unsupported Compiler >>
382: */
383: #define TARGET_CPU_PPC 0
384: #define TARGET_CPU_68K 1
385: #define TARGET_CPU_X86 0
386: #define TARGET_CPU_MIPS 0
387: #define TARGET_CPU_SPARC 0
388: #define TARGET_CPU_ALPHA 0
389: #define TARGET_OS_MAC 1
390: #define TARGET_OS_WIN32 0
391: #define TARGET_OS_UNIX 0
392: #define TARGET_RT_LITTLE_ENDIAN 0
393: #define TARGET_RT_BIG_ENDIAN 1
394: #define TARGET_RT_MAC_CFM 0
395: #if defined(mc68881)
396: #define TARGET_RT_MAC_68881 1
397: #else
398: #define TARGET_RT_MAC_68881 0
399: #endif
400: #define PRAGMA_IMPORT 0
401: #define PRAGMA_STRUCT_ALIGN 0
402: #define PRAGMA_ONCE 1
403: #define PRAGMA_STRUCT_PACK 0
404: #define PRAGMA_STRUCT_PACKPUSH 0
405: #define PRAGMA_ENUM_PACK 1
406: #define PRAGMA_ENUM_ALWAYSINT 0
407: #define PRAGMA_ENUM_OPTIONS 0
408: #define FOUR_CHAR_CODE(x) (x)
409:
410: #define TYPE_EXTENDED 1
411: #define TYPE_LONGLONG 0
412: #define TYPE_BOOL 0
413:
414:
415:
416: #elif defined(__PPCC__)
417: /*
418: PPCC compiler from Apple Computer, Inc. << WARNING: Unsupported Compiler >>
419: */
420: #define TARGET_CPU_PPC 1
421: #define TARGET_CPU_68K 0
422: #define TARGET_CPU_X86 0
423: #define TARGET_CPU_MIPS 0
424: #define TARGET_CPU_SPARC 0
425: #define TARGET_CPU_ALPHA 0
426: #define TARGET_OS_MAC 1
427: #define TARGET_OS_WIN32 0
428: #define TARGET_OS_UNIX 0
429: #define TARGET_RT_LITTLE_ENDIAN 0
430: #define TARGET_RT_BIG_ENDIAN 1
431: #define TARGET_RT_MAC_CFM 1
432: #define TARGET_RT_MAC_68881 0
433: #define PRAGMA_IMPORT 0
434: #define PRAGMA_STRUCT_ALIGN 1
435: #define PRAGMA_ONCE 0
436: #define PRAGMA_STRUCT_PACK 0
437: #define PRAGMA_STRUCT_PACKPUSH 0
438: #define PRAGMA_ENUM_PACK 0
439: #define PRAGMA_ENUM_ALWAYSINT 0
440: #define PRAGMA_ENUM_OPTIONS 0
441: #define FOUR_CHAR_CODE(x) (x)
442:
443: #define TYPE_EXTENDED 0
444: #define TYPE_LONGLONG 0
445: #define TYPE_BOOL 0
446:
447:
448: #elif defined(applec) && !defined(__SC__)
449: /*
450: MPW C compiler from Apple Computer, Inc. << WARNING: Unsupported Compiler >>
451: */
452: #define TARGET_CPU_PPC 0
453: #define TARGET_CPU_68K 1
454: #define TARGET_CPU_X86 0
455: #define TARGET_CPU_MIPS 0
456: #define TARGET_CPU_SPARC 0
457: #define TARGET_CPU_ALPHA 0
458: #define TARGET_OS_MAC 1
459: #define TARGET_OS_WIN32 0
460: #define TARGET_OS_UNIX 0
461: #define TARGET_RT_LITTLE_ENDIAN 0
462: #define TARGET_RT_BIG_ENDIAN 1
463: #define TARGET_RT_MAC_CFM 0
464: #if defined(mc68881)
465: #define TARGET_RT_MAC_68881 1
466: #else
467: #define TARGET_RT_MAC_68881 0
468: #endif
469: #define PRAGMA_IMPORT 0
470: #define PRAGMA_STRUCT_ALIGN 0
471: #define PRAGMA_ONCE 0
472: #define PRAGMA_STRUCT_PACK 0
473: #define PRAGMA_STRUCT_PACKPUSH 0
474: #define PRAGMA_ENUM_PACK 0
475: #define PRAGMA_ENUM_ALWAYSINT 0
476: #define PRAGMA_ENUM_OPTIONS 0
477: /* Note: MPW C 3.2 had a bug where MACRO('xx ') would cause 'xx ' to be misevaluated */
478: #define FOUR_CHAR_CODE
479:
480: #define TYPE_EXTENDED 1
481: #define TYPE_LONGLONG 0
482: #define TYPE_BOOL 0
483:
484:
485:
486: #elif defined(__GNUC__)
487: /*
488: gC from Free Software Foundation, Inc.
489: */
490: #if 0
491:
492: #if #cpu(powerpc)
493: #define TARGET_CPU_PPC 1
494: #define TARGET_CPU_68K 0
495: #define TARGET_CPU_X86 0
496: #define TARGET_CPU_MIPS 0
497: #define TARGET_CPU_SPARC 0
498: #define TARGET_CPU_ALPHA 0
499: #define TARGET_RT_MAC_CFM 1
500: #define TARGET_RT_MAC_68881 0
501: #elif #cpu(m68k)
502: #define TARGET_CPU_PPC 0
503: #define TARGET_CPU_68K 1
504: #define TARGET_CPU_X86 0
505: #define TARGET_CPU_MIPS 0
506: #define TARGET_CPU_SPARC 0
507: #define TARGET_CPU_ALPHA 0
508: #define TARGET_RT_MAC_CFM 0
509: #define TARGET_RT_MAC_68881 0
510: #else
511: #error unsupported GNU C compiler
512: #endif
513:
514: #if #system(macos)
515: #define TARGET_OS_MAC 1
516: #define TARGET_OS_WIN32 0
517: #define TARGET_OS_UNIX 0
518: #elif #system(unix)
519: #define TARGET_OS_MAC 0
520: #define TARGET_OS_WIN32 0
521: #define TARGET_OS_UNIX 1
522: #else
523: #error unsupported GNU C compiler
524: #endif
525: #endif
526:
527: #define TARGET_CPU_PPC 1
528: #define TARGET_CPU_68K 0
529: #define TARGET_CPU_X86 0
530: #define TARGET_CPU_MIPS 0
531: #define TARGET_CPU_SPARC 0
532: #define TARGET_CPU_ALPHA 0
533: #define TARGET_RT_MAC_CFM 0
534: #define TARGET_RT_MAC_68881 0
535:
536: #define TARGET_OS_MAC 0
537: #define TARGET_OS_WIN32 0
538: #define TARGET_OS_UNIX 0
539: #define TARGET_OS_RHAPSODY 1
540:
541: #if DIAGNOSTIC
542: #define DEBUG_BUILD 1
543: #else
544: #define DEBUG_BUILD 0
545: #endif /* DIAGNOSTIC */
546:
547: #define TARGET_RT_LITTLE_ENDIAN 0
548: #define TARGET_RT_BIG_ENDIAN 1
549: #define PRAGMA_IMPORT 0
550: #define PRAGMA_STRUCT_ALIGN 1
551: #define PRAGMA_ONCE 0
552: #define PRAGMA_STRUCT_PACK 0
553: #define PRAGMA_STRUCT_PACKPUSH 0
554: #define PRAGMA_ENUM_PACK 0
555: #define PRAGMA_ENUM_ALWAYSINT 0
556: #define PRAGMA_ENUM_OPTIONS 0
557: #define DWORD unsigned long
558: #define FOUR_CHAR_CODE(x) x
559: // #define FOUR_CHAR_CODE(x) (((DWORD) ((x) & 0x000000FF)) << 24) \
560: // | (((DWORD) ((x) & 0x0000FF00)) << 8) \
561: // | (((DWORD) ((x) & 0x00FF0000)) >> 8) \
562: // | (((DWORD) ((x) & 0xFF000000)) >> 24)
563:
564: #define TYPE_EXTENDED 0
565: #ifdef _LONG_LONG
566: #define TYPE_LONGLONG 1
567: #else
568: #define TYPE_LONGLONG 0
569: #endif
570: #define TYPE_BOOL 0
571:
572:
573:
574: #elif defined(__xlc) || defined(__xlC) || defined(__xlC__) || defined(__XLC121__)
575: /*
576: xlc and xlC on RS/6000 from IBM, Inc.
577: */
578: #define TARGET_CPU_PPC 1
579: #define TARGET_CPU_68K 0
580: #define TARGET_CPU_X86 0
581: #define TARGET_CPU_MIPS 0
582: #define TARGET_CPU_SPARC 0
583: #define TARGET_CPU_ALPHA 0
584: #define TARGET_OS_MAC 1
585: #define TARGET_OS_WIN32 0
586: #define TARGET_OS_UNIX 0
587: #define TARGET_RT_LITTLE_ENDIAN 0
588: #define TARGET_RT_BIG_ENDIAN 1
589: #define TARGET_RT_MAC_CFM 1
590: #define TARGET_RT_MAC_68881 0
591: #define PRAGMA_IMPORT 0
592: #define PRAGMA_STRUCT_ALIGN 1
593: #define PRAGMA_ONCE 0
594: #define PRAGMA_STRUCT_PACK 0
595: #define PRAGMA_STRUCT_PACKPUSH 0
596: #define PRAGMA_ENUM_PACK 0
597: #define PRAGMA_ENUM_ALWAYSINT 0
598: #define PRAGMA_ENUM_OPTIONS 1
599: #define FOUR_CHAR_CODE(x) (x)
600:
601: #define TYPE_EXTENDED 0
602: #ifdef _LONG_LONG
603: #define TYPE_LONGLONG 1
604: #else
605: #define TYPE_LONGLONG 0
606: #endif
607: #define TYPE_BOOL 0
608:
609:
610: #elif defined(_MSC_VER) && !defined(__MWERKS__)
611: /*
612: Visual C++ from Microsoft, Inc.
613: */
614: #if defined(_M_M68K) /* Visual C++ with Macintosh 68K target */
615: #define TARGET_CPU_PPC 0
616: #define TARGET_CPU_68K 1
617: #define TARGET_CPU_X86 0
618: #define TARGET_CPU_MIPS 0
619: #define TARGET_CPU_SPARC 0
620: #define TARGET_CPU_ALPHA 0
621: #define TARGET_OS_MAC 1
622: #define TARGET_OS_WIN32 0
623: #define TARGET_OS_UNIX 0
624: #define TARGET_RT_LITTLE_ENDIAN 0
625: #define TARGET_RT_BIG_ENDIAN 1
626: #define TARGET_RT_MAC_CFM 0
627: #define TARGET_RT_MAC_68881 0
628: #define PRAGMA_IMPORT 0
629: #define PRAGMA_STRUCT_ALIGN 1
630: #define PRAGMA_ONCE 0
631: #define PRAGMA_STRUCT_PACK 1
632: #define PRAGMA_STRUCT_PACKPUSH 1
633: #define PRAGMA_ENUM_PACK 0
634: #define PRAGMA_ENUM_ALWAYSINT 0
635: #define PRAGMA_ENUM_OPTIONS 0
636: #define FOUR_CHAR_CODE(x) (x)
637: #define TYPE_EXTENDED 0
638: #define TYPE_LONGLONG 0
639: #define TYPE_BOOL 0
640: #elif defined(_M_MPPC) /* Visual C++ with Macintosh PowerPC target */
641: #define TARGET_CPU_PPC 1
642: #define TARGET_CPU_68K 0
643: #define TARGET_CPU_X86 0
644: #define TARGET_CPU_MIPS 0
645: #define TARGET_CPU_SPARC 0
646: #define TARGET_CPU_ALPHA 0
647: #define TARGET_OS_MAC 1
648: #define TARGET_OS_WIN32 0
649: #define TARGET_OS_UNIX 0
650: #define TARGET_RT_LITTLE_ENDIAN 0
651: #define TARGET_RT_BIG_ENDIAN 1
652: #define TARGET_RT_MAC_CFM 1
653: #define TARGET_RT_MAC_68881 0
654: #define PRAGMA_IMPORT 0
655: #define PRAGMA_STRUCT_ALIGN 1
656: #define PRAGMA_ONCE 0
657: #define PRAGMA_STRUCT_PACK 1
658: #define PRAGMA_STRUCT_PACKPUSH 1
659: #define PRAGMA_ENUM_PACK 0
660: #define PRAGMA_ENUM_ALWAYSINT 0
661: #define PRAGMA_ENUM_OPTIONS 0
662: #define FOUR_CHAR_CODE(x) (x)
663: #define TYPE_EXTENDED 0
664: #define TYPE_LONGLONG 0
665: #define TYPE_BOOL 0
666:
667: #elif defined(_M_IX86) /* Visual C++ with Intel x86 target */
668: #define TARGET_CPU_PPC 0
669: #define TARGET_CPU_68K 0
670: #define TARGET_CPU_X86 1
671: #define TARGET_CPU_MIPS 0
672: #define TARGET_CPU_SPARC 0
673: #define TARGET_CPU_ALPHA 0
674: #define TARGET_OS_MAC 0
675: #define TARGET_OS_WIN32 1
676: #define TARGET_OS_UNIX 0
677: #define TARGET_RT_LITTLE_ENDIAN 1
678: #define TARGET_RT_BIG_ENDIAN 0
679: #define TARGET_RT_MAC_CFM 0
680: #define TARGET_RT_MAC_68881 0
681: #define PRAGMA_IMPORT 0
682: #define PRAGMA_STRUCT_ALIGN 0
683: #define PRAGMA_ONCE 0
684: #define PRAGMA_STRUCT_PACK 1
685: #define PRAGMA_STRUCT_PACKPUSH 1
686: #define PRAGMA_ENUM_PACK 0
687: #define PRAGMA_ENUM_ALWAYSINT 0
688: #define PRAGMA_ENUM_OPTIONS 0
689: #define FOUR_CHAR_CODE(x) (((DWORD) ((x) & 0x000000FF)) << 24) \
690: | (((DWORD) ((x) & 0x0000FF00)) << 8) \
691: | (((DWORD) ((x) & 0x00FF0000)) >> 8) \
692: | (((DWORD) ((x) & 0xFF000000)) >> 24)
693: #define TYPE_EXTENDED 0
694: #define TYPE_LONGLONG 0
695: #if defined(__cplusplus) && (_MSC_VER >= 1100)
696: #define TYPE_BOOL 1
697: #else
698: #define TYPE_BOOL 0
699: #endif
700:
701: #elif defined(_M_ALPHA) /* Visual C++ with Dec Alpha target */
702: #define TARGET_CPU_PPC 0
703: #define TARGET_CPU_68K 0
704: #define TARGET_CPU_X86 0
705: #define TARGET_CPU_MIPS 0
706: #define TARGET_CPU_SPARC 0
707: #define TARGET_CPU_ALPHA 1
708: #define TARGET_OS_MAC 0
709: #define TARGET_OS_WIN32 1
710: #define TARGET_OS_UNIX 0
711: #define TARGET_RT_LITTLE_ENDIAN 1
712: #define TARGET_RT_BIG_ENDIAN 0
713: #define TARGET_RT_MAC_CFM 0
714: #define TARGET_RT_MAC_68881 0
715: #define PRAGMA_IMPORT 0
716: #define PRAGMA_STRUCT_ALIGN 0
717: #define PRAGMA_ONCE 0
718: #define PRAGMA_STRUCT_PACK 1
719: #define PRAGMA_STRUCT_PACKPUSH 1
720: #define PRAGMA_ENUM_PACK 0
721: #define PRAGMA_ENUM_ALWAYSINT 0
722: #define PRAGMA_ENUM_OPTIONS 0
723: #define FOUR_CHAR_CODE(x) (((DWORD) ((x) & 0x000000FF)) << 24) \
724: | (((DWORD) ((x) & 0x0000FF00)) << 8) \
725: | (((DWORD) ((x) & 0x00FF0000)) >> 8) \
726: | (((DWORD) ((x) & 0xFF000000)) >> 24)
727: #define TYPE_EXTENDED 0
728: #define TYPE_LONGLONG 0
729: #define TYPE_BOOL 0
730:
731: #elif defined(_M_PPC) /* Visual C++ for Windows NT on PowerPC target */
732: #define TARGET_CPU_PPC 1
733: #define TARGET_CPU_68K 0
734: #define TARGET_CPU_X86 0
735: #define TARGET_CPU_MIPS 0
736: #define TARGET_CPU_SPARC 0
737: #define TARGET_CPU_ALPHA 0
738: #define TARGET_OS_MAC 0
739: #define TARGET_OS_WIN32 1
740: #define TARGET_OS_UNIX 0
741: #define TARGET_RT_LITTLE_ENDIAN 1
742: #define TARGET_RT_BIG_ENDIAN 0
743: #define TARGET_RT_MAC_CFM 0
744: #define TARGET_RT_MAC_68881 0
745: #define PRAGMA_IMPORT 0
746: #define PRAGMA_STRUCT_ALIGN 0
747: #define PRAGMA_ONCE 0
748: #define PRAGMA_STRUCT_PACK 1
749: #define PRAGMA_STRUCT_PACKPUSH 1
750: #define PRAGMA_ENUM_PACK 0
751: #define PRAGMA_ENUM_ALWAYSINT 0
752: #define PRAGMA_ENUM_OPTIONS 0
753: #define FOUR_CHAR_CODE(x) (((DWORD) ((x) & 0x000000FF)) << 24) \
754: | (((DWORD) ((x) & 0x0000FF00)) << 8) \
755: | (((DWORD) ((x) & 0x00FF0000)) >> 8) \
756: | (((DWORD) ((x) & 0xFF000000)) >> 24)
757: #define TYPE_EXTENDED 0
758: #define TYPE_LONGLONG 0
759: #define TYPE_BOOL 0
760:
761: #elif defined(_M_MRX000) /* Visual C++ for Windows NT on MIPS target */
762: #define TARGET_CPU_PPC 0
763: #define TARGET_CPU_68K 0
764: #define TARGET_CPU_X86 0
765: #define TARGET_CPU_MIPS 1
766: #define TARGET_CPU_SPARC 0
767: #define TARGET_CPU_ALPHA 0
768: #define TARGET_OS_MAC 0
769: #define TARGET_OS_WIN32 1
770: #define TARGET_OS_UNIX 0
771: #define TARGET_RT_LITTLE_ENDIAN 1
772: #define TARGET_RT_BIG_ENDIAN 0
773: #define TARGET_RT_MAC_CFM 0
774: #define TARGET_RT_MAC_68881 0
775: #define PRAGMA_IMPORT 0
776: #define PRAGMA_STRUCT_ALIGN 0
777: #define PRAGMA_ONCE 0
778: #define PRAGMA_STRUCT_PACK 1
779: #define PRAGMA_STRUCT_PACKPUSH 1
780: #define PRAGMA_ENUM_PACK 0
781: #define PRAGMA_ENUM_ALWAYSINT 0
782: #define PRAGMA_ENUM_OPTIONS 0
783: #define FOUR_CHAR_CODE(x) (((DWORD) ((x) & 0x000000FF)) << 24) \
784: | (((DWORD) ((x) & 0x0000FF00)) << 8) \
785: | (((DWORD) ((x) & 0x00FF0000)) >> 8) \
786: | (((DWORD) ((x) & 0xFF000000)) >> 24)
787: #define TYPE_EXTENDED 0
788: #define TYPE_LONGLONG 0
789: #define TYPE_BOOL 0
790: #endif
791:
792:
793: #elif defined(__MOTO__)
794: /*
795: mcc from Motorola, Inc. ??
796: */
797:
798:
799:
800: #elif defined(_MIPS_ISA)
801: /*
802: MIPSpro compiler from Silicon Graphics Inc.
803: */
804: #define TARGET_CPU_PPC 0
805: #define TARGET_CPU_68K 0
806: #define TARGET_CPU_X86 0
807: #define TARGET_CPU_MIPS 1
808: #define TARGET_CPU_SPARC 0
809: #define TARGET_CPU_ALPHA 0
810: #define TARGET_OS_MAC 0
811: #define TARGET_OS_WIN32 0
812: #define TARGET_OS_UNIX 1
813: #define TARGET_RT_LITTLE_ENDIAN 0
814: #define TARGET_RT_BIG_ENDIAN 1
815: #define TARGET_RT_MAC_CFM 0
816: #define TARGET_RT_MAC_68881 0
817: #define PRAGMA_IMPORT 0
818: #define PRAGMA_STRUCT_ALIGN 0
819: #define PRAGMA_ONCE 0
820: #define PRAGMA_STRUCT_PACK 1
821: #define PRAGMA_STRUCT_PACKPUSH 0
822: #define PRAGMA_ENUM_PACK 0
823: #define PRAGMA_ENUM_ALWAYSINT 0
824: #define PRAGMA_ENUM_OPTIONS 0
825: #define FOUR_CHAR_CODE(x) (x)
826: #define TYPE_EXTENDED 0
827: #define TYPE_LONGLONG 0
828: #define TYPE_BOOL 0
829:
830:
831: #elif defined(__sparc)
832: /*
833: SPARCompiler compiler from Sun Microsystems Inc.
834: */
835: #define TARGET_CPU_PPC 0
836: #define TARGET_CPU_68K 0
837: #define TARGET_CPU_X86 0
838: #define TARGET_CPU_MIPS 0
839: #define TARGET_CPU_SPARC 1
840: #define TARGET_CPU_ALPHA 0
841: #define TARGET_OS_MAC 0
842: #define TARGET_OS_WIN32 0
843: #define TARGET_OS_UNIX 1
844: #define TARGET_RT_LITTLE_ENDIAN 0
845: #define TARGET_RT_BIG_ENDIAN 1
846: #define TARGET_RT_MAC_CFM 0
847: #define TARGET_RT_MAC_68881 0
848: #define PRAGMA_IMPORT 0
849: #define PRAGMA_STRUCT_ALIGN 0
850: #define PRAGMA_ONCE 0
851: #define PRAGMA_STRUCT_PACK 1
852: #define PRAGMA_STRUCT_PACKPUSH 0
853: #define PRAGMA_ENUM_PACK 0
854: #define PRAGMA_ENUM_ALWAYSINT 0
855: #define PRAGMA_ENUM_OPTIONS 0
856: #define FOUR_CHAR_CODE(x) (((unsigned long) ((x) & 0x000000FF)) << 24) \
857: | (((unsigned long) ((x) & 0x0000FF00)) << 8) \
858: | (((unsigned long) ((x) & 0x00FF0000)) >> 8) \
859: | (((unsigned long) ((x) & 0xFF000000)) >> 24)
860: #define TYPE_EXTENDED 0
861: #define TYPE_LONGLONG 0
862: #define TYPE_BOOL 0
863:
864:
865: #else
866: /*
867: Unknown compiler, perhaps set up from the command line (e.g. -d TARGET_CPU_MIPS , etc.)
868: */
869: #if defined(TARGET_CPU_PPC) && TARGET_CPU_PPC
870: #define TARGET_CPU_68K 0
871: #define TARGET_CPU_X86 0
872: #define TARGET_CPU_MIPS 0
873: #define TARGET_CPU_SPARC 0
874: #define TARGET_CPU_ALPHA 0
875: #elif defined(TARGET_CPU_68K) && TARGET_CPU_68K
876: #define TARGET_CPU_PPC 0
877: #define TARGET_CPU_X86 0
878: #define TARGET_CPU_MIPS 0
879: #define TARGET_CPU_SPARC 0
880: #define TARGET_CPU_ALPHA 0
881: #elif defined(TARGET_CPU_X86) && TARGET_CPU_X86
882: #define TARGET_CPU_PPC 0
883: #define TARGET_CPU_68K 0
884: #define TARGET_CPU_MIPS 0
885: #define TARGET_CPU_SPARC 0
886: #define TARGET_CPU_ALPHA 0
887: #elif defined(TARGET_CPU_MIPS) && TARGET_CPU_MIPS
888: #define TARGET_CPU_PPC 0
889: #define TARGET_CPU_68K 0
890: #define TARGET_CPU_X86 0
891: #define TARGET_CPU_SPARC 0
892: #define TARGET_CPU_ALPHA 0
893: #elif defined(TARGET_CPU_SPARC) && TARGET_CPU_SPARC
894: #define TARGET_CPU_PPC 0
895: #define TARGET_CPU_68K 0
896: #define TARGET_CPU_X86 0
897: #define TARGET_CPU_MIPS 0
898: #define TARGET_CPU_ALPHA 0
899: #elif defined(TARGET_CPU_ALPHA) && TARGET_CPU_ALPHA
900: #define TARGET_CPU_PPC 0
901: #define TARGET_CPU_68K 0
902: #define TARGET_CPU_X86 0
903: #define TARGET_CPU_MIPS 0
904: #define TARGET_CPU_SPARC 0
905: #else
906: #error ConditionalMacros.h: unknown compiler
907: #define TARGET_CPU_PPC 0
908: #define TARGET_CPU_68K 0
909: #define TARGET_CPU_X86 0
910: #define TARGET_CPU_MIPS 0
911: #define TARGET_CPU_SPARC 0
912: #define TARGET_CPU_ALPHA 0
913: #endif
914:
915: #if defined(TARGET_OS_RHAPSODY) && TARGET_OS_RHAPSODY
916: #define TARGET_OS_WIN32 0
917: #define TARGET_OS_MAC 0
918: #define TARGET_OS_UNIX 1
919: #endif
920:
921: #if defined(TARGET_OS_MAC) && TARGET_OS_MAC
922: #define TARGET_OS_WIN32 0
923: #define TARGET_OS_UNIX 0
924: #elif defined(TARGET_OS_WIN32) && TARGET_OS_WIN32
925: #define TARGET_OS_MAC 0
926: #define TARGET_OS_UNIX 0
927: #elif defined(TARGET_OS_UNIX) && TARGET_OS_UNIX
928: #define TARGET_OS_MAC 0
929: #define TARGET_OS_WIN32 0
930: #elif TARGET_CPU_PPC || TARGET_CPU_68K
931: #define TARGET_OS_MAC 1
932: #define TARGET_OS_WIN32 0
933: #define TARGET_OS_UNIX 0
934: #else
935: #error ConditionalMacros.h: unknown target OS
936: #endif
937:
938:
939: #if !defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
940: #if TARGET_OS_MAC
941: #define TARGET_RT_LITTLE_ENDIAN 0
942: #define TARGET_RT_BIG_ENDIAN 1
943: #elif TARGET_OS_WIN32
944: #define TARGET_RT_LITTLE_ENDIAN 1
945: #define TARGET_RT_BIG_ENDIAN 0
946: #endif
947: #endif
948:
949: #if defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
950: #define TARGET_RT_LITTLE_ENDIAN !TARGET_RT_BIG_ENDIAN
951: #elif !defined(TARGET_RT_BIG_ENDIAN) && defined(TARGET_RT_LITTLE_ENDIAN)
952: #define TARGET_RT_BIG_ENDIAN !TARGET_RT_LITTLE_ENDIAN
953: #endif
954:
955: #if !defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
956: #error unknown endianess of target processor
957: #endif
958:
959: #ifndef TARGET_RT_MAC_CFM
960: #define TARGET_RT_MAC_CFM TARGET_CPU_PPC
961: #endif
962: #ifndef TARGET_RT_MAC_68881
963: #define TARGET_RT_MAC_68881 0
964: #endif
965:
966:
967: #ifndef PRAGMA_IMPORT
968: #define PRAGMA_IMPORT 0
969: #endif
970: #ifndef PRAGMA_STRUCT_ALIGN
971: #define PRAGMA_STRUCT_ALIGN 0
972: #endif
973: #ifndef PRAGMA_ONCE
974: #define PRAGMA_ONCE 0
975: #endif
976: #ifndef PRAGMA_STRUCT_PACK
977: #define PRAGMA_STRUCT_PACK 0
978: #endif
979: #ifndef PRAGMA_STRUCT_PACKPUSH
980: #define PRAGMA_STRUCT_PACKPUSH 0
981: #endif
982: #ifndef PRAGMA_ENUM_PACK
983: #define PRAGMA_ENUM_PACK 0
984: #endif
985: #ifndef PRAGMA_ENUM_ALWAYSINT
986: #define PRAGMA_ENUM_ALWAYSINT 0
987: #endif
988: #ifndef PRAGMA_ENUM_OPTIONS
989: #define PRAGMA_ENUM_OPTIONS 0
990: #endif
991: #ifndef FOUR_CHAR_CODE
992: #define FOUR_CHAR_CODE(x) (x)
993: #endif
994:
995: #ifndef TYPE_EXTENDED
996: #define TYPE_EXTENDED 0
997: #endif
998: #ifndef TYPE_LONGLONG
999: #define TYPE_LONGLONG 0
1000: #endif
1001: #ifndef TYPE_BOOL
1002: #define TYPE_BOOL 0
1003: #endif
1004: #endif
1005:
1006:
1007:
1008:
1009: /****************************************************************************************************
1010:
1011: EXTERN_API�
1012: These conditionals are used to specify the calling convention of a function.
1013: Mac classic 68K and Win32 each have two possible calling conventions:
1014:
1015: EXTERN_API - Classic 68K pascal, Win32 __cdecl
1016: EXTERN_API_C - Classic 68K C, Win32 __cdecl
1017: EXTERN_API_STDCALL - Classic 68K pascal, Win32 __stdcall
1018: EXTERN_API_C_STDCALL - Classic 68K C, Win32 __stdcall
1019:
1020:
1021: CALLBACK_API�
1022: These conditionals are used to specify the calling convention of a function pointer.
1023: Mac classic 68K and Win32 each have two possible calling conventions:
1024:
1025: CALLBACK_API - Classic 68K pascal, Win32 __stdcall
1026: CALLBACK_API_C - Classic 68K C, Win32 __stdcall
1027: CALLBACK_API_STDCALL - Classic 68K pascal, Win32 __cdecl
1028: CALLBACK_API_C_STDCALL - Classic 68K C, Win32 __cdecl
1029:
1030: ****************************************************************************************************/
1031: #if TARGET_OS_MAC
1032: /*
1033: Mac OS
1034: */
1035: #define EXTERN_API(_type) extern pascal _type /* Note: all Mac OS compilers must be able to handle the pascal keyword */
1036: #define EXTERN_API_C(_type) extern _type
1037: #define EXTERN_API_STDCALL(_type) extern pascal _type
1038: #define EXTERN_API_C_STDCALL(_type) extern _type
1039: #define CALLBACK_API(_type, _name) pascal _type (*_name)
1040: #define CALLBACK_API_C(_type, _name) _type (*_name)
1041: #define CALLBACK_API_STDCALL(_type, _name) pascal _type (*_name)
1042: #define CALLBACK_API_C_STDCALL(_type, _name) _type (*_name)
1043: #elif TARGET_OS_WIN32
1044: /*
1045: Win32
1046: */
1047: #define EXTERN_API(_type) __declspec(dllimport) _type __cdecl
1048: #define EXTERN_API_C(_type) __declspec(dllimport) _type __cdecl
1049: #define EXTERN_API_STDCALL(_type) __declspec(dllimport) _type __stdcall
1050: #define EXTERN_API_C_STDCALL(_type) __declspec(dllimport) _type __stdcall
1051: #define CALLBACK_API(_type, _name) _type (* __cdecl _name)
1052: #define CALLBACK_API_C(_type, _name) _type (* __cdecl _name)
1053: #define CALLBACK_API_STDCALL(_type, _name) _type (* __stdcall _name)
1054: #define CALLBACK_API_C_STDCALL(_type, _name) _type (* __stdcall _name)
1055: #else
1056: /*
1057: Unix or anything else
1058: */
1059: #define EXTERN_API(_type) extern _type
1060: #define EXTERN_API_C(_type) extern _type
1061: #define EXTERN_API_STDCALL(_type) extern _type
1062: #define EXTERN_API_C_STDCALL(_type) extern _type
1063: #define CALLBACK_API(_type, _name) _type (*_name)
1064: #define CALLBACK_API_C(_type, _name) _type (*_name)
1065: #define CALLBACK_API_STDCALL(_type, _name) _type (*_name)
1066: #define CALLBACK_API_C_STDCALL(_type, _name) _type (*_name)
1067: #endif
1068:
1069:
1070: /* Backwards compatibility for clients expecting Universal Interfacew 3.0d7 (Interfacer 2.d014) style */
1071: #define EXTERN_API_1 EXTERN_API_STDCALL
1072: #define EXTERN_API_2 EXTERN_API_C_STDCALL
1073: #define EXTERN_API_3 EXTERN_API
1074: #define EXTERN_API_4 EXTERN_API_C
1075: #define CALLBACK_API_1 CALLBACK_API_STDCALL
1076: #define CALLBACK_API_2 CALLBACK_API_C_STDCALL
1077: #define CALLBACK_API_3 CALLBACK_API
1078: #define CALLBACK_API_4 CALLBACK_API_C
1079:
1080: /* Remove pascal support from Rhapsody */
1081: #ifdef TARGET_OS_RHAPSODY
1082: #define pascal
1083: #endif
1084:
1085: /****************************************************************************************************
1086: Backward compatibility for clients expecting 2.x version on ConditionalMacros.h
1087:
1088: GENERATINGPOWERPC - Compiler is generating PowerPC instructions
1089: GENERATING68K - Compiler is generating 68k family instructions
1090: GENERATING68881 - Compiler is generating mc68881 floating point instructions
1091: GENERATINGCFM - Code being generated assumes CFM calling conventions
1092: CFMSYSTEMCALLS - No A-traps. Systems calls are made using CFM and UPP's
1093: PRAGMA_ALIGN_SUPPORTED - Compiler supports: #pragma options align=mac68k/power/reset
1094: PRAGMA_IMPORT_SUPPORTED - Compiler supports: #pragma import on/off/reset
1095:
1096: ****************************************************************************************************/
1097: #define GENERATINGPOWERPC TARGET_CPU_PPC
1098: #define GENERATING68K TARGET_CPU_68K
1099: #define GENERATING68881 TARGET_RT_MAC_68881
1100: #define GENERATINGCFM TARGET_RT_MAC_CFM
1101: #define CFMSYSTEMCALLS TARGET_RT_MAC_CFM
1102: /*
1103: The SuperMario build sets PRAGMA_ALIGN_SUPPORTED in some cases to work around old MPW C compiler
1104: using NameRegistry. Once SM switches to Interfacer 2.0d14 the #ifndef will no longer be needed.
1105: */
1106: #ifndef PRAGMA_ALIGN_SUPPORTED
1107: #define PRAGMA_ALIGN_SUPPORTED PRAGMA_STRUCT_ALIGN
1108: #endif
1109: #define PRAGMA_IMPORT_SUPPORTED PRAGMA_IMPORT
1110: /*
1111: NOTE: The FOR_� conditionals were developed to produce integerated
1112: interface files for System 7 and Copland. Now that Copland
1113: is canceled, all FOR_ conditionals have been removed from
1114: the interface files. But, just in case you someone got an
1115: interface file that uses them, the following sets the FOR_�
1116: conditionals to a consistent, usable state.
1117: */
1118: #define FOR_OPAQUE_SYSTEM_DATA_STRUCTURES 0
1119: #ifndef FOR_PTR_BASED_AE
1120: #define FOR_PTR_BASED_AE 0
1121: #endif /* ! defined(FOR_PTR_BASED_AE) */
1122:
1123: #define FOR_SYSTEM7_ONLY 1
1124: #define FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED 1
1125: #define FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE 1
1126: #define FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE 1
1127: #define FOR_SYSTEM8_COOPERATIVE 0
1128: #define FOR_SYSTEM8_PREEMPTIVE 0
1129:
1130:
1131:
1132: /****************************************************************************************************
1133:
1134: OLDROUTINENAMES - "Old" names for Macintosh system calls are allowed in source code.
1135: (e.g. DisposPtr instead of DisposePtr). The names of system routine
1136: are now more sensitive to change because CFM binds by name. In the
1137: past, system routine names were compiled out to just an A-Trap.
1138: Macros have been added that each map an old name to its new name.
1139: This allows old routine names to be used in existing source files,
1140: but the macros only work if OLDROUTINENAMES is true. This support
1141: will be removed in the near future. Thus, all source code should
1142: be changed to use the new names! You can set OLDROUTINENAMES to false
1143: to see if your code has any old names left in it.
1144:
1145: OLDROUTINELOCATIONS - "Old" location of Macintosh system calls are used. For example, c2pstr
1146: has been moved from Strings to TextUtils. It is conditionalized in
1147: Strings with OLDROUTINELOCATIONS and in TextUtils with !OLDROUTINELOCATIONS.
1148: This allows developers to upgrade to newer interface files without
1149: having to change the includes in their source code. But, it allows
1150: the slow migration of system calls to more understandable file locations.
1151: OLDROUTINELOCATIONS currently defaults to true, but eventually will
1152: default to false.
1153:
1154: ****************************************************************************************************/
1155: #ifndef OLDROUTINENAMES
1156: #define OLDROUTINENAMES 0
1157: #endif /* ! defined(OLDROUTINENAMES) */
1158:
1159: #ifndef OLDROUTINELOCATIONS
1160: #define OLDROUTINELOCATIONS 0
1161: #endif /* ! defined(OLDROUTINELOCATIONS) */
1162:
1163:
1164:
1165: /****************************************************************************************************
1166: C specific conditionals
1167:
1168: CGLUESUPPORTED - Interface library will support "C glue" functions (function names
1169: are: all lowercase, use C strings instead of pascal strings, use
1170: Point* instead of Point).
1171:
1172: ****************************************************************************************************/
1173: #ifndef CGLUESUPPORTED
1174: #ifdef THINK_C
1175: #define CGLUESUPPORTED 0
1176: #else
1177: #define CGLUESUPPORTED 1
1178: #endif /* defined(THINK_C) */
1179:
1180: #endif /* ! defined(CGLUESUPPORTED) */
1181:
1182:
1183:
1184: /****************************************************************************************************
1185: The following macros isolate the use of 68K inlines in function prototypes.
1186: On the Mac OS under the Classic 68K runtime, function prototypes were followed
1187: by a list of 68K opcodes which the compiler inserted in the generated code instead
1188: of a JSR. Under Classic 68K on the Mac OS, this macro will put the opcodes
1189: in the right syntax. For all other OS's and runtimes the macro suppress the opcodes.
1190: Example:
1191:
1192: EXTERN_P void DrawPicture(PicHandle myPicture, const Rect *dstRect)
1193: ONEWORDINLINE(0xA8F6);
1194:
1195: ****************************************************************************************************/
1196:
1197: #if TARGET_OS_MAC && !TARGET_RT_MAC_CFM
1198: #define ONEWORDINLINE(w1) = w1
1199: #define TWOWORDINLINE(w1,w2) = {w1,w2}
1200: #define THREEWORDINLINE(w1,w2,w3) = {w1,w2,w3}
1201: #define FOURWORDINLINE(w1,w2,w3,w4) = {w1,w2,w3,w4}
1202: #define FIVEWORDINLINE(w1,w2,w3,w4,w5) = {w1,w2,w3,w4,w5}
1203: #define SIXWORDINLINE(w1,w2,w3,w4,w5,w6) = {w1,w2,w3,w4,w5,w6}
1204: #define SEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7) = {w1,w2,w3,w4,w5,w6,w7}
1205: #define EIGHTWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8) = {w1,w2,w3,w4,w5,w6,w7,w8}
1206: #define NINEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9) = {w1,w2,w3,w4,w5,w6,w7,w8,w9}
1207: #define TENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10) = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10}
1208: #define ELEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11) = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11}
1209: #define TWELVEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12) = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12}
1210: #else
1211: #define ONEWORDINLINE(w1)
1212: #define TWOWORDINLINE(w1,w2)
1213: #define THREEWORDINLINE(w1,w2,w3)
1214: #define FOURWORDINLINE(w1,w2,w3,w4)
1215: #define FIVEWORDINLINE(w1,w2,w3,w4,w5)
1216: #define SIXWORDINLINE(w1,w2,w3,w4,w5,w6)
1217: #define SEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7)
1218: #define EIGHTWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8)
1219: #define NINEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9)
1220: #define TENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10)
1221: #define ELEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11)
1222: #define TWELVEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12)
1223: #endif
1224:
1225:
1226:
1227:
1228:
1229: #endif /* __CONDITIONALMACROS__ */
1230:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.