diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-01-10 08:09:01 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-01-10 08:09:01 +0000 |
commit | 74d0eaf6a22f86a60f37b439c65039fc277de0fa (patch) | |
tree | 2e03f4ded3c2e7dd345e977fa40e52efea291348 /configure.in | |
parent | 81ef4309a244b78223832895d714fcaec85ed5bf (diff) |
NORETURN
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/configure.in b/configure.in index 488615bfd6..d77a73d5f9 100644 --- a/configure.in +++ b/configure.in @@ -155,13 +155,25 @@ if test "$rb_cv_stdarg" = yes; then AC_DEFINE(HAVE_STDARG_PROTOTYPES) fi -AC_CACHE_CHECK(for gcc attribute noreturn, rb_cv_have_attr_noreturn, - [AC_TRY_COMPILE([void exit(int x) __attribute__ ((noreturn));], [], - rb_cv_have_attr_noreturn=yes, - rb_cv_have_attr_noreturn=no)]) -if test "$rb_cv_have_attr_noreturn" = yes; then - AC_DEFINE(HAVE_ATTR_NORETURN) -fi +dnl AC_CACHE_CHECK(for gcc attribute noreturn, rb_cv_have_attr_noreturn, +dnl [AC_TRY_COMPILE([void exit(int x) __attribute__ ((noreturn));], [], +dnl rb_cv_have_attr_noreturn=yes, +dnl rb_cv_have_attr_noreturn=no)]) +dnl if test "$rb_cv_have_attr_noreturn" = yes; then +dnl AC_DEFINE(HAVE_ATTR_NORETURN) +dnl fi + +AC_CACHE_CHECK([for noreturn], rb_cv_noreturn, +[rb_cv_noreturn=no +for mac in "x __attribute__ ((noreturn))" "__declspec(noreturn) x" x; do + AC_TRY_COMPILE( + [#define NORETURN(x) $mac +NORETURN(void exit(int x));], + [], + [rb_cv_noreturn="$mac"; break]) +done]) +AC_DEFINE_UNQUOTED([NORETURN(x)], $rb_cv_noreturn) + AC_MSG_CHECKING(for inline) AC_CACHE_VAL(rb_cv_inline, |