From 841ac10e5c20ad152f375f43bceb992fc3945041 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 10 Feb 2011 15:55:15 +0200 Subject: fixes toward mingw compatibility --- src/debug.h | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'src/debug.h') diff --git a/src/debug.h b/src/debug.h index 1973bb510..092bb03a8 100644 --- a/src/debug.h +++ b/src/debug.h @@ -238,18 +238,7 @@ private: assert(0);\ } #ifdef _WIN32 // Windows - -/*class SE_Exception : public std::exception -{ -private: - unsigned int nSE; -public: - SE_Exception() {} - SE_Exception( unsigned int n ) : nSE( n ) {} - ~SE_Exception() {} - unsigned int getSeNumber() { return nSE; } -};*/ - + #ifdef _MSC_VER // MSVC void se_trans_func(unsigned int, EXCEPTION_POINTERS*); class FatalSystemException : public BaseException @@ -259,14 +248,18 @@ public: BaseException(s) {} }; - - #define BEGIN_DEBUG_EXCEPTION_HANDLER \ - BEGIN_PORTABLE_DEBUG_EXCEPTION_HANDLER\ - _set_se_translator(se_trans_func); - - #define END_DEBUG_EXCEPTION_HANDLER \ - END_PORTABLE_DEBUG_EXCEPTION_HANDLER - + #define BEGIN_DEBUG_EXCEPTION_HANDLER \ + BEGIN_PORTABLE_DEBUG_EXCEPTION_HANDLER\ + _set_se_translator(se_trans_func); + + #define END_DEBUG_EXCEPTION_HANDLER \ + END_PORTABLE_DEBUG_EXCEPTION_HANDLER + #else // Probably mingw + #define BEGIN_DEBUG_EXCEPTION_HANDLER\ + BEGIN_PORTABLE_DEBUG_EXCEPTION_HANDLER + #define END_DEBUG_EXCEPTION_HANDLER\ + END_PORTABLE_DEBUG_EXCEPTION_HANDLER + #endif #else // Posix #define BEGIN_DEBUG_EXCEPTION_HANDLER\ BEGIN_PORTABLE_DEBUG_EXCEPTION_HANDLER -- cgit v1.2.3