From 72bbf60f3a6b87a36bebc6b10ae867d8bcb9cadd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Thu, 30 Jan 2020 17:49:51 +0900 Subject: do not assume GCC for __builtin_setjmp Namely recent Sun C compiler has this function, and is not a GCC. Meanwhile the code without RUBY_JMP_BUF assumes GCC. We have to define the macro when we detect __builtin_setjmp for non-GCC compilers. --- tool/m4/ruby_setjmp_type.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tool/m4') diff --git a/tool/m4/ruby_setjmp_type.m4 b/tool/m4/ruby_setjmp_type.m4 index 9da9a88680..29893543a4 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)]) -AS_IF([test x$setjmp_prefix != x__builtin_], AC_DEFINE_UNQUOTED(RUBY_JMP_BUF, ${setjmp_sigmask+${setjmp_prefix}}jmp_buf)) +AS_IF([test "(" "$GCC" != yes ")" -o 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 -- cgit v1.2.1