ruby-changes:28761
From: nobu <ko1@a...>
Date: Sat, 18 May 2013 23:58:09 +0900 (JST)
Subject: [ruby-changes:28761] nobu:r40813 (trunk): configure.in: setjmpex
nobu 2013-05-18 23:57:59 +0900 (Sat, 18 May 2013) New Revision: 40813 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40813 Log: configure.in: setjmpex * configure.in (setjmp-type): use setjmpex() on w64-mingw32 to get rid of -Wclobbered warnings. * include/ruby/defines.h: include setjmpex.h here becase setjmp.h is included from win32.h via intrin.h, winnt.h, and so on. Modified files: trunk/ChangeLog trunk/configure.in trunk/include/ruby/defines.h Index: include/ruby/defines.h =================================================================== --- include/ruby/defines.h (revision 40812) +++ include/ruby/defines.h (revision 40813) @@ -61,6 +61,10 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/defines.h#L61 # include <sys/select.h> #endif +#ifdef HAVE_SETJMPEX_H +#include <setjmpex.h> +#endif + #define RUBY #ifdef __cplusplus Index: configure.in =================================================================== --- configure.in (revision 40812) +++ configure.in (revision 40813) @@ -1028,6 +1028,7 @@ AC_CHECK_HEADERS( \ https://github.com/ruby/ruby/blob/trunk/configure.in#L1028 process.h \ sys/prctl.h \ atomic.h \ + setjmpex.h ) dnl check for large file stuff @@ -1856,36 +1857,45 @@ AC_CACHE_CHECK(for __builtin_setjmp, ac_ https://github.com/ruby/ruby/blob/trunk/configure.in#L1857 test x$ac_cv_func__longjmp = xno && ac_cv_func__setjmp=no AC_MSG_CHECKING(for setjmp type) +setjmp_suffix= AC_ARG_WITH(setjmp-type, AS_HELP_STRING([--with-setjmp-type], [select setjmp type]), [ AS_CASE([$withval], - [__builtin_setjmp], [ setjmp_prefix=__builtin_], + [__builtin_setjmp], [setjmp=__builtin_setjmp], [_setjmp], [ setjmp_prefix=_], [sigsetjmp], [ setjmp_prefix=sig], [setjmp], [ setjmp_prefix=], + [setjmpex], [ setjmp_prefix= setjmp_suffix=ex], [''], [ unset setjmp_prefix], [ AC_MSG_ERROR(invalid setjmp type: $withval)])], [unset setjmp_prefix]) if test ${setjmp_prefix+set}; then - if test "${setjmp_prefix}" && eval test '$ac_cv_func_'${setjmp_prefix}setjmp = no; then - AC_MSG_ERROR(${setjmp_prefix}setjmp is not available) + if test "${setjmp_prefix}" && eval test '$ac_cv_func_'${setjmp_prefix}setjmp${setjmp_suffix} = no; then + AC_MSG_ERROR(${setjmp_prefix}setjmp${setjmp_suffix} is not available) fi elif test "$ac_cv_func___builtin_setjmp" = yes; then setjmp_prefix=__builtin_ + setjmp_suffix= +elif test "$ac_cv_header_setjmpex_h" = yes; then + setjmp_prefix= + setjmp_suffix=ex elif test "$ac_cv_func__setjmp" = yes; then setjmp_prefix=_ + setjmp_suffix= elif test "$ac_cv_func_sigsetjmp" = yes; then AS_CASE([$target_os],[solaris*|cygwin*],[setjmp_prefix=],[setjmp_prefix=sig]) + setjmp_suffix= else setjmp_prefix= + setjmp_suffix= fi if test x$setjmp_prefix = xsig; then setjmp_sigmask=yes else unset setjmp_sigmask fi -AC_MSG_RESULT(${setjmp_prefix}setjmp) -AC_DEFINE_UNQUOTED([RUBY_SETJMP(env)], [${setjmp_prefix}setjmp(env${setjmp_sigmask+,0})]) +AC_MSG_RESULT(${setjmp_prefix}setjmp${setjmp_suffix}) +AC_DEFINE_UNQUOTED([RUBY_SETJMP(env)], [${setjmp_prefix}setjmp${setjmp_suffix}(env${setjmp_sigmask+,0})]) AC_DEFINE_UNQUOTED([RUBY_LONGJMP(env,val)], [${setjmp_prefix}longjmp(env,val)]) AC_DEFINE_UNQUOTED(RUBY_JMP_BUF, ${setjmp_sigmask+${setjmp_prefix}}jmp_buf) # End of setjmp check. Index: ChangeLog =================================================================== --- ChangeLog (revision 40812) +++ ChangeLog (revision 40813) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat May 18 23:57:46 2013 Nobuyoshi Nakada <nobu@r...> + + * configure.in (setjmp-type): use setjmpex() on w64-mingw32 to get rid + of -Wclobbered warnings. + + * include/ruby/defines.h: include setjmpex.h here becase setjmp.h is + included from win32.h via intrin.h, winnt.h, and so on. + Sat May 18 20:28:12 2013 Tanaka Akira <akr@f...> * ext/socket/mkconstants.rb (INTEGER2NUM): Make less comparisons. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/