Fix windows build

This commit is contained in:
Andrea Cavalli 2020-09-05 17:33:01 +02:00
parent f592ba6969
commit cd2b97aac2
2 changed files with 9 additions and 0 deletions

View File

@ -38,7 +38,9 @@
#include "td/utils/StringBuilder.h"
#include "td/utils/Time.h"
#ifndef _WIN32
#include "td/utils/death_handler.h"
#endif
#ifndef USE_READLINE
#include "td/utils/find_boundary.h"
@ -4345,7 +4347,9 @@ static void on_fatal_error(const char *error) {
}
void main(int argc, char **argv) {
#ifndef _WIN32
Debug::DeathHandler dh;
#endif
ignore_signal(SignalType::HangUp).ensure();
ignore_signal(SignalType::Pipe).ensure();
set_signal_handler(SignalType::Error, fail_signal).ensure();

View File

@ -10,14 +10,19 @@
#include "td/utils/OptionParser.h"
#include "td/utils/Slice.h"
#include "td/utils/tests.h"
#ifndef _WIN32
#include "td/utils/death_handler.h"
#endif
#if TD_EMSCRIPTEN
#include <emscripten.h>
#endif
int main(int argc, char **argv) {
#ifndef _WIN32
Debug::DeathHandler dh;
#endif
td::init_openssl_threads();
td::TestsRunner &runner = td::TestsRunner::get_default();