diff --git a/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h b/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h index afc452c0..5c6f6b0f 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h @@ -31,6 +31,7 @@ freely, subject to the following restrictions: #include #include #include // Exception constuctors take strings. +#include #if defined(_MSC_VER) // In Visual Studio we can use this function to go into the debugger. @@ -38,7 +39,11 @@ freely, subject to the following restrictions: #else // On other platforms we just halt by forcing a crash. // Hopefully this puts us in the debugger if one is running - #define POLYVOX_HALT() *((unsigned int*)0) = 0xDEAD + #if defined(__linux__) || defined(__APPLE__) + #define POLYVOX_HALT() raise(SIGTRAP) + #else + #define POLYVOX_HALT() *((unsigned int*)0) = 0xDEAD + #endif #endif // Macros cannot contain #ifdefs, but some of our macros need to disable warnings and such warning supression is