From a447b147920a95d140b0afb10375d78bf92005ce Mon Sep 17 00:00:00 2001 From: slguan Date: Thu, 7 Nov 2019 12:24:28 +0800 Subject: [PATCH] Fix some compilation and packaging problems under windows --- CMakeLists.txt | 2 +- src/connector/jdbc/CMakeLists.txt | 2 +- src/os/windows/inc/os.h | 2 ++ src/os/windows/src/twindows.c | 8 ++++++++ src/util/src/version.c | 6 +++--- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3dc2f5a95..af49d6811a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,7 +166,7 @@ ELSEIF (TD_WINDOWS) INSTALL(TARGETS taos RUNTIME DESTINATION driver) INSTALL(TARGETS shell RUNTIME DESTINATION .) IF (TD_MVN_INSTALLED) - INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos-jdbcdriver-1.0.1-dist.jar DESTINATION connector/jdbc) + INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos-jdbcdriver-1.0.2-dist.jar DESTINATION connector/jdbc) ENDIF () ENDIF () diff --git a/src/connector/jdbc/CMakeLists.txt b/src/connector/jdbc/CMakeLists.txt index 53a8965fa2..56a65a8ab5 100644 --- a/src/connector/jdbc/CMakeLists.txt +++ b/src/connector/jdbc/CMakeLists.txt @@ -8,7 +8,7 @@ IF (TD_MVN_INSTALLED) ADD_CUSTOM_COMMAND(OUTPUT ${JDBC_CMD_NAME} POST_BUILD COMMAND mvn -Dmaven.test.skip=true install -f ${CMAKE_CURRENT_SOURCE_DIR}/pom.xml - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/target/taos-jdbcdriver-*.jar ${LIBRARY_OUTPUT_PATH} + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/target/taos-jdbcdriver-1.0.2-dist.jar ${LIBRARY_OUTPUT_PATH} COMMAND mvn -Dmaven.test.skip=true clean -f ${CMAKE_CURRENT_SOURCE_DIR}/pom.xml COMMENT "build jdbc driver") ADD_CUSTOM_TARGET(${JDBC_TARGET_NAME} ALL WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} DEPENDS ${JDBC_CMD_NAME}) diff --git a/src/os/windows/inc/os.h b/src/os/windows/inc/os.h index c74709449d..48e371376b 100644 --- a/src/os/windows/inc/os.h +++ b/src/os/windows/inc/os.h @@ -76,8 +76,10 @@ extern "C" { int32_t __sync_val_compare_and_swap_32(int32_t *ptr, int32_t oldval, int32_t newval); int32_t __sync_add_and_fetch_32(int32_t *ptr, int32_t val); +int32_t __sync_sub_and_fetch_32(int32_t *ptr, int32_t val); int64_t __sync_val_compare_and_swap_64(int64_t *ptr, int64_t oldval, int64_t newval); int64_t __sync_add_and_fetch_64(int64_t *ptr, int64_t val); +int64_t __sync_sub_and_fetch_64(int64_t *ptr, int64_t val); int32_t __sync_val_load_32(int32_t *ptr); void __sync_val_restore_32(int32_t *ptr, int32_t newval); diff --git a/src/os/windows/src/twindows.c b/src/os/windows/src/twindows.c index 2de719b0fd..75bc8c2839 100644 --- a/src/os/windows/src/twindows.c +++ b/src/os/windows/src/twindows.c @@ -70,6 +70,10 @@ int32_t __sync_add_and_fetch_32(int32_t *ptr, int32_t val) { return InterlockedAdd(ptr, val); } +int32_t __sync_sub_and_fetch_32(int32_t *ptr, int32_t val) { + return InterlockedAdd(ptr, -val); +} + int64_t __sync_val_compare_and_swap_64(int64_t *ptr, int64_t oldval, int64_t newval) { return InterlockedCompareExchange64(ptr, newval, oldval); } @@ -78,6 +82,10 @@ int64_t __sync_add_and_fetch_64(int64_t *ptr, int64_t val) { return InterlockedAdd64(ptr, val); } +int64_t __sync_sub_and_fetch_64(int64_t *ptr, int64_t val) { + return InterlockedAdd64(ptr, -val); +} + int32_t __sync_val_load_32(int32_t *ptr) { return InterlockedOr(ptr, 0); } diff --git a/src/util/src/version.c b/src/util/src/version.c index 6225cd2cbf..fa769db684 100755 --- a/src/util/src/version.c +++ b/src/util/src/version.c @@ -1,4 +1,4 @@ -char version[64] = "1.6.3.0"; +char version[64] = "1.6.3.1"; char compatible_version[64] = "1.6.1.0"; -char gitinfo[128] = "49080adeee33c95d1174ac96eca9e62536e2da0f"; -char buildinfo[512] = "Built by ubuntu at 2019-10-21 19:33"; +char gitinfo[128] = "c2f65ef028b41213c8c731778eff019814bd0538"; +char buildinfo[512] = "Built by ubuntu at 2019-11-07 11:17"; -- GitLab