aboutsummaryrefslogtreecommitdiffstats
path: root/signal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-13 08:59:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-13 08:59:54 +0000
commit7dc4bbc1406202a48ef31e9fb97d542ece4d5519 (patch)
treec394bbaeae508d7f974cda42a499b303d72429b3 /signal.c
parent21a40e94ac3404542c2bd83c388253ccf0fc96b0 (diff)
downloadruby-7dc4bbc1406202a48ef31e9fb97d542ece4d5519.tar.gz
configure.in: rb_cv_mcontext_t_ptr
* configure.in (rb_cv_mcontext_t_ptr): abstract whether mcontext_t is a pointer type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/signal.c b/signal.c
index dd808df2a2..fd356e2154 100644
--- a/signal.c
+++ b/signal.c
@@ -742,15 +742,14 @@ NORETURN(void ruby_thread_stack_overflow(rb_thread_t *th));
static void
check_stack_overflow(const uintptr_t addr, const ucontext_t *ctx)
{
+ const DEFINE_MCONTEXT_PTR(mctx, ctx);
# if defined __linux__
- const mcontext_t *mctx = &ctx->uc_mcontext;
# if defined REG_RSP
const greg_t sp = mctx->gregs[REG_RSP];
# else
const greg_t sp = mctx->gregs[REG_ESP];
# endif
# elif defined __APPLE__
- const mcontext_t mctx = ctx->uc_mcontext;
# if defined(__LP64__)
const uintptr_t sp = mctx->__ss.__rsp;
# else