summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2019-09-19 00:04:29 -0700
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-21 13:24:58 +0900
commite006b992c29decb01865b0749e35a4cfc872bdaf (patch)
treee17f2049abd0a273ea9dc6980b9968f86bbda42e /tool
parent27144de2bd95c5886c3d4400c3b8aea932b856f1 (diff)
typedef rb_jmpbuf_t to void *[5] if __builtin_setjmp is used
The built-in version operates on a buffer of 5 words, much smaller than the size of jmp_buf defined in libc. Note, powerpc requires 5 words, while arm and x86_64 just require 3.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2471
Diffstat (limited to 'tool')
-rw-r--r--tool/m4/ruby_setjmp_type.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/m4/ruby_setjmp_type.m4 b/tool/m4/ruby_setjmp_type.m4
index e054a544c5..9da9a88680 100644
--- a/tool/m4/ruby_setjmp_type.m4
+++ b/tool/m4/ruby_setjmp_type.m4
@@ -47,6 +47,6 @@ AS_IF([test x$setjmp_prefix:$setjmp_sigmask = xsig:], [
AC_MSG_RESULT(${setjmp_prefix}setjmp${setjmp_suffix}${setjmp_cast:+\($setjmp_cast\)}${setjmp_sigmask})
AC_DEFINE_UNQUOTED([RUBY_SETJMP(env)], [${setjmp_prefix}setjmp${setjmp_suffix}($setjmp_cast(env)${setjmp_sigmask})])
AC_DEFINE_UNQUOTED([RUBY_LONGJMP(env,val)], [${setjmp_prefix}longjmp($setjmp_cast(env),val)])
-AC_DEFINE_UNQUOTED(RUBY_JMP_BUF, ${setjmp_sigmask+${setjmp_prefix}}jmp_buf)
+AS_IF([test x$setjmp_prefix != x__builtin_], AC_DEFINE_UNQUOTED(RUBY_JMP_BUF, ${setjmp_sigmask+${setjmp_prefix}}jmp_buf))
AS_IF([test x$setjmp_suffix = xex], [AC_DEFINE_UNQUOTED(RUBY_USE_SETJMPEX, 1)])
])dnl