]> git.saurik.com Git - wxWidgets.git/blob - src/mac/morefile/Optim.h
added wxUSE_DEBUG_NEW_ALWAYS to --enable-mem_tracing (quite useless otherwise)
[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
56 #ifndef __MACOSSEVENFIVEONEORLATER
57 #define __MACOSSEVENFIVEONEORLATER 0
58 #endif
59
60 #ifndef __MACOSSEVENFIVEORLATER
61 #define __MACOSSEVENFIVEORLATER __MACOSSEVENFIVEONEORLATER
62 #endif
63
64 #ifndef __MACOSSEVENORLATER
65 #if GENERATINGCFM
66 #define __MACOSSEVENORLATER 1
67 #else
68 #define __MACOSSEVENORLATER __MACOSSEVENFIVEORLATER
69 #endif
70 #endif
71
72
73 #ifndef __WANTPASCALELIMINATION
74 #define __WANTPASCALELIMINATION 0
75 #endif
76
77 #if __WANTPASCALELIMINATION
78 #define pascal
79 #endif
80
81
82 #ifndef __USEPRAGMAINTERNAL
83 #define __USEPRAGMAINTERNAL 0
84 #endif
85
86 #if __USEPRAGMAINTERNAL
87 #if defined(__MWERKS__)
88 #pragma internal on
89 #endif
90 #endif
91