ruby-changes:16421
From: kosaki <ko1@a...>
Date: Wed, 23 Jun 2010 21:48:48 +0900 (JST)
Subject: [ruby-changes:16421] Ruby:r28404 (ruby_1_8): * configure.in: avoid getcontext() overhead if possible.
kosaki 2010-06-23 21:48:31 +0900 (Wed, 23 Jun 2010) New Revision: 28404 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28404 Log: * configure.in: avoid getcontext() overhead if possible. [ruby-core:27380][Bug #2553] Thanks, Joe Damato, Dan Peterson and Patrick Mohr. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/configure.in Index: ruby_1_8/configure.in =================================================================== --- ruby_1_8/configure.in (revision 28403) +++ ruby_1_8/configure.in (revision 28404) @@ -587,7 +587,7 @@ fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\ syscall.h pwd.h grp.h a.out.h utime.h memory.h direct.h sys/resource.h \ sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h \ - ucontext.h intrinsics.h time.h) + intrinsics.h time.h) dnl Check additional types. AC_CHECK_SIZEOF(rlim_t, 0, [ @@ -1146,8 +1146,22 @@ fi fi fi -if test x"$ac_cv_header_ucontext_h" = xyes; then - if test x"$rb_with_pthread" = xyes; then + +use_context=no +if test x"$rb_with_pthread" = xyes; then + AS_CASE("$target_cpu:$target_os:$cross_compiling", + [*:linux*:no], [ + if test -n "`(/lib/libc.so.6 2>/dev/null | fgrep 'Native POSIX Threads') 2> /dev/null`"; then + use_context=yes + fi + ], + [sparc*], [ + use_context=yes + ]) +fi +if test x"$use_context" = xyes; then + AC_CHECK_HEADERS(ucontext.h) + if test x"$ac_cv_header_ucontext_h" = xyes; then AC_CHECK_FUNCS(getcontext setcontext) fi fi Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 28403) +++ ruby_1_8/ChangeLog (revision 28404) @@ -1,3 +1,9 @@ +Wed Jun 23 21:36:45 2010 Nobuyoshi Nakada <nobu@r...> + + * configure.in: avoid getcontext() overhead if possible. + [ruby-core:27380][Bug #2553] + Thanks, Joe Damato, Dan Peterson and Patrick Mohr. + Tue Jun 22 21:33:23 2010 Nobuyoshi Nakada <nobu@r...> * test/optparse/test_summary.rb: fixed superclass so that it run -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/