From 0683389d7bc53520b3ff468da5c59f2cc5f07995 Mon Sep 17 00:00:00 2001 From: Mikhail Romanko Date: Sat, 5 Apr 2025 13:29:50 +0300 Subject: Improved build system and POSIX compatibility Fixed few bugs related to build system and POSIX compatabilty. --- CMakeLists.txt | 4 ++-- src/IO.c | 2 +- src/Platform/Dummy/Tss.c | 3 ++- util/trim-whitespace.sh | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc58de1..b3f7f6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,8 +187,8 @@ elseif(UNIX) list(APPEND BH_SOURCE ${BH_SOURCE_POSIX_MT}) list(APPEND BH_HEADER ${BH_HEADER_POSIX_MT}) else() - list(APPEND BH_SOURCE ${BH_SOURCE_POSIX_MT}) - list(APPEND BH_HEADER ${BH_HEADER_POSIX_MT}) + list(APPEND BH_SOURCE ${BH_SOURCE_DUMMY_MT}) + list(APPEND BH_HEADER ${BH_HEADER_DUMMY_MT}) endif() else() message(STATUS "Platform: Unknown") diff --git a/src/IO.c b/src/IO.c index 0bb6c75..c8516da 100644 --- a/src/IO.c +++ b/src/IO.c @@ -1,5 +1,5 @@ #include -#include +#include #define BUFFER_SIZE (sizeof(char *)) diff --git a/src/Platform/Dummy/Tss.c b/src/Platform/Dummy/Tss.c index 4b83931..61a0bcd 100644 --- a/src/Platform/Dummy/Tss.c +++ b/src/Platform/Dummy/Tss.c @@ -3,13 +3,14 @@ int BH_TssCreate(BH_GenericCallback callback) { - BH_UNUSED(callback); + return 0; } void *BH_TssRead(int index) { + BH_UNUSED(index); return NULL; } diff --git a/util/trim-whitespace.sh b/util/trim-whitespace.sh index 34a9c58..f661aa3 100755 --- a/util/trim-whitespace.sh +++ b/util/trim-whitespace.sh @@ -1,2 +1,3 @@ #!/bin/sh -find . \( -iname "*.h" -o -iname "*.c" \) -exec sed -i "s/[ \t]*$//" {} \; \ No newline at end of file +find . \( -iname "*.h" -o -iname "*.c" \) -exec sed -i .bak "s/[ ]*$//" {} \; +find . -iname "*.bak" -exec rm {} \; -- cgit v1.2.3