X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fppc-darwin-os.h;h=119dcbdde449e0037dc6ddcdb9428544e8e6eb29;hb=dd54f9e004a0a83d1328e94648f48dcc27e0be5b;hp=984e932986958de9b3a7d09969aca56ed87976af;hpb=584bfdc4e1093e43e4eb328a418b012745935a29;p=sbcl.git diff --git a/src/runtime/ppc-darwin-os.h b/src/runtime/ppc-darwin-os.h index 984e932..119dcbd 100644 --- a/src/runtime/ppc-darwin-os.h +++ b/src/runtime/ppc-darwin-os.h @@ -1,12 +1,30 @@ #ifndef _PPC_DARWIN_OS_H #define _PPC_DARWIN_OS_H +#include "darwin-os.h" + typedef unsigned int os_context_register_t; static inline os_context_t *arch_os_get_context(void **void_context) { return (os_context_t *) *void_context; } +/* On OS X 10.5, the field names for the thread state have changed and + * now are prepended with __. Use some #define hackery to deal with + * this. + */ +#if __DARWIN_UNIX03 + +#define PPC_DARWIN_REGIFY(foo) __ ## foo + +typedef ppc_thread_state_t ppc_ss_struct_t; + +#else + +#define PPC_DARWIN_REGIFY(foo) foo + +typedef ppc_saved_state_t ppc_ss_struct_t; + +#endif /* __DARWIN_UNIX03 */ -#define DARWIN_FIX_CONTEXT(c) (c->uc_mcontext->ss.xer)^=0x80; #endif /* _PPC_DARWIN_OS_H */