提交 8e53280b 编写于 作者: S Shengliang Guan

TD-1057

上级 fce5d817
......@@ -64,7 +64,7 @@ void Filetime2Timeval(const FILETIME *pFT, struct timeval *ptv) {
ULARGE_INTEGER ull;
ull.LowPart = pFT->dwLowDateTime;
ull.HighPart = pFT->dwHighDateTime;
ptv->tv_sec = ull.QuadPart / 10000000ULL - 11644473600ULL;
ptv->tv_sec = (long)(ull.QuadPart / 10000000ULL - 11644473600ULL);
ptv->tv_usec = (int32_t)((ull.QuadPart % 10000000ULL)/10);
}
......
......@@ -4,4 +4,4 @@ PROJECT(TDengine)
AUX_SOURCE_DIRECTORY(. SRC)
ADD_LIBRARY(os ${SRC})
TARGET_LINK_LIBRARIES(os winmm IPHLPAPI ws2_32)
TARGET_LINK_LIBRARIES(os winmm IPHLPAPI ws2_32 MsvcLibXw64)
......@@ -13,5 +13,5 @@ IF (TD_LINUX)
TARGET_LINK_LIBRARIES(query tsdb tutil m rt)
ADD_SUBDIRECTORY(tests)
ELSEIF (TD_WINDOWS)
TARGET_LINK_LIBRARIES(query tutil)
TARGET_LINK_LIBRARIES(query tsdb tutil)
ENDIF ()
......@@ -10,6 +10,26 @@ IF (TD_LINUX)
# Someone has no gtest directory, so comment it
# ADD_SUBDIRECTORY(tests)
ELSEIF (TD_WINDOWS)
SET(CMAKE_MODULE_PATH ${TD_COMMUNITY_DIR}/deps/MsvcLibX/cmake)
include(FindWindowsSDK)
get_mywindowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIR)
get_ucrt_include_dirs(${WINDOWSSDK_PREFERRED_DIR} UCRT_INCLUDE_DIR)
Add_Definitions("-DWSDKINCLUDE=${WINSDK_INCLUDE_DIR}")
include(FindMSVC)
Add_Definitions("-DMSVCINCLUDE=${VC_INCLUDE_DIR}")
IF ((NOT DEFINED UCRT_INCLUDE_DIR) OR (UCRT_INCLUDE_DIR STREQUAL "NOTFOUND"))
Message(STATUS "UCRT_INCLUDE_DIR notu found, set it to vc incude dir")
SET(UCRT_INCLUDE_DIR "${VC_INCLUDE_DIR}")
Add_Definitions("-DUCRTINCLUDE=${VC_INCLUDE_DIR}")
ELSE ()
Add_Definitions("-DUCRTINCLUDE=${UCRT_INCLUDE_DIR}")
ENDIF ()
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/MsvcLibX/include)
ADD_LIBRARY(tsdb ${SRC})
TARGET_LINK_LIBRARIES(tsdb common tutil)
ENDIF ()
......@@ -18,6 +18,8 @@
#include "tchecksum.h"
#include "tsdbMain.h"
#include "tutil.h"
#include "dirent.h"
#define TAOS_RANDOM_FILE_FAIL_TEST
#ifdef TSDB_IDX
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册