Mac OS 9
CGBase.h
Go to the documentation of this file.
1 
19 #ifndef __CGBASE__
20 #define __CGBASE__
21 
22 #ifndef __CONDITIONALMACROS__
23 #include <ConditionalMacros.h>
24 #endif
25 
26 #include <stddef.h>
27 #if __MWERKS__ > 0x2300
28 #include <stdint.h>
29 #endif
30 
31 #if PRAGMA_ONCE
32 #pragma once
33 #endif
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 #if PRAGMA_IMPORT
40 #pragma import on
41 #endif
42 
43 #if PRAGMA_STRUCT_ALIGN
44 #pragma options align = mac68k
45 #elif PRAGMA_STRUCT_PACKPUSH
46 #pragma pack(push, 2)
47 #elif PRAGMA_STRUCT_PACK
48 #pragma pack(2)
49 #endif
50 
51 /* if stdint.h has been included, don't define same types */
52 #if __MWERKS__ <= 0x2300
53 typedef signed long int32_t;
54 #endif
55 /* define some unix types used by CoreGraphics */
56 #ifndef _MACH_PPC_BOOLEAN_H_
57 typedef int boolean_t;
58 #endif
59 #ifndef _STDINT_H_
60 typedef unsigned char u_int8_t;
61 typedef unsigned short u_int16_t;
62 typedef unsigned long u_int32_t;
63 #endif
64 
65 #if !defined(CG_INLINE)
66 #if defined(__GNUC__)
67 #define CG_INLINE static __inline__
68 #elif defined(__MWERKS__)
69 #define CG_INLINE static inline
70 #else
71 #define CG_INLINE static
72 #endif
73 #endif
74 
75 #if PRAGMA_STRUCT_ALIGN
76 #pragma options align = reset
77 #elif PRAGMA_STRUCT_PACKPUSH
78 #pragma pack(pop)
79 #elif PRAGMA_STRUCT_PACK
80 #pragma pack()
81 #endif
82 
83 #ifdef PRAGMA_IMPORT_OFF
84 #pragma import off
85 #elif PRAGMA_IMPORT
86 #pragma import reset
87 #endif
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif /* __CGBASE__ */
Set up for compiler independent conditionals.