mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
fixes toward mingw compatibility
This commit is contained in:
parent
a7b158fada
commit
841ac10e5c
6 changed files with 83 additions and 24 deletions
31
src/debug.h
31
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 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 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue