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
This commit is contained in:
David Chisnall 2012-07-20 12:39:13 +00:00
parent 2ecedb41ba
commit e447a91b60

View file

@ -34,10 +34,12 @@
#import <GNUstepBase/GSConfig.h>
#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