diff --git a/client/gui/NotificationHandler.cpp b/client/gui/NotificationHandler.cpp index f539c4729..14aa36ecf 100644 --- a/client/gui/NotificationHandler.cpp +++ b/client/gui/NotificationHandler.cpp @@ -12,9 +12,9 @@ #include "NotificationHandler.h" #include #include -#include #if defined(VCMI_WINDOWS) +#include #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: diff --git a/server/CVCMIServer.cpp b/server/CVCMIServer.cpp index ce24bba5e..1c95a2c3e 100644 --- a/server/CVCMIServer.cpp +++ b/server/CVCMIServer.cpp @@ -59,10 +59,6 @@ #include "../lib/CGameState.h" -#if defined(__GNUC__) && !defined(__UCLIBC__) && !defined(__MINGW32__) && !defined(VCMI_MOBILE) -#include -#endif - template class CApplyOnServer; class CBaseForServerApply @@ -999,33 +995,6 @@ ui8 CVCMIServer::getIdOfFirstUnallocatedPlayer() const return 0; } -#if defined(__GNUC__) && !defined(__UCLIBC__) && !defined(__MINGW32__) && !defined(VCMI_MOBILE) -void handleLinuxSignal(int sig) -{ - const int STACKTRACE_SIZE = 100; - void * buffer[STACKTRACE_SIZE]; - int ptrCount = backtrace(buffer, STACKTRACE_SIZE); - char * * strings; - - logGlobal->error("Error: signal %d :", sig); - strings = backtrace_symbols(buffer, ptrCount); - if(strings == nullptr) - { - logGlobal->error("There are no symbols."); - } - else - { - for(int i = 0; i < ptrCount; ++i) - { - logGlobal->error(strings[i]); - } - free(strings); - } - - _exit(EXIT_FAILURE); -} -#endif - static void handleCommandOptions(int argc, const char * argv[], boost::program_options::variables_map & options) { namespace po = boost::program_options; @@ -1101,11 +1070,6 @@ int main(int argc, const char * argv[]) // Correct working dir executable folder (not bundle folder) so we can use executable relative paths boost::filesystem::current_path(boost::filesystem::system_complete(argv[0]).parent_path()); #endif - // Installs a sig sev segmentation violation handler - // to log stacktrace -#if defined(__GNUC__) && !defined(__UCLIBC__) && !defined(__MINGW32__) && !defined(VCMI_MOBILE) - signal(SIGSEGV, handleLinuxSignal); -#endif #ifndef VCMI_IOS console = new CConsoleHandler();