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