From e6eecf0d433fae11de9ec786ae22e9684aa5fc80 Mon Sep 17 00:00:00 2001 From: theraven Date: Fri, 20 Jul 2012 12:39:13 +0000 Subject: [PATCH] If the user is compiling with a compiler in native exceptions mode, and they are not specifying the exception model, assume that they want the ones that their compiler will use. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35307 72102866-910b-0410-8b05-ffd578937521 --- Headers/Foundation/NSException.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Headers/Foundation/NSException.h b/Headers/Foundation/NSException.h index 582ab1799..1f4e3a344 100644 --- a/Headers/Foundation/NSException.h +++ b/Headers/Foundation/NSException.h @@ -34,10 +34,12 @@ #import #if defined(_NATIVE_OBJC_EXCEPTIONS) -#define USER_NATIVE_OBJC_EXCEPTIONS 1 -#else -#define USER_NATIVE_OBJC_EXCEPTIONS 0 +# define USER_NATIVE_OBJC_EXCEPTIONS 1 +#elif defined(BASE_NATIVE_OBJC_EXCEPTIONS) && defined(OBJC_ZEROCOST_EXCEPTIONS) +# define USER_NATIVE_OBJC_EXCEPTIONS 1 +# define _NATIVE_OBJC_EXCEPTIONS 1 #endif + #if !BASE_NATIVE_OBJC_EXCEPTIONS && USER_NATIVE_OBJC_EXCEPTIONS #error "There are two separate exception handling mechanisms available ... one based on the standard setjmp() function (which does not require special compiler support), and one 'native' version where the compiler manages the exception handling. If you try to use both in the same executable, exception handlers will not work... which can be pretty disastrous. This error is telling you that the gnustep-base library was built using one form of exception handling, but that the gnustep-make package you are using is building code to use the other form of exception handling ... with the consequence that exception handling would be broken in the program you are building. So, somehow your gnustep-base and gnustep-make package are incompatible, and you need to replace one of them with a version configured to match the other." #if BASE_NATIVE_OBJC_EXCEPTIONS