File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 32
32
#undef longjmp
33
33
#define setjmp _setjmp
34
34
#define longjmp _longjmp
35
+ #elif defined(__MINGW64__)
36
+ // setjmp/longjmp crash with mingw64, use gcc builtins instead
37
+ #undef setjmp
38
+ #undef longjmp
39
+ #define setjmp __builtin_setjmp
40
+ #define longjmp __builtin_longjmp
35
41
#endif
36
42
37
43
#include " gsl_structs.h"
Original file line number Diff line number Diff line change @@ -83,6 +83,12 @@ typedef std::complex<double> Complex;
83
83
#undef longjmp
84
84
#define setjmp _setjmp
85
85
#define longjmp _longjmp
86
+ #elif defined(__MINGW64__)
87
+ // setjmp/longjmp crash with mingw64, use gcc builtins instead
88
+ #undef setjmp
89
+ #undef longjmp
90
+ #define setjmp __builtin_setjmp
91
+ #define longjmp __builtin_longjmp
86
92
#endif
87
93
88
94
/* Implement the basic GSL-like operations on the matrix types that we need.
You can’t perform that action at this time.
0 commit comments