diff --git a/cmake/define.inc b/cmake/define.inc index c1169b994804666c553b89300d140325341a14f0..8cb145e92dddda180706cd3d4494aded170cbb57 100755 --- a/cmake/define.inc +++ b/cmake/define.inc @@ -242,8 +242,14 @@ IF (TD_WINDOWS) ADD_DEFINITIONS(-DPTW32_BUILD) ADD_DEFINITIONS(-D_MBCS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) SET(CMAKE_GENERATOR "NMake Makefiles" CACHE INTERNAL "" FORCE) + IF (CMAKE_DEPFILE_FLAGS_C) + SET(CMAKE_DEPFILE_FLAGS_C "") + ENDIF () + IF (CMAKE_DEPFILE_FLAGS_CXX) + SET(CMAKE_DEPFILE_FLAGS_CXX "") + ENDIF () IF (NOT TD_GODLL) - SET(COMMON_FLAGS "/nologo /WX /wd4018 /wd4999 /Oi /Oy- /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Gd /errorReport:prompt /analyze-") + SET(COMMON_FLAGS "/nologo /wd4018 /wd4999 /Oi /Oy- /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Gd /errorReport:prompt /analyze-") IF (MSVC AND (MSVC_VERSION GREATER_EQUAL 1900)) SET(COMMON_FLAGS "${COMMON_FLAGS} /Wv:18") ENDIF () diff --git a/src/kit/shell/inc/shell.h b/src/kit/shell/inc/shell.h index 230e1acd7eaaceea304d4fc06742f8451b3cdadc..4eb8b3edfbd1f0bdc3520ed410df348e81206aa9 100644 --- a/src/kit/shell/inc/shell.h +++ b/src/kit/shell/inc/shell.h @@ -15,8 +15,9 @@ #ifndef __SHELL__ #define __SHELL__ - +#if !(defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)) #include +#endif #include "stdbool.h" #include "taos.h" #include "taosdef.h" diff --git a/src/kit/shell/src/shellEngine.c b/src/kit/shell/src/shellEngine.c index 6f6d714fe2db14e390774b1e7286fb1000b3d608..c3163f94306db892350375270cb930e5f03f78e2 100644 --- a/src/kit/shell/src/shellEngine.c +++ b/src/kit/shell/src/shellEngine.c @@ -1115,7 +1115,7 @@ void _base64_encode_triple(unsigned char triple[3], char res[4]) { } } -int base64_encode(unsigned char *source, size_t sourcelen, char *target, size_t targetlen) { +int taos_base64_encode(unsigned char *source, size_t sourcelen, char *target, size_t targetlen) { /* check if the result will fit in the target buffer */ if ((sourcelen + 2) / 3 * 4 > targetlen - 1) return 0; @@ -1180,7 +1180,7 @@ int wsclient_handshake() { for (i = 0; i < 16; i++) { key_nonce[i] = rand() & 0xff; } - base64_encode(key_nonce, 16, websocket_key, 256); + taos_base64_encode(key_nonce, 16, websocket_key, 256); if (args.token) { snprintf(request_header, 1024, "GET /rest/ws?token=%s HTTP/1.1\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nHost: " diff --git a/src/os/src/detail/osDir.c b/src/os/src/detail/osDir.c index 61daf913a32075073fa49b2da3a8ea9f315a8c84..3c07266d45558282872c42de1a70b3de5f9a193c 100644 --- a/src/os/src/detail/osDir.c +++ b/src/os/src/detail/osDir.c @@ -53,7 +53,7 @@ int32_t taosMkdirP(const char *dir) { char tmp[256]; char *p = NULL; size_t len; - int i; + size_t i; snprintf(tmp, sizeof(tmp),"%s",dir); len = strlen(tmp);