]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/morefile/Optimization.h
   4         Contains:       Defines that let you make MoreFiles code more efficient. 
   8         Copyright:      © 1992-2001 by Apple Computer, Inc., all rights reserved. 
  10         You may incorporate this sample code into your applications without 
  11         restriction, though the sample code has been provided "AS IS" and the 
  12         responsibility for its operation is 100% yours.  However, what you are 
  13         not permitted to do is to redistribute the source as "DSC Sample Code" 
  14         after having made changes. If you're going to re-distribute the source, 
  15         we require that you make it clear in the source that the code was 
  16         descended from Apple Sample Code, but that you've made changes. 
  20                 DRI:                            Apple Macintosh Developer Technical Support 
  22                 Other Contact:          Apple Macintosh Developer Technical Support 
  23                                                         <http://developer.apple.com/bugreporter/> 
  25                 Technology:                     DTS Sample Code 
  31         Change History (most recent first): 
  33                  <1>      2/7/01        JL              first checked in 
  37         The Optimization changes to MoreFiles source and header files, along with 
  38         this file and OptimizationEnd.h, let you optimize the code produced 
  39         by MoreFiles in several ways. 
  41         1 -- MoreFiles contains extra code so that many routines can run under 
  42         Mac OS systems back to System 6. If your program requires a specific 
  43         version of Mac OS and your program checks for that version before 
  44         calling MoreFiles routines, then you can remove a lot of compatibility 
  45         code by defining one of the following to 1: 
  47                 __MACOSSEVENFIVEONEORLATER      // assume Mac OS 7.5.1 or later 
  48                 __MACOSSEVENFIVEORLATER         // assume Mac OS 7.5 or later 
  49                 __MACOSSEVENORLATER                     // assume Mac OS 7.0 or later 
  51         If you're compiling 68K code, the default is to include all compatibility code. 
  52         If you're compiling PowerPC code (TARGET_RT_MAC_CFM), the default is __MACOSSEVENORLATER 
  53         If you're compiling for Carbon code (TARGET_API_MAC_CARBON), the default is __MACOSSEVENFIVEONEORLATER 
  55         2 -- You may disable Pascal calling conventions in all MoreFiles routines 
  56         except for system callbacks that require Pascal calling conventions. 
  57         This will make 68K C programs both smaller and faster.  
  58         (PowerPC compilers ignore pascal calling conventions.) 
  59         Just define __WANTPASCALELIMINATION to be 1 to turn this optimization on 
  60         when building MoreFiles for use from C programs (you'll need to keep 
  61         Pascal calling conventions when linking MoreFiles routines with Pascal 
  64         3 -- If Metrowerks compiler is used, "#pragma internal on" may help produce 
  65         better code. However, this option can also cause problems if you're 
  66         trying to build MoreFiles as a shared library, so it is by default not used. 
  67         Just define __USEPRAGMAINTERNAL to be 1 to turn this optimization on. 
  69         Original changes supplied by Fabrizio Oddone 
  72 #include <ConditionalMacros.h> 
  74 // if we're compiling for Carbon, then we're running on Mac OS 8.1 or later 
  75 #ifndef __MACOSSEVENFIVEONEORLATER 
  76         #define __MACOSSEVENFIVEONEORLATER TARGET_API_MAC_CARBON 
  79 #ifndef __MACOSSEVENFIVEORLATER 
  80         #define __MACOSSEVENFIVEORLATER __MACOSSEVENFIVEONEORLATER 
  83 #ifndef __MACOSSEVENORLATER 
  85                 #define __MACOSSEVENORLATER 1 
  87                 #define __MACOSSEVENORLATER __MACOSSEVENFIVEORLATER 
  92 #ifndef __WANTPASCALELIMINATION 
  93         #define __WANTPASCALELIMINATION 0 
  96 #if     __WANTPASCALELIMINATION 
 101 #ifndef __USEPRAGMAINTERNAL 
 102         #define __USEPRAGMAINTERNAL     0 
 105 #if     __USEPRAGMAINTERNAL 
 106         #if defined(__MWERKS__)