diff --git a/configure.ac b/configure.ac index 3111eacb2..7a1b219ec 100644 --- a/configure.ac +++ b/configure.ac @@ -228,6 +228,8 @@ fi AM_CONDITIONAL([MANGOS_BUILD_ACE], [test X$need_to_build_ace = Xyes]) +# old ace versions not have ace/Stack_Trace.h +AC_CHECK_HEADERS([ace/Stack_Trace.h]) ## Unify all additional includes/libs in one variable. # TODO this looks kinda ugly, but when we add m4 folder I will make it look very pritey ( by Derex ). diff --git a/src/shared/Errors.h b/src/shared/Errors.h index 7dd9dc52d..01d504229 100644 --- a/src/shared/Errors.h +++ b/src/shared/Errors.h @@ -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 ); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 714dddb03..a2a499339 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8078" + #define REVISION_NR "8079" #endif // __REVISION_NR_H__