summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-07 13:45:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-07 13:45:31 +0000
commit3bb86ae462ab411471f6f24d2cc967e0e9acdc84 (patch)
treed67e5ab687caf20e4745db155cfa1147a0ddf469 /cont.c
parent9e3eb502122cbc6433a50fc5b874ac759e0c5208 (diff)
cont.c: split conditions
* cont.c (FIBER_USE_NATIVE): split long conditions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/cont.c b/cont.c
index 75fa3d5..d09b21b 100644
--- a/cont.c
+++ b/cont.c
@@ -15,6 +15,20 @@
#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 @@
* 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