]> git.saurik.com Git - wxWidgets.git/blob - src/mac/morefile/Optim.h
Changed code to use the RM environment variable (if one exists) to delete files....
[wxWidgets.git] / src / mac / morefile / Optim.h
1 /*
2 ** Apple Macintosh Developer Technical Support
3 **
4 ** DirectoryCopy: #defines that let you make MoreFiles code more efficient.
5 **
6 ** by Jim Luther, Apple Developer Technical Support Emeritus
7 **
8 ** File: Optimization.h
9 **
10 ** Copyright © 1992-1998 Apple Computer, Inc.
11 ** All rights reserved.
12 **
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.
20 **
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.
24 **
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:
30 **
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
34 **
35 ** By default, all compatibility code is ON.
36 **
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
43 ** programs).
44 **
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.
49 **
50 ** Original changes supplied by Fabrizio Oddone
51 **
52 ** File: Optimization.h
53 */
54
55 #if TARGET_CARBON
56
57 #define __MACOSSEVENFIVEONEORLATER 1
58
59 #define __MACOSSEVENORLATER 1
60
61 #ifndef __WANTPASCALELIMINATION
62 #define __WANTPASCALELIMINATION 0
63 #endif
64
65 #if __WANTPASCALELIMINATION
66 #define pascal
67 #endif
68
69
70 #ifndef __USEPRAGMAINTERNAL
71 #define __USEPRAGMAINTERNAL 0
72 #endif
73
74 #if __USEPRAGMAINTERNAL
75 #if defined(__MWERKS__)
76 #pragma internal on
77 #endif
78 #endif
79 #else
80
81 // we have a basic requirements of 7.5.3 Rev 2 or 7.6
82
83 #define __MACOSSEVENFIVEONEORLATER 1
84
85 #ifndef __MACOSSEVENFIVEONEORLATER
86 #define __MACOSSEVENFIVEONEORLATER 0
87 #endif
88
89 #ifndef __MACOSSEVENFIVEORLATER
90 #define __MACOSSEVENFIVEORLATER __MACOSSEVENFIVEONEORLATER
91 #endif
92
93 #ifndef __MACOSSEVENORLATER
94 #if GENERATINGCFM
95 #define __MACOSSEVENORLATER 1
96 #else
97 #define __MACOSSEVENORLATER __MACOSSEVENFIVEORLATER
98 #endif
99 #endif
100
101
102 #ifndef __WANTPASCALELIMINATION
103 #define __WANTPASCALELIMINATION 0
104 #endif
105
106 #if __WANTPASCALELIMINATION
107 #define pascal
108 #endif
109
110
111 #ifndef __USEPRAGMAINTERNAL
112 #define __USEPRAGMAINTERNAL 0
113 #endif
114
115 #if __USEPRAGMAINTERNAL
116 #if defined(__MWERKS__)
117 #pragma internal on
118 #endif
119 #endif
120 #endif