Merge pull request #331 from qmfrederik/fixes/mingw-setjpm-clang

Win64: Only use `__builtin_setjmp`/`__builtin_longjmp` when compiling with GCC
This commit is contained in:
rfm 2023-10-08 10:30:08 +01:00 committed by GitHub
commit 0d9e456bef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,17 +54,6 @@
#include <setjmp.h>
#include <stdarg.h>
#if defined(__WIN64__)
/* This hack is to deal with the fact that currently (June 2016) the
* implementation of longjmp in mingw-w64 sometimes crashes in msvcrt.dll
* but the builtin version provided by gcc seems to work.
*/
#undef setjmp
#define setjmp(X) __builtin_setjmp(X)
#undef longjmp
#define longjmp(X,Y) __builtin_longjmp(X,Y)
#endif
#if defined(__cplusplus)
extern "C" {
#endif