home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 9.2 KB | 234 lines | [TEXT/MPS ] |
- {
- File: ConditionalMacros.p
-
- Contains: Set up for compiler independent conditionals
-
- Version: Technology: Universal Interface Files 3.0dx
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- }
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT ConditionalMacros;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED __CONDITIONALMACROS__}
- {$SETC __CONDITIONALMACROS__ := 1}
-
- {$I+}
- {$SETC ConditionalMacrosIncludes := UsingIncludes}
- {$SETC UsingIncludes := 1}
-
- {
- ***************************************************************************************************
- UNIVERSAL_INTERFACES_VERSION
-
- 0x0300 => version 3.0
- 0x0210 => version 2.1
- This conditional did not exist prior to version 2.1
- ***************************************************************************************************
- }
- {$SETC UNIVERSAL_INTERFACES_VERSION := $0300}
- {
- ***************************************************************************************************
- GENERATINGPOWERPC - Compiler is generating PowerPC instructions
- GENERATING68K - Compiler is generating 68k family instructions
-
- Invariant:
- GENERATINGPOWERPC != GENERATING68K
- ***************************************************************************************************
- }
- {$IFC UNDEFINED LSPWRP }
- {$SETC LSPWRP := 0 }
- {$ENDC}
- {$IFC UNDEFINED LSP68K }
- {$SETC LSP68K := NOT LSPWRP }
- {$ENDC}
- {$IFC UNDEFINED GENERATINGPOWERPC }
- {$SETC GENERATINGPOWERPC := LSPWRP }
- {$ENDC}
- {$IFC UNDEFINED GENERATING68K }
- {$SETC GENERATING68K := LSP68K }
- {$ENDC}
- {
- ***************************************************************************************************
- GENERATING68881 - Compiler is generating mc68881 floating point instructions
-
- Invariant:
- GENERATING68881 => GENERATING68K
- ***************************************************************************************************
- }
- {$IFC GENERATING68K AND OPTION(mc68881) }
- {$SETC GENERATING68881 := 1 }
- {$ENDC}
- {$IFC UNDEFINED GENERATING68881 }
- {$SETC GENERATING68881 := 0 }
- {$ENDC}
- {
- ***************************************************************************************************
- GENERATINGCFM - Code being generated assumes CFM calling conventions
- CFMSYSTEMCALLS - No A-traps. Systems calls are made using CFM and UPP's
-
- Invariants:
- GENERATINGPOWERPC => GENERATINGCFM
- GENERATINGPOWERPC => CFMSYSTEMCALLS
- CFMSYSTEMCALLS => GENERATINGCFM
- ***************************************************************************************************
- }
- {$SETC GENERATINGCFM := GENERATINGPOWERPC }
- {$SETC CFMSYSTEMCALLS := GENERATINGPOWERPC }
- {
- ***************************************************************************************************
- One or none of the following BUILDING_≈ conditionals is expected to be set during
- compilation (e.g. MrC -d BUILDING_FOR_SYSTEM7), the others should be left undefined.
- If none is set, BUILDING_FOR_SYSTEM7_AND_SYSTEM8 is used.
-
- BUILDING_FOR_SYSTEM7 - Code is intended to run on System 7.x machine or earlier .
- BUILDING_FOR_SYSTEM7_AND_SYSTEM8 - Code is intended to run on System 7 or Copland.
- BUILDING_FOR_SYSTEM8 - Code is intended to run on Copland only.
- BUILDING_PREEMPTIVE_CODE - Code is intended to run as Copland server or driver.
-
- The following conditionals are set up based on which of the BUILDING_≈ flag (above) was specified.
- They are used in throughout the interface files to conditionalize declarations.
-
- FOR_SYSTEM7_ONLY - In System 7. Not in Copland.
- FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED - In System 7. Works in Copland, but there is a better way.
- FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE - In System 7. In Copland, but only for cooperative tasks.
- FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE - In System 7. In Copland.
- FOR_SYSTEM8_COOPERATIVE - Not in System 7. In Copland, but only for cooperative tasks.
- FOR_SYSTEM8_PREEMPTIVE - Not in System 7. In Copland.
-
- FOR_OPAQUE_SYSTEM_DATA_STRUCTURES - Always true for system 8, but can be set by developer to
- true or false for System 7. When true, the contents of
- many system data structures are removed from the interfaces.
- In the future, the Mac OS will have fewer data structures
- shared between applications and the system. The problem
- with shared data is 1) the system has to poll the data
- to detect changes made by an application, 2) it prevents
- data structures from being changed in the future.
- Procedural interface will be used instead.
-
- FOR_PTR_BASED_AE - This is a temporary fix for Copland DR1. It is needed to
- distinguish between pointer based and handle based AppleEvents.
- If you are in the case of BUILDING_FOR_SYSTEM7_AND_SYSTEM8
- and want to use new pointer base AppleEvents, you will need to
- -d FOR_PTR_BASED_AE on your compiler command line.
-
- ***************************************************************************************************
- }
- {$IFC 0 }
- { extra if statement is to work around a bug in PPCAsm 1.2a2 }
- {$ELSEC}
- {$IFC NOT UNDEFINED BUILDING_FOR_SYSTEM7 }
- {$IFC UNDEFINED FOR_OPAQUE_SYSTEM_DATA_STRUCTURES }
- {$SETC FOR_OPAQUE_SYSTEM_DATA_STRUCTURES := 0 }
- {$ENDC}
- {$SETC FOR_PTR_BASED_AE := 0 }
- {$SETC FOR_SYSTEM7_ONLY := 1 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED := 1 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE := 1 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE := 1 }
- {$SETC FOR_SYSTEM8_COOPERATIVE := 0 }
- {$SETC FOR_SYSTEM8_PREEMPTIVE := 0 }
- {$ELSEC}
- {$IFC NOT UNDEFINED BUILDING_FOR_SYSTEM7_AND_SYSTEM8 }
- {$IFC UNDEFINED FOR_OPAQUE_SYSTEM_DATA_STRUCTURES }
- {$SETC FOR_OPAQUE_SYSTEM_DATA_STRUCTURES := 1 }
- {$ENDC}
- {$IFC UNDEFINED FOR_PTR_BASED_AE }
- {$SETC FOR_PTR_BASED_AE := 0 }
- {$ENDC}
- {$SETC FOR_SYSTEM7_ONLY := 0 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED := 1 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE := 1 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE := 1 }
- {$SETC FOR_SYSTEM8_COOPERATIVE := 1 }
- {$SETC FOR_SYSTEM8_PREEMPTIVE := 1 }
- {$ELSEC}
- {$IFC NOT UNDEFINED BUILDING_FOR_SYSTEM8 }
- {$SETC FOR_OPAQUE_SYSTEM_DATA_STRUCTURES := 1 }
- {$SETC FOR_PTR_BASED_AE := 1 }
- {$SETC FOR_SYSTEM7_ONLY := 0 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED := 0 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE := 1 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE := 1 }
- {$SETC FOR_SYSTEM8_COOPERATIVE := 1 }
- {$SETC FOR_SYSTEM8_PREEMPTIVE := 1 }
- {$ELSEC}
- {$IFC NOT UNDEFINED BUILDING_PREEMPTIVE_CODE }
- {$SETC FOR_OPAQUE_SYSTEM_DATA_STRUCTURES := 1 }
- {$SETC FOR_PTR_BASED_AE := 1 }
- {$SETC FOR_SYSTEM7_ONLY := 0 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED := 0 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE := 0 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE := 1 }
- {$SETC FOR_SYSTEM8_COOPERATIVE := 0 }
- {$SETC FOR_SYSTEM8_PREEMPTIVE := 1 }
- {$ELSEC}
- { default is BUILDING_FOR_SYSTEM7_AND_SYSTEM8 }
- {$SETC FOR_OPAQUE_SYSTEM_DATA_STRUCTURES := 1 }
- {$IFC UNDEFINED FOR_PTR_BASED_AE }
- {$SETC FOR_PTR_BASED_AE := 0 }
- {$ENDC}
- {$SETC FOR_SYSTEM7_ONLY := 0 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED := 1 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE := 1 }
- {$SETC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE := 1 }
- {$SETC FOR_SYSTEM8_COOPERATIVE := 1 }
- {$SETC FOR_SYSTEM8_PREEMPTIVE := 1 }
- {$ENDC}
- {$ENDC}
- {$ENDC}
- {$ENDC}
- {$ENDC}
- {
- ***************************************************************************************************
-
- OLDROUTINENAMES - "Old" names for Macintosh system calls are allowed in source code.
- (e.g. DisposPtr instead of DisposePtr). The names of system routine
- are now more sensitive to change because CFM binds by name. In the
- past, system routine names were compiled out to just an A-Trap.
- Macros have been added that each map an old name to its new name.
- This allows old routine names to be used in existing source files,
- but the macros only work if OLDROUTINENAMES is true. This support
- will be removed in the near future. Thus, all source code should
- be changed to use the new names! You can set OLDROUTINENAMES to false
- to see if your code has any old names left in it.
-
- OLDROUTINELOCATIONS - "Old" location of Macintosh system calls are used. For example, c2pstr
- has been moved from Strings to TextUtils. It is conditionalized in
- Strings with OLDROUTINELOCATIONS and in TextUtils with !OLDROUTINELOCATIONS.
- This allows developers to upgrade to newer interface files without suddenly
- all their code not compiling becuase of "incorrect" includes. But, it
- allows the slow migration of system calls to more understandable file
- locations. OLDROUTINELOCATIONS currently defaults to true, but eventually
- will default to false.
-
- ***************************************************************************************************
- }
- {$IFC UNDEFINED OLDROUTINENAMES }
- {$SETC OLDROUTINENAMES := 0 }
- {$ENDC}
- {$IFC UNDEFINED OLDROUTINELOCATIONS }
- {$SETC OLDROUTINELOCATIONS := 0 }
- {$ENDC}
- {$SETC UsingIncludes := ConditionalMacrosIncludes}
-
- {$ENDC} {__CONDITIONALMACROS__}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-