summary refs log tree commit diff
path: root/src/rt/rust_unwind.h
blob: 2a7e559d189d366f93fa0cb262666bad233aa543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Unwinding stuff missing on some architectures (Mac OS X).

#ifndef RUST_UNWIND_H
#define RUST_UNWIND_H

#ifdef __APPLE__
#include <libunwind.h>

typedef void _Unwind_Context;
typedef int _Unwind_Reason_Code;

#else

#include <unwind.h>

#endif

#if (defined __APPLE__) || (defined __clang__)

typedef int _Unwind_Action;
typedef void _Unwind_Exception;

#endif

#endif