mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Win64: Remove workaround for setjmp/longjmp misbehaving
Using `__builtin_setjmp` when compiling with Clang on MSYS2 will result in compiler warnings and runtime crashes. Additionally, all tests seem to pass on recent versions of MSYS2 without this workaround in place. Compiler warning on Clang: warning: incompatible pointer types passing 'jmp_buf' (aka 'struct _SETJMP_FLOAT128[16]') to parameter of type 'void **' [-Wincompatible-pointer-types] NS_DURING ^~~~~~~~~ note: expanded from macro 'NS_DURING' if (!setjmp(NSLocalHandler.jumpState)) { ^~~~~~~~~~~~~~~~~~~~~~~~ note: expanded from macro 'setjmp' ^ 1 warning generated.
This commit is contained in:
parent
24653e63c3
commit
673a6880ee
1 changed files with 0 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue