]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/morefile/Optim.h
2 ** Apple Macintosh Developer Technical Support
4 ** DirectoryCopy: #defines that let you make MoreFiles code more efficient.
6 ** by Jim Luther, Apple Developer Technical Support Emeritus
8 ** File: Optimization.h
10 ** Copyright © 1992-1998 Apple Computer, Inc.
11 ** All rights reserved.
13 ** You may incorporate this sample code into your applications without
14 ** restriction, though the sample code has been provided "AS IS" and the
15 ** responsibility for its operation is 100% yours. However, what you are
16 ** not permitted to do is to redistribute the source as "DSC Sample Code"
17 ** after having made changes. If you're going to re-distribute the source,
18 ** we require that you make it clear in the source that the code was
19 ** descended from Apple Sample Code, but that you've made changes.
21 ** The Optimization changes to MoreFiles source and header files, along with
22 ** this file and OptimizationEnd.h, let you optimize the code produced
23 ** by MoreFiles in several ways.
25 ** 1 -- MoreFiles contains extra code so that many routines can run under
26 ** Mac OS systems back to System 6. If your program requires a specific
27 ** version of Mac OS and your program checks for that version before
28 ** calling MoreFiles routines, then you can remove a lot of compatibility
29 ** code by defining one of the following to 1:
31 ** __MACOSSEVENFIVEONEORLATER // assume Mac OS 7.5.1 or later
32 ** __MACOSSEVENFIVEORLATER // assume Mac OS 7.5 or later
33 ** __MACOSSEVENORLATER // assume Mac OS 7.0 or later
35 ** By default, all compatibility code is ON.
37 ** 2 -- You may disable Pascal calling conventions in all MoreFiles routines
38 ** except for system callbacks that require Pascal calling conventions.
39 ** This will make C programs both smaller and faster.
40 ** Just define __WANTPASCALELIMINATION to be 1 to turn this optimization on
41 ** when building MoreFiles for use from C programs (you'll need to keep
42 ** Pascal calling conventions when linking MoreFiles routines with Pascal
45 ** 3 -- If Metrowerks compiler is used, "#pragma internal on" may help produce
46 ** better code. However, this option can also cause problems if you're
47 ** trying to build MoreFiles as a shared library, so it is by default not used.
48 ** Just define __USEPRAGMAINTERNAL to be 1 to turn this optimization on.
50 ** Original changes supplied by Fabrizio Oddone
52 ** File: Optimization.h
57 #define __MACOSSEVENFIVEONEORLATER 1
59 #define __MACOSSEVENORLATER 1
61 #ifndef __WANTPASCALELIMINATION
62 #define __WANTPASCALELIMINATION 0
65 #if __WANTPASCALELIMINATION
70 #ifndef __USEPRAGMAINTERNAL
71 #define __USEPRAGMAINTERNAL 0
74 #if __USEPRAGMAINTERNAL
75 #if defined(__MWERKS__)
81 // we have a basic requirements of 7.5.3 Rev 2 or 7.6
83 #define __MACOSSEVENFIVEONEORLATER 1
85 #ifndef __MACOSSEVENFIVEONEORLATER
86 #define __MACOSSEVENFIVEONEORLATER 0
89 #ifndef __MACOSSEVENFIVEORLATER
90 #define __MACOSSEVENFIVEORLATER __MACOSSEVENFIVEONEORLATER
93 #ifndef __MACOSSEVENORLATER
95 #define __MACOSSEVENORLATER 1
97 #define __MACOSSEVENORLATER __MACOSSEVENFIVEORLATER
102 #ifndef __WANTPASCALELIMINATION
103 #define __WANTPASCALELIMINATION 0
106 #if __WANTPASCALELIMINATION
111 #ifndef __USEPRAGMAINTERNAL
112 #define __USEPRAGMAINTERNAL 0
115 #if __USEPRAGMAINTERNAL
116 #if defined(__MWERKS__)