Fixes for Windows.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2020-08-18 18:44:06 +02:00
parent cfcdbfe984
commit c2655568d7
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 6 additions and 3 deletions

View File

@ -1,9 +1,12 @@
#ifndef ARBUTILS_SIGNALHANDLING_HPP #ifndef ARBUTILS_SIGNALHANDLING_HPP
#define ARBUTILS_SIGNALHANDLING_HPP #define ARBUTILS_SIGNALHANDLING_HPP
#if !WINDOWS
#if PRETTYTRACES #if PRETTYTRACES
#define BACKWARD_HAS_DW 1 #define BACKWARD_HAS_DW 1
#endif #endif
#include "../extern/backward.hpp" #include "../extern/backward.hpp"
#endif
#include "Exception.hpp" #include "Exception.hpp"
// Sourced from https://github.com/bombela/backward-cpp/blob/master/backward.hpp#L3849 // Sourced from https://github.com/bombela/backward-cpp/blob/master/backward.hpp#L3849
@ -38,7 +41,7 @@ namespace ArbUt {
SignalHandling(void(callback)(const char*) = nullptr, SignalHandling(void(callback)(const char*) = nullptr,
const std::vector<int>& posix_signals = make_default_signals()) const std::vector<int>& posix_signals = make_default_signals())
: _loaded(false){ : _loaded(false) {
bool success = true; bool success = true;
const size_t stack_size = 1024 * 1024 * 8; const size_t stack_size = 1024 * 1024 * 8;
@ -128,7 +131,7 @@ namespace ArbUt {
private: private:
backward::details::handle<char*> _stack_content; backward::details::handle<char*> _stack_content;
bool _loaded; bool _loaded;
static void(*_callback)(const char*); static void (*_callback)(const char*);
#ifdef __GNUC__ #ifdef __GNUC__
__attribute__((noreturn)) __attribute__((noreturn))
@ -328,7 +331,7 @@ namespace ArbUt {
#endif // BACKWARD_SYSTEM_UNKNOWN #endif // BACKWARD_SYSTEM_UNKNOWN
void SetSignalCallback(void(*callback)(const char*)); void SetSignalCallback(void (*callback)(const char*));
} }
#endif // ARBUTILS_SIGNALHANDLING_HPP #endif // ARBUTILS_SIGNALHANDLING_HPP