1.0.12.15: PPC/Darwin fixes
[sbcl.git] / src / runtime / ppc-darwin-os.h
1 #ifndef _PPC_DARWIN_OS_H
2 #define _PPC_DARWIN_OS_H
3
4 typedef unsigned int os_context_register_t;
5
6 static inline os_context_t *arch_os_get_context(void **void_context)
7 {
8     return (os_context_t *) *void_context;
9 }
10 /* As of XCode 3.0, the field names for the thread state have changed
11  * and now are prepended with __. Use some #define hackery to deal
12  * with this. MAC_OS_X_VERSION_10_5 seems to be a good test to see if
13  * we need the new style field names.
14  */
15 #if MAC_OS_X_VERSION_10_5
16
17 #define PPC_DARWIN_REGIFY(foo) __ ## foo
18
19 typedef ppc_thread_state_t ppc_ss_struct_t;
20
21 #else
22
23 #define PPC_DARWIN_REGIFY(foo) foo
24
25 typedef ppc_saved_state_t ppc_ss_struct_t;
26
27 #endif /* MAC_OS_X_VERSION_10_5 */
28
29 #endif /* _PPC_DARWIN_OS_H */