From 7f5e257f77c40bef4023b41639d4188de27a5708 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 26 Nov 2020 20:46:13 +0900 Subject: Use `__builtin_setjmp()`, `__builtin_longjmp()` on MinGW; fix #5133 --- include/mruby/throw.h | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3