ruby-changes:31102
From: nobu <ko1@a...>
Date: Mon, 7 Oct 2013 22:45:39 +0900 (JST)
Subject: [ruby-changes:31102] nobu:r43181 (trunk): cont.c: split conditions
nobu 2013-10-07 22:45:31 +0900 (Mon, 07 Oct 2013) New Revision: 43181 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43181 Log: cont.c: split conditions * cont.c (FIBER_USE_NATIVE): split long conditions. Modified files: trunk/ChangeLog trunk/configure.in trunk/cont.c trunk/win32/Makefile.sub Index: configure.in =================================================================== --- configure.in (revision 43180) +++ configure.in (revision 43181) @@ -2352,23 +2352,11 @@ if test x"$enable_pthread" = xyes; then https://github.com/ruby/ruby/blob/trunk/configure.in#L2352 AC_CHECK_FUNCS(pthread_attr_init) fi fi -FIBER_USE_NATIVE=0 if test x"$ac_cv_header_ucontext_h" = xyes; then if test x"$rb_with_pthread" = xyes; then AC_CHECK_FUNCS(getcontext setcontext) - if test x"$ac_cv_func_getcontext" = xyes -a x"$ac_cv_func_setcontext" = xyes; then - AS_CASE("$target_cpu-$target_os", - [*-netbsd*], [], - [ia64-*], [], # r38766 - [*-sunos*|*-solaris*], [], # r32408 - [FIBER_USE_NATIVE=1]) - fi fi -else - AS_CASE("$target_os", [mingw*|mswin*], - [test "[$[with_winnt_ver]]" -ge [$[0x0400]] && FIBER_USE_NATIVE=1]) fi -AC_DEFINE(FIBER_USE_NATIVE) if test "$ac_cv_func_fork" = "yes" -a "$rb_with_pthread" = "yes"; then AC_CACHE_CHECK([if fork works with pthread], rb_cv_fork_with_pthread, Index: ChangeLog =================================================================== --- ChangeLog (revision 43180) +++ ChangeLog (revision 43181) @@ -1,7 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 -Mon Oct 7 21:03:54 2013 Nobuyoshi Nakada <nobu@r...> +Mon Oct 7 22:45:20 2013 Nobuyoshi Nakada <nobu@r...> - * configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions - from cont.c + * cont.c (FIBER_USE_NATIVE): split long conditions. Mon Oct 7 20:29:31 2013 Zachary Scott <e@z...> Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 43180) +++ win32/Makefile.sub (revision 43181) @@ -692,9 +692,6 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/ https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L692 !if "$(MACHINE)" == "x86" || "$(ARCH)" == "x64" || "$(ARCH)" == "ia64" #define STACK_GROW_DIRECTION -1 !endif -!if "$(ARCH)" != "ia64" && NTVER >= 0x0400 # r27646 -#define FIBER_USE_NATIVE 1 -!endif #define CANONICALIZATION_FOR_MATHN 1 #define DEFAULT_KCODE KCODE_NONE !if "$(ENABLE_DEBUG_ENV)" == "yes" Index: cont.c =================================================================== --- cont.c (revision 43180) +++ cont.c (revision 43181) @@ -15,6 +15,20 @@ https://github.com/ruby/ruby/blob/trunk/cont.c#L15 #include "gc.h" #include "eval_intern.h" +#if !defined(FIBER_USE_NATIVE) +# if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT) +# if defined(__NetBSD__) +# elif defined(__sun) +# elif defined(__ia64) +# else +# define FIBER_USE_NATIVE 1 +# endif +# elif defined(_WIN32) +# if _WIN32_WINNT >= 0x0400 +# define FIBER_USE_NATIVE 1 +# endif +# endif + /* FIBER_USE_NATIVE enables Fiber performance improvement using system * dependent method such as make/setcontext on POSIX system or * CreateFiber() API on Windows. @@ -31,6 +45,7 @@ https://github.com/ruby/ruby/blob/trunk/cont.c#L45 * are represented by stack pointer (higher bits of stack pointer). * TODO: check such constraint on configure. */ +#endif #if !defined(FIBER_USE_NATIVE) #define FIBER_USE_NATIVE 0 #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/