Commit 8784c89c authored by Mike Kremer's avatar Mike Kremer

execinfo does not work on darwin

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4713 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6a083ce3
...@@ -50,7 +50,11 @@ ...@@ -50,7 +50,11 @@
#include <OpenFlipper/SimpleOpt/SimpleOpt.h> #include <OpenFlipper/SimpleOpt/SimpleOpt.h>
#ifndef WIN32 #ifdef (WIN32 || ARCH_DARWIN)
#define NO_EXECINFO
#endif
#ifndef NO_EXECINFO
#include <execinfo.h> #include <execinfo.h>
#endif #endif
...@@ -163,7 +167,7 @@ void showHelp() { ...@@ -163,7 +167,7 @@ void showHelp() {
} }
#ifndef WIN32 #ifndef NO_EXECINFO
void backtrace() void backtrace()
{ {
void *addresses[10]; void *addresses[10];
...@@ -191,7 +195,7 @@ void segfaultHandling (int) { ...@@ -191,7 +195,7 @@ void segfaultHandling (int) {
std::cerr << "\33[31m" << "This should not happen,... Sorry :-(" << std::endl; std::cerr << "\33[31m" << "This should not happen,... Sorry :-(" << std::endl;
std::cerr << "\33[31m" << "=====================================================" << std::endl; std::cerr << "\33[31m" << "=====================================================" << std::endl;
std::cerr << "\n" << std::endl; std::cerr << "\n" << std::endl;
#ifndef WIN32 #ifndef NO_EXECINFO
std::cerr << "\33[0m" << "Trying a backtrace to show what happened last: " << std::endl; std::cerr << "\33[0m" << "Trying a backtrace to show what happened last: " << std::endl;
backtrace(); backtrace();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment