92 |
|
#if SIZEOF_LONG == 8 |
93 |
|
typedef unsigned long uint64; |
94 |
|
typedef long int64; |
95 |
+ |
#define VAL64(a) (a ## l) |
96 |
+ |
#define UVAL64(a) (a ## ul) |
97 |
|
#elif SIZEOF_LONG_LONG == 8 |
98 |
|
typedef unsigned long long uint64; |
99 |
|
typedef long long int64; |
100 |
+ |
#define VAL64(a) (a ## LL) |
101 |
+ |
#define UVAL64(a) (a ## uLL) |
102 |
|
#else |
103 |
|
#error "No 8 byte type, you lose." |
104 |
|
#endif |
105 |
+ |
#if SIZEOF_VOID_P == 4 |
106 |
+ |
typedef uint32 uintptr; |
107 |
+ |
typedef int32 intptr; |
108 |
+ |
#elif SIZEOF_VOID_P == 8 |
109 |
+ |
typedef uint64 uintptr; |
110 |
+ |
typedef int64 intptr; |
111 |
+ |
#else |
112 |
+ |
#error "Unsupported size of pointer" |
113 |
+ |
#endif |
114 |
|
|
115 |
|
// Time data type for Time Manager emulation |
116 |
|
#ifdef HAVE_CLOCK_GETTIME |
119 |
|
typedef struct timeval tm_time_t; |
120 |
|
#endif |
121 |
|
|
122 |
+ |
// Setup pthread attributes |
123 |
+ |
extern void Set_pthread_attr(pthread_attr_t *attr, int priority); |
124 |
+ |
|
125 |
|
// Various definitions |
126 |
|
typedef struct rgb_color { |
127 |
|
uint8 red; |
140 |
|
#define CallMacOS6(type, tvect, arg1, arg2, arg3, arg4, arg5, arg6) call_macos6((uint32)tvect, (uint32)arg1, (uint32)arg2, (uint32)arg3, (uint32)arg4, (uint32)arg5, (uint32)arg6) |
141 |
|
#define CallMacOS7(type, tvect, arg1, arg2, arg3, arg4, arg5, arg6, arg7) call_macos7((uint32)tvect, (uint32)arg1, (uint32)arg2, (uint32)arg3, (uint32)arg4, (uint32)arg5, (uint32)arg6, (uint32)arg7) |
142 |
|
|
143 |
< |
extern "C" uint32 call_macos(uint32 tvect); |
144 |
< |
extern "C" uint32 call_macos1(uint32 tvect, uint32 arg1); |
145 |
< |
extern "C" uint32 call_macos2(uint32 tvect, uint32 arg1, uint32 arg2); |
146 |
< |
extern "C" uint32 call_macos3(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3); |
147 |
< |
extern "C" uint32 call_macos4(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4); |
148 |
< |
extern "C" uint32 call_macos5(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4, uint32 arg5); |
149 |
< |
extern "C" uint32 call_macos6(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4, uint32 arg5, uint32 arg6); |
150 |
< |
extern "C" uint32 call_macos7(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4, uint32 arg5, uint32 arg6, uint32 arg7); |
143 |
> |
#ifdef __cplusplus |
144 |
> |
extern "C" { |
145 |
> |
#endif |
146 |
> |
extern uint32 call_macos(uint32 tvect); |
147 |
> |
extern uint32 call_macos1(uint32 tvect, uint32 arg1); |
148 |
> |
extern uint32 call_macos2(uint32 tvect, uint32 arg1, uint32 arg2); |
149 |
> |
extern uint32 call_macos3(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3); |
150 |
> |
extern uint32 call_macos4(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4); |
151 |
> |
extern uint32 call_macos5(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4, uint32 arg5); |
152 |
> |
extern uint32 call_macos6(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4, uint32 arg5, uint32 arg6); |
153 |
> |
extern uint32 call_macos7(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4, uint32 arg5, uint32 arg6, uint32 arg7); |
154 |
> |
#ifdef __cplusplus |
155 |
> |
} |
156 |
> |
#endif |
157 |
|
|
158 |
|
#endif |