mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
Windows porting: port hyperscan and chimera tools to windows.
This commit is contained in:
@@ -10,9 +10,16 @@ if (BUILD_CHIMERA)
|
||||
include_directories(${PCRE_INCLUDE_DIRS})
|
||||
add_definitions(-DHS_HYBRID)
|
||||
add_executable(hscheck ${hscheck_SOURCES})
|
||||
target_link_libraries(hscheck hs chimera ${PCRE_LDFLAGS} expressionutil pthread)
|
||||
if(NOT WIN32)
|
||||
target_link_libraries(hscheck hs chimera ${PCRE_LDFLAGS} expressionutil pthread)
|
||||
else()
|
||||
target_link_libraries(hscheck hs chimera pcre expressionutil)
|
||||
endif()
|
||||
else()
|
||||
add_executable(hscheck ${hscheck_SOURCES})
|
||||
target_link_libraries(hscheck hs expressionutil pthread)
|
||||
if(NOT WIN32)
|
||||
target_link_libraries(hscheck hs expressionutil pthread)
|
||||
else()
|
||||
target_link_libraries(hscheck hs expressionutil)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -70,8 +70,11 @@
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include "win_getopt.h"
|
||||
#endif
|
||||
#include <boost/algorithm/string/trim.hpp>
|
||||
|
||||
using namespace std;
|
||||
@@ -625,7 +628,7 @@ void loadSignatureBuildSigs(const string &inFile,
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int HS_CDECL main(int argc, char **argv) {
|
||||
num_of_threads = max(1u, std::thread::hardware_concurrency());
|
||||
|
||||
#if !defined(RELEASE_BUILD)
|
||||
|
Reference in New Issue
Block a user