mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-30 03:34:25 +03:00
remove Windows/ICC support
This commit is contained in:
committed by
Konstantinos Margaritis
parent
8cff876962
commit
08357a096c
@@ -10,10 +10,6 @@ include_directories(${PROJECT_SOURCE_DIR}/util)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXX_FLAGS}")
|
||||
|
||||
if(WIN32 AND (BUILD_STATIC_AND_SHARED OR BUILD_SHARED_LIBS))
|
||||
add_executable(hsdump main.cpp $<TARGET_OBJECTS:hs_compile_shared> $<TARGET_OBJECTS:hs_exec_shared>)
|
||||
else()
|
||||
add_executable(hsdump main.cpp)
|
||||
endif()
|
||||
add_executable(hsdump main.cpp)
|
||||
target_link_libraries(hsdump hs expressionutil crosscompileutil)
|
||||
|
||||
|
@@ -58,19 +58,9 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include "win_getopt.h"
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <dirent.h>
|
||||
#else
|
||||
#include <direct.h>
|
||||
#define stat _stat
|
||||
#endif
|
||||
|
||||
#include <boost/ptr_container/ptr_vector.hpp>
|
||||
|
||||
@@ -332,7 +322,6 @@ u32 buildDumpFlags(void) {
|
||||
return flags;
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
static
|
||||
void clearDir(const string &path) {
|
||||
DIR *dir = opendir(path.c_str());
|
||||
@@ -356,46 +345,12 @@ void clearDir(const string &path) {
|
||||
}
|
||||
closedir(dir);
|
||||
}
|
||||
#else // windows
|
||||
static
|
||||
void clearDir(const string &path) {
|
||||
WIN32_FIND_DATA ffd;
|
||||
HANDLE hFind = INVALID_HANDLE_VALUE;
|
||||
string glob = path + "/*";
|
||||
hFind = FindFirstFile(glob.c_str(), &ffd);
|
||||
if (hFind == INVALID_HANDLE_VALUE) {
|
||||
printf("ERROR: couldn't open location %s\n", path.c_str());
|
||||
exit(1);
|
||||
}
|
||||
do {
|
||||
string basename(ffd.cFileName);
|
||||
string fname(path);
|
||||
fname.push_back('/');
|
||||
fname.append(basename);
|
||||
|
||||
// Ignore '.' and '..'
|
||||
if (basename == "." || basename == "..") {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!DeleteFile(fname.c_str())) {
|
||||
printf("ERROR: couldn't remove file %s\n", fname.c_str());
|
||||
}
|
||||
|
||||
} while (FindNextFile(hFind, &ffd) != 0);
|
||||
FindClose(hFind);
|
||||
}
|
||||
#endif
|
||||
|
||||
static
|
||||
int makeDirectory(const string &dirName) {
|
||||
#ifndef _WIN32
|
||||
mode_t mode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP |
|
||||
S_IROTH | S_IXOTH;
|
||||
return mkdir(dirName.c_str(), mode);
|
||||
#else
|
||||
return _mkdir(dirName.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
static
|
||||
|
Reference in New Issue
Block a user