未验证 提交 07081f2b 编写于 作者: wafwerar's avatar wafwerar 提交者: GitHub

Merge pull request #12142 from taosdata/fix/ZhiqiangWang/fix-14989-fix-win-max-func-error

fix(os): fix win max func error.
...@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.16) ...@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.16)
set(CMAKE_VERBOSE_MAKEFILE OFF) set(CMAKE_VERBOSE_MAKEFILE OFF)
SET(BUILD_SHARED_LIBS "OFF")
#set output directory #set output directory
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/lib) SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/lib)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/bin) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/bin)
......
...@@ -144,7 +144,7 @@ static FORCE_INLINE int32_t udfColEnsureCapacity(SUdfColumn* pColumn, int32_t ne ...@@ -144,7 +144,7 @@ static FORCE_INLINE int32_t udfColEnsureCapacity(SUdfColumn* pColumn, int32_t ne
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
int allocCapacity = MAX(data->rowsAlloc, 8); int allocCapacity = TMAX(data->rowsAlloc, 8);
while (allocCapacity < newCapacity) { while (allocCapacity < newCapacity) {
allocCapacity *= UDF_MEMORY_EXP_GROWTH; allocCapacity *= UDF_MEMORY_EXP_GROWTH;
} }
...@@ -238,7 +238,7 @@ static FORCE_INLINE int32_t udfColSetRow(SUdfColumn* pColumn, uint32_t currentRo ...@@ -238,7 +238,7 @@ static FORCE_INLINE int32_t udfColSetRow(SUdfColumn* pColumn, uint32_t currentRo
data->varLenCol.payloadLen += dataLen; data->varLenCol.payloadLen += dataLen;
} }
} }
data->numOfRows = MAX(currentRow + 1, data->numOfRows); data->numOfRows = TMAX(currentRow + 1, data->numOfRows);
return 0; return 0;
} }
......
...@@ -44,7 +44,7 @@ int wordexp(char *words, wordexp_t *pwordexp, int flags) { ...@@ -44,7 +44,7 @@ int wordexp(char *words, wordexp_t *pwordexp, int flags) {
return -1; return -1;
} }
printf("parse relative path:%s to abs path:%s\n", words, pwordexp->wordPos); // printf("parse relative path:%s to abs path:%s\n", words, pwordexp->wordPos);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册