diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-07 12:03:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-07 12:03:58 +0000 |
commit | 4549879579fb2eac72bd7e0be2330ce6b7551ff2 (patch) | |
tree | d849b16f9bde0428b3cdfed4996b05d59212666b | |
parent | 1956ca5d4b52e5174f3c541216ab1ee7141efc50 (diff) | |
download | ruby-4549879579fb2eac72bd7e0be2330ce6b7551ff2.tar.gz |
configure.in: move FIBER_USE_NATIVE conditions
* configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions
from cont.c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.in | 7 | ||||
-rw-r--r-- | cont.c | 5 | ||||
-rw-r--r-- | win32/Makefile.sub | 3 |
4 files changed, 16 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Mon Oct 7 21:03:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions + from cont.c + Mon Oct 7 20:29:31 2013 Zachary Scott <e@zzak.io> * lib/time.rb: [DOC] typo in Time.rb overview by @srt32 [Fixes GH-416] diff --git a/configure.in b/configure.in index c23f691325..03d08386a1 100644 --- a/configure.in +++ b/configure.in @@ -2355,6 +2355,13 @@ fi 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 @@ -15,9 +15,6 @@ #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 @@ * 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 diff --git a/win32/Makefile.sub b/win32/Makefile.sub index d10e82986c..519dc8cd51 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -692,6 +692,9 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub !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" |