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

TD-1037

上级 a9899065
...@@ -7,6 +7,7 @@ ADD_SUBDIRECTORY(regex) ...@@ -7,6 +7,7 @@ ADD_SUBDIRECTORY(regex)
ADD_SUBDIRECTORY(iconv) ADD_SUBDIRECTORY(iconv)
ADD_SUBDIRECTORY(lz4) ADD_SUBDIRECTORY(lz4)
ADD_SUBDIRECTORY(cJson) ADD_SUBDIRECTORY(cJson)
#ADD_SUBDIRECTORY(MsvcLibX)
IF (NOT TD_WINDOWS) IF (NOT TD_WINDOWS)
ADD_SUBDIRECTORY(MQTT-C) ADD_SUBDIRECTORY(MQTT-C)
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine) PROJECT(TDengine)
IF (TD_WINDOWS_64) IF (TD_WINDOWS)
LIST(APPEND SRC iconv.c) LIST(APPEND SRC iconv.c)
LIST(APPEND SRC localcharset.c) LIST(APPEND SRC localcharset.c)
INCLUDE_DIRECTORIES(.) INCLUDE_DIRECTORIES(.)
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine) PROJECT(TDengine)
IF (TD_WINDOWS_64) IF (TD_WINDOWS)
INCLUDE_DIRECTORIES(.) INCLUDE_DIRECTORIES(.)
LIST(APPEND SRC pthread.c) LIST(APPEND SRC pthread.c)
ADD_LIBRARY(pthread ${SRC}) ADD_LIBRARY(pthread ${SRC})
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine) PROJECT(TDengine)
IF (TD_WINDOWS_64) IF (TD_WINDOWS)
INCLUDE_DIRECTORIES(inc .) INCLUDE_DIRECTORIES(inc .)
LIST(APPEND SRC regex.c) LIST(APPEND SRC regex.c)
ADD_LIBRARY(regex ${SRC}) ADD_LIBRARY(regex ${SRC})
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine) PROJECT(TDengine)
IF (TD_LINUX_64) IF (TD_LINUX_64 OR TD_WINDOWS_64)
INCLUDE_DIRECTORIES(inc) INCLUDE_DIRECTORIES(inc)
AUX_SOURCE_DIRECTORY(src SRC) AUX_SOURCE_DIRECTORY(src SRC)
ADD_LIBRARY(z ${SRC}) ADD_LIBRARY(z ${SRC})
......
此差异已折叠。
...@@ -472,7 +472,12 @@ typedef uLong FAR uLongf; ...@@ -472,7 +472,12 @@ typedef uLong FAR uLongf;
#endif #endif
#ifndef Z_SOLO #ifndef Z_SOLO
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ #if (_WIN64)
#include <io.h>
#include <process.h>
#else
#include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
#endif
# ifdef VMS # ifdef VMS
# include <unixio.h> /* for off_t */ # include <unixio.h> /* for off_t */
# endif # endif
......
...@@ -37,7 +37,7 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) ...@@ -37,7 +37,7 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
ADD_SUBDIRECTORY(tests) ADD_SUBDIRECTORY(tests)
ELSEIF (TD_WINDOWS_64) ELSEIF (TD_WINDOWS)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/jni/windows) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/jni/windows)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/jni/windows/win32) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/jni/windows/win32)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/pthread) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/pthread)
......
...@@ -22,7 +22,7 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) ...@@ -22,7 +22,7 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
# ENDIF () # ENDIF ()
SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME taos) SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME taos)
ELSEIF (TD_WINDOWS_64) ELSEIF (TD_WINDOWS)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/pthread) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/pthread)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/regex) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/regex)
LIST(APPEND SRC ./src/shellEngine.c) LIST(APPEND SRC ./src/shellEngine.c)
......
...@@ -53,7 +53,12 @@ static FORCE_INLINE int taosCheckChecksum(const uint8_t *stream, uint32_t ssize, ...@@ -53,7 +53,12 @@ static FORCE_INLINE int taosCheckChecksum(const uint8_t *stream, uint32_t ssize,
static FORCE_INLINE int taosCheckChecksumWhole(const uint8_t *stream, uint32_t ssize) { static FORCE_INLINE int taosCheckChecksumWhole(const uint8_t *stream, uint32_t ssize) {
if (ssize < sizeof(TSCKSUM)) return 0; if (ssize < sizeof(TSCKSUM)) return 0;
#if (_WIN64)
return 1;
#else
return *((TSCKSUM *)(stream + ssize - sizeof(TSCKSUM))) == (*crc32c)(0, stream, (size_t)(ssize - sizeof(TSCKSUM))); return *((TSCKSUM *)(stream + ssize - sizeof(TSCKSUM))) == (*crc32c)(0, stream, (size_t)(ssize - sizeof(TSCKSUM)));
#endif
} }
#ifdef __cplusplus #ifdef __cplusplus
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册