rt: Add libunwind.h support on Mac OS X

This commit is contained in:
Patrick Walton 2011-09-15 12:52:50 -07:00
parent d1c27ba9e0
commit 18cf4d904c
2 changed files with 22 additions and 1 deletions

21
src/rt/rust_unwind.h Normal file
View File

@ -0,0 +1,21 @@
// Unwinding stuff missing on some architectures (Mac OS X).
#ifndef RUST_UNWIND_H
#define RUST_UNWIND_H
#ifdef __APPLE__
#include <libunwind.h>
typedef int _Unwind_Action;
typedef void _Unwind_Context;
typedef void _Unwind_Exception;
typedef int _Unwind_Reason_Code;
#else
#include <unwind.h>
#endif
#endif

View File

@ -1,8 +1,8 @@
#include "rust_gc.h"
#include "rust_internal.h"
#include "rust_unwind.h"
#include "rust_upcall.h"
#include <stdint.h>
#include <unwind.h>
// Upcalls.