msys2/64bit fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39942 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2016-06-28 14:01:55 +00:00
parent f7dc58cb23
commit e15c98fde9
3 changed files with 19 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2016-06-28 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSDebug.m: Yse setjmp/longjmp from NSException.h
* Headers/Foundation/NSException.h: On mingw-w64 use the builtin
setjmp/longjmp provided by gcc since the mingw version sometimes
crashes.
2016-06-28 Richard Frith-Macdonald <rfm@gnu.org>
* SSL: Openssl bundle directory deleted

View file

@ -50,9 +50,19 @@
#endif
#import <Foundation/NSString.h>
#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.
*/
#define setjmp(X) __builtin_setjmp(X)
#define longjmp(X,Y) __builtin_longjmp(X,Y)
#endif
#if defined(__cplusplus)
extern "C" {
#endif
@ -354,7 +364,7 @@ GS_EXPORT void _NSRemoveHandler( NSHandler *handler );
#define NS_DURING { NSHandler NSLocalHandler; \
_NSAddHandler(&NSLocalHandler); \
if( !setjmp(NSLocalHandler.jumpState) ) {
if (!setjmp(NSLocalHandler.jumpState)) {
#define NS_HANDLER _NSRemoveHandler(&NSLocalHandler); } else { \
NSException __attribute__((unused)) *localException \

View file

@ -34,6 +34,7 @@
#import "Foundation/NSArray.h"
#import "Foundation/NSData.h"
#import "Foundation/NSDictionary.h"
#import "Foundation/NSException.h"
#import "Foundation/NSLock.h"
#import "Foundation/NSNotification.h"
#import "Foundation/NSNotificationQueue.h"
@ -790,8 +791,6 @@ __builtin_extract_return_address(__builtin_return_address(a + 1)) : 0); break;
# include <signal.h>
#endif
#include <setjmp.h>
#if defined(_WIN32)
#ifndef SIGBUS
#define SIGBUS SIGILL