From bb4cdad92c55e404f615600d07c0cff08215bbb6 Mon Sep 17 00:00:00 2001 From: slguan Date: Tue, 26 Nov 2019 22:45:07 +0800 Subject: [PATCH] Handle syntax errors in windows compilation --- src/inc/tnote.h | 1 - src/kit/shell/src/shellEngine.c | 1 + src/os/windows/inc/os.h | 30 +++++++++++++++++++++--------- src/os/windows/src/twindows.c | 4 +++- src/util/CMakeLists.txt | 3 --- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/inc/tnote.h b/src/inc/tnote.h index 1b53be22a2..4f86736be4 100644 --- a/src/inc/tnote.h +++ b/src/inc/tnote.h @@ -20,7 +20,6 @@ extern "C" { #endif -#include "unistd.h" #include "os.h" #include "tutil.h" #include "tglobalcfg.h" diff --git a/src/kit/shell/src/shellEngine.c b/src/kit/shell/src/shellEngine.c index e2897da698..2eb9893556 100644 --- a/src/kit/shell/src/shellEngine.c +++ b/src/kit/shell/src/shellEngine.c @@ -21,6 +21,7 @@ #include "shellCommand.h" #include "ttime.h" #include "tutil.h" +#include /**************** Global variables ****************/ #ifdef WINDOWS diff --git a/src/os/windows/inc/os.h b/src/os/windows/inc/os.h index a1a4bdfa5c..9c0add2c31 100644 --- a/src/os/windows/inc/os.h +++ b/src/os/windows/inc/os.h @@ -16,20 +16,30 @@ #ifndef TDENGINE_PLATFORM_WINDOWS_H #define TDENGINE_PLATFORM_WINDOWS_H +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include #include "winsock2.h" #include -#include -#include -#include -#include -#include #ifdef __cplusplus extern "C" { @@ -366,6 +376,8 @@ int fsendfile(FILE* out_file, FILE* in_file, int64_t* offset, int32_t count); char *strndup(const char *s, size_t n); +void taosSetCoreDump(); + #ifdef __cplusplus } #endif diff --git a/src/os/windows/src/twindows.c b/src/os/windows/src/twindows.c index 9089f90d6a..98be6b60ba 100644 --- a/src/os/windows/src/twindows.c +++ b/src/os/windows/src/twindows.c @@ -394,4 +394,6 @@ char *strndup(const char *s, size_t n) { memcpy(r, s, len); r[len] = 0; return r; -} \ No newline at end of file +} + +void taosSetCoreDump() {} \ No newline at end of file diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index e73428353e..5e84f3fead 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -37,7 +37,6 @@ ELSEIF (TD_WINDOWS_64) LIST(APPEND SRC ./src/ihash.c) LIST(APPEND SRC ./src/lz4.c) LIST(APPEND SRC ./src/shash.c) - LIST(APPEND SRC ./src/sql.c) LIST(APPEND SRC ./src/tbase64.c) LIST(APPEND SRC ./src/tcache.c) LIST(APPEND SRC ./src/tcompression.c) @@ -59,8 +58,6 @@ ELSEIF (TD_WINDOWS_64) LIST(APPEND SRC ./src/tskiplist.c) LIST(APPEND SRC ./src/tsocket.c) LIST(APPEND SRC ./src/tstatus.c) - LIST(APPEND SRC ./src/tstoken.c) - LIST(APPEND SRC ./src/tstoken.c) LIST(APPEND SRC ./src/tstrbuild.c) LIST(APPEND SRC ./src/ttime.c) LIST(APPEND SRC ./src/ttimer.c) -- GitLab