ruby-changes:31100
From: nobu <ko1@a...>
Date: Mon, 7 Oct 2013 21:04:06 +0900 (JST)
Subject: [ruby-changes:31100] nobu:r43179 (trunk): configure.in: move FIBER_USE_NATIVE conditions
nobu 2013-10-07 21:03:58 +0900 (Mon, 07 Oct 2013) New Revision: 43179 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43179 Log: configure.in: move FIBER_USE_NATIVE conditions * configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions from cont.c Modified files: trunk/ChangeLog trunk/configure.in trunk/cont.c trunk/win32/Makefile.sub Index: configure.in =================================================================== --- configure.in (revision 43178) +++ configure.in (revision 43179) @@ -2355,6 +2355,13 @@ fi https://github.com/ruby/ruby/blob/trunk/configure.in#L2355 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 + [AC_DEFINE(FIBER_USE_NATIVE, 1)]) + fi fi fi Index: ChangeLog =================================================================== --- ChangeLog (revision 43178) +++ ChangeLog (revision 43179) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Oct 7 21:03:54 2013 Nobuyoshi Nakada <nobu@r...> + + * configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions + from cont.c + Mon Oct 7 20:29:31 2013 Zachary Scott <e@z...> * lib/time.rb: [DOC] typo in Time.rb overview by @srt32 [Fixes GH-416] Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 43178) +++ win32/Makefile.sub (revision 43179) @@ -692,6 +692,9 @@ $(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 43178) +++ cont.c (revision 43179) @@ -15,9 +15,6 @@ https://github.com/ruby/ruby/blob/trunk/cont.c#L15 #include "gc.h" #include "eval_intern.h" -#if ((defined(_WIN32) && _WIN32_WINNT >= 0x0400) || (defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT))) && !defined(__NetBSD__) && !defined(__sun) && !defined(__ia64) && !defined(FIBER_USE_NATIVE) -#define FIBER_USE_NATIVE 1 - /* FIBER_USE_NATIVE enables Fiber performance improvement using system * dependent method such as make/setcontext on POSIX system or * CreateFiber() API on Windows. @@ -34,7 +31,7 @@ https://github.com/ruby/ruby/blob/trunk/cont.c#L31 * are represented by stack pointer (higher bits of stack pointer). * TODO: check such constraint on configure. */ -#elif !defined(FIBER_USE_NATIVE) +#if !defined(FIBER_USE_NATIVE) #define FIBER_USE_NATIVE 0 #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/