diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-26 20:46:13 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-26 20:48:26 +0900 |
| commit | 7f5e257f77c40bef4023b41639d4188de27a5708 (patch) | |
| tree | bc04b24e6d662b61b5061f8777562c68803df339 /include | |
| parent | e0b8876640592400bb0160be2f63e6b54c0ce3cc (diff) | |
| download | mruby-7f5e257f77c40bef4023b41639d4188de27a5708.tar.gz mruby-7f5e257f77c40bef4023b41639d4188de27a5708.zip | |
Use `__builtin_setjmp()`, `__builtin_longjmp()` on MinGW; fix #5133
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/throw.h | 3 |
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 |
