mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 13:37:01 +00:00
[8079] Fixed build errors at use old ACE versions (without ace/Stack_Trace.h).
This commit is contained in:
parent
2719ae2efa
commit
95ce1eed1c
3 changed files with 16 additions and 2 deletions
|
|
@ -19,9 +19,21 @@
|
|||
#ifndef MANGOSSERVER_ERRORS_H
|
||||
#define MANGOSSERVER_ERRORS_H
|
||||
|
||||
#include "ace/Stack_Trace.h"
|
||||
#include "Common.h"
|
||||
|
||||
#ifndef HAVE_CONFIG_H
|
||||
#define HAVE_ACE_STACK_TRACE_H 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ACE_STACK_TRACE_H
|
||||
#include "ace/Stack_Trace.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ACE_STACK_TRACE_H // old versions ACE not have Stack_Trace.h but used at some oS for better compatibility
|
||||
#define WPAssert( assertion ) { if (!(assertion)) { ACE_Stack_Trace st; fprintf( stderr, "\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n", __FILE__, __LINE__,__FUNCTION__, #assertion, st.c_str()); assert( #assertion &&0 ); } }
|
||||
#else
|
||||
#define WPAssert( assertion ) { if (!(assertion)) { fprintf( stderr, "\n%s:%i in %s ASSERTION FAILED2:\n %s\n", __FILE__, __LINE__,__FUNCTION__, #assertion); assert( #assertion &&0 ); } }
|
||||
#endif
|
||||
#define WPError( assertion, errmsg ) if( ! (assertion) ) { sLog.outError( "%\n%s:%i in %s ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); assert( false ); }
|
||||
#define WPWarning( assertion, errmsg ) if( ! (assertion) ) { sLog.outError( "\n%s:%i in %s WARNING:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue