diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2011-09-15 19:38:30 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-09-15 19:38:30 +0400 |
commit | 333f2e13d5d8c0c1129de13cb822db4f559b313d (patch) | |
tree | 2e132749bb34e79727d24636c25e9103e0c16430 /mach_dep.c | |
parent | 735249e9bb2b3980e60f62b6fe26f8ad87a8eb51 (diff) | |
download | bdwgc-333f2e13d5d8c0c1129de13cb822db4f559b313d.tar.gz |
Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6.
* include/private/gc_priv.h (DARWIN): Include AvailabilityMacros.h
(unless MAC_OS_X_VERSION_MAX_ALLOWED already defined).
* mach_dep.c (GC_with_callee_saves_pushed): Include sys/ucontext.h
(instead of ucontext.h) if Mac OS X 10.6 or higher.
Diffstat (limited to 'mach_dep.c')
-rw-r--r-- | mach_dep.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -174,7 +174,12 @@ asm static void PushMacRegisters() #if !defined(HAVE_PUSH_REGS) && defined(UNIX_LIKE) # include <signal.h> # ifndef NO_GETCONTEXT -# include <ucontext.h> +# if defined(DARWIN) \ + && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 /*MAC_OS_X_VERSION_10_6*/) +# include <sys/ucontext.h> +# else +# include <ucontext.h> +# endif /* !DARWIN */ # ifdef GETCONTEXT_FPU_EXCMASK_BUG # include <fenv.h> # endif |