summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-25 15:06:14 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-25 15:06:14 +0000
commitfc6dd7dbc7f24ce9b1903a7228942a5da399552a (patch)
treef720fd9d8c0088ded1a84a9699469fe8e8fae0d4 /configure.in
parent6f6a076086f85942bb5eb22a4fda275a25dbe59f (diff)
merge revision(s) r45512,r45513,r45515: [Backport #9698]
configure.in: indent * configure.in (ac_cv_func___builtin_setjmp): adjust indent. * configure.in (ac_cv_func___builtin_setjmp): should not skip flags restoration in RUBY_WERROR_FLAG by `break`. [ruby-dev:48086] [Bug #9698] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@47277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in30
1 files changed, 16 insertions, 14 deletions
diff --git a/configure.in b/configure.in
index dc55f55b3a..0d9f0312db 100644
--- a/configure.in
+++ b/configure.in
@@ -2026,21 +2026,23 @@ if test x"${ac_cv_func___builtin_setjmp}" = xyes; then
unset ac_cv_func___builtin_setjmp
fi
AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp,
-[
-for cast in "" "(void *)"; do
-RUBY_WERROR_FLAG(
-[AC_TRY_LINK([@%:@include <setjmp.h>
- @%:@include <stdio.h>
- jmp_buf jb;
- void t(void) {__builtin_longjmp($cast jb, 1);}],
[
- void (*volatile f)(void) = t;
- if (!__builtin_setjmp($cast jb)) printf("%d\n", f != 0);
- ],
- [ac_cv_func___builtin_setjmp="yes with cast ($cast)"; break],
- [ac_cv_func___builtin_setjmp=no])
-])
-done])
+ ac_cv_func___builtin_setjmp=no
+ for cast in "" "(void **)"; do
+ RUBY_WERROR_FLAG(
+ [AC_TRY_LINK([@%:@include <setjmp.h>
+ @%:@include <stdio.h>
+ jmp_buf jb;
+ void t(void) {__builtin_longjmp($cast jb, 1);}
+ int jump(void) {(void)(__builtin_setjmp($cast jb) ? 1 : 0); return 0;}],
+ [
+ void (*volatile f)(void) = t;
+ if (!jump()) printf("%d\n", f != 0);
+ ],
+ [ac_cv_func___builtin_setjmp="yes with cast ($cast)"])
+ ])
+ test "$ac_cv_func___builtin_setjmp" = no || break
+ done])
# we don't use _setjmp if _longjmp doesn't exist.
test x$ac_cv_func__longjmp = xno && ac_cv_func__setjmp=no