From 18cf4d904cab1d37299a709361006d1e85ac1a53 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 15 Sep 2011 12:52:50 -0700 Subject: [PATCH] rt: Add libunwind.h support on Mac OS X --- src/rt/rust_unwind.h | 21 +++++++++++++++++++++ src/rt/rust_upcall.cpp | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/rt/rust_unwind.h diff --git a/src/rt/rust_unwind.h b/src/rt/rust_unwind.h new file mode 100644 index 00000000000..ddc44b59627 --- /dev/null +++ b/src/rt/rust_unwind.h @@ -0,0 +1,21 @@ +// Unwinding stuff missing on some architectures (Mac OS X). + +#ifndef RUST_UNWIND_H +#define RUST_UNWIND_H + +#ifdef __APPLE__ +#include + +typedef int _Unwind_Action; +typedef void _Unwind_Context; +typedef void _Unwind_Exception; +typedef int _Unwind_Reason_Code; + +#else + +#include + +#endif + +#endif + diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 0f5c11537fe..778e90df162 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -1,8 +1,8 @@ #include "rust_gc.h" #include "rust_internal.h" +#include "rust_unwind.h" #include "rust_upcall.h" #include -#include // Upcalls.