0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-29 10:05:55 +01:00

auto merge of #5646 : Aatch/rust/unwind-fix, r=brson

This fixes issue #5641
This commit is contained in:
bors 2013-04-28 15:36:35 -07:00
commit 9f03d45c56
2 changed files with 7 additions and 41 deletions

View File

@ -1,40 +0,0 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// 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__)
#ifndef __FreeBSD__
typedef int _Unwind_Action;
typedef void _Unwind_Exception;
#endif
#endif
#endif

View File

@ -19,10 +19,16 @@
#include "rust_globals.h"
#include "rust_task.h"
#include "rust_sched_loop.h"
#include "rust_unwind.h"
#include "rust_upcall.h"
#include "rust_util.h"
//Unwinding ABI declarations.
typedef int _Unwind_Reason_Code;
typedef int _Unwind_Action;
struct _Unwind_Context;
struct _Unwind_Exception;
#ifdef __GNUC__
#define LOG_UPCALL_ENTRY(task) \
LOG(task, upcall, \