summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-31 17:58:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-31 17:58:41 +0000
commitb39676f6a9b699f204d4313ae5589b71d436d4e5 (patch)
treec4ae86bd8774ee11d9b4104ad35d39da92a4d442 /eval_intern.h
parent29b538fa7146f899775b001a55bf1716c486b293 (diff)
* configure.in (RUBY_SETJMP, RUBY_LONGJMP, RUBY_JMP_BUF): prefers
__builtin_setjmp, _setjmp over setjmp and sigsetjmp. [ruby-core:16023], [ruby-core:16086] * configure.in (--with-setjmp-type): new option to override the default rule in the above. * eval_intern.h (ruby_setjmp, ruby_longjmp), gc.c (rb_setjmp), vm_core.h (rb_jmpbuf_t): use RUBY_SETJMP, RUBY_LONGJMP and RUBY_JMP_BUF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/eval_intern.h b/eval_intern.h
index 52d2969..8296ee0 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -81,12 +81,10 @@ char *strrchr(const char *, const char);
#include "vmsruby_private.h"
#endif
-#if !defined(setjmp) && defined(HAVE__SETJMP) && !defined(sigsetjmp) && !defined(HAVE_SIGSETJMP)
-#define ruby_setjmp(env) _setjmp(env)
-#define ruby_longjmp(env,val) _longjmp(env,val)
-#else
-#define ruby_setjmp(env) setjmp(env)
-#define ruby_longjmp(env,val) longjmp(env,val)
+#define ruby_setjmp(env) RUBY_SETJMP(env)
+#define ruby_longjmp(env,val) RUBY_LONGJMP(env,val)
+#ifdef __CYGWIN__
+int _setjmp(), _longjmp();
#endif
#include <sys/types.h>