From 4fc69ce3bc8f2ccac53a253ad02614380df491d4 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 14 Mar 2023 19:45:46 +0900 Subject: [PATCH] Revert "mruby/throw.h: do not use __builtin_setjmp for GCC; close #5950" This reverts commit 9cf49d08b404ef45eaa021f91162e673f88c4366. This change caused flaky tests on MinGW. I now remember it was introduced for MINGW64 to address #5133. Sorry. --- include/mruby/throw.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/mruby/throw.h b/include/mruby/throw.h index fbe66e95e..547eea12c 100644 --- a/include/mruby/throw.h +++ b/include/mruby/throw.h @@ -33,6 +33,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