Compile Zeek with MSVC

Allow Zeek to be embedded in another project
This commit is contained in:
Elad Solomon 2021-06-27 17:12:56 +00:00 committed by Tomer Lev
parent 2bd4af7477
commit 3a80b79497
53 changed files with 724 additions and 153 deletions

View file

@ -7,8 +7,16 @@
#include "zeek/supervisor/Supervisor.h"
#include "zeek/zeek-setup.h"
#if defined(_MSC_VER)
#include <fcntl.h> // For _O_BINARY.
#endif
int main(int argc, char** argv)
{
#if defined(_MSC_VER)
_setmode(_fileno(stdout), _O_BINARY);
_setmode(_fileno(stderr), _O_BINARY);
#endif
auto time_start = zeek::util::current_time(true);
auto setup_result = zeek::detail::setup(argc, argv);
@ -41,7 +49,6 @@ int main(int argc, char** argv)
zeek::detail::timer_mgr->Add(new zeek::detail::ParentProcessCheckTimer(1, 1));
double time_net_start = zeek::util::current_time(true);
;
uint64_t mem_net_start_total;
uint64_t mem_net_start_malloced;