summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mruby/throw.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mruby/throw.h b/include/mruby/throw.h
index 39f2c450b..52171e9b0 100644
--- a/include/mruby/throw.h
+++ b/include/mruby/throw.h
@@ -35,6 +35,9 @@ typedef mrb_int mrb_jmpbuf_impl;
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#define MRB_SETJMP _setjmp
#define MRB_LONGJMP _longjmp
+#elif defined(__MINGW64__) && defined(__GNUC__) && __GNUC__ >= 4
+#define MRB_SETJMP __builtin_setjmp
+#define MRB_LONGJMP __builtin_longjmp
#else
#define MRB_SETJMP setjmp
#define MRB_LONGJMP longjmp