Use __builtin_setjmp(), __builtin_longjmp() on MinGW; fix #5133

This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-11-26 20:46:13 +09:00
parent e0b8876640
commit 7f5e257f77
+3
View File
@@ -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