From 55a112135222a6ecb31f8f0733387ce30660d055 Mon Sep 17 00:00:00 2001 From: Jan Fellner Date: Mon, 16 Sep 2024 15:33:16 +0200 Subject: [PATCH 1/3] BUILDSYS-416 fix copying of files while filtering --- compiler/core/snacc.c | 5 +++-- version.h | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/compiler/core/snacc.c b/compiler/core/snacc.c index 731716b..f1793f8 100644 --- a/compiler/core/snacc.c +++ b/compiler/core/snacc.c @@ -2116,15 +2116,16 @@ int copy_file(const char* source, const char* destination) { // Open the source file in binary read mode FILE* src = 0; - if (!fopen_s(&src, source, "rb") || !src) + if (fopen_s(&src, source, "rb") != NO_ERROR || !src) { perror("Error opening source file"); + perror(source); return 1; } // Open the destination file in binary write mode FILE* dest = 0; - if (!fopen_s(&dest, destination, "rb") || !dest) + if (fopen_s(&dest, destination, "wb") != NO_ERROR || !dest) { perror("Error opening destination file"); fclose(src); diff --git a/version.h b/version.h index 81a93fb..120399a 100644 --- a/version.h +++ b/version.h @@ -1,8 +1,8 @@ #ifndef VERSION_H #define VERSION_H -#define VERSION "6.0.15" -#define VERSION_RC 6, 0, 15 -#define RELDATE "14.09.2024" +#define VERSION "6.0.16" +#define VERSION_RC 6, 0, 16 +#define RELDATE "16.09.2024" #endif // VERSION_H From 03abbfc459ef2dace31f6611a80516cfd87ec97d Mon Sep 17 00:00:00 2001 From: Jan Fellner Date: Mon, 16 Sep 2024 15:42:36 +0200 Subject: [PATCH 2/3] BUILDSYS-415 fix complaining about path not terminating with slash --- c-lib/CMakeLists.txt | 4 ++-- compiler/CMakeLists.txt | 2 +- cpp-lib/CMakeLists.txt | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/c-lib/CMakeLists.txt b/c-lib/CMakeLists.txt index 985140f..348c622 100644 --- a/c-lib/CMakeLists.txt +++ b/c-lib/CMakeLists.txt @@ -19,9 +19,9 @@ if(C_LIBRARY_OUTPUT_PATH) set(OUTPUT_PATH ${C_LIBRARY_OUTPUT_PATH}) else() if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/libx64) + set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/libx64/) else() - set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/lib) + set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/lib/) endif() endif() set_target_properties(c-lib PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${OUTPUT_PATH}) diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt index 1bad2f9..bb97ee2 100644 --- a/compiler/CMakeLists.txt +++ b/compiler/CMakeLists.txt @@ -43,7 +43,7 @@ file(GLOB header_files *.h core/*.h back-ends/*.h back-ends/**/*.h) if(COMPILER_OUTPUT_PATH) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${COMPILER_OUTPUT_PATH}) else() - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/output/bin) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/output/bin/) endif() set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) diff --git a/cpp-lib/CMakeLists.txt b/cpp-lib/CMakeLists.txt index fcba2b1..7d31639 100644 --- a/cpp-lib/CMakeLists.txt +++ b/cpp-lib/CMakeLists.txt @@ -23,14 +23,13 @@ if(CPP_LIBRARY_OUTPUT_PATH) set(OUTPUT_PATH ${CPP_LIBRARY_OUTPUT_PATH}) else() if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/libx64) + set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/libx64/) else() - set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/lib) + set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/lib/) endif() endif() set_target_properties(cpp-lib PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${OUTPUT_PATH}) set_target_properties(cpp-lib PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${OUTPUT_PATH}) -set_target_properties(cpp-lib PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${OUTPUT_PATH}) # configure compiler specific options # - warning levels From 80e317b73ae65d35f07cd981984141309939c3be Mon Sep 17 00:00:00 2001 From: Jan Fellner Date: Mon, 16 Sep 2024 15:45:07 +0200 Subject: [PATCH 3/3] BUILDSYS-415 fix build --- compiler/core/snacc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/core/snacc.c b/compiler/core/snacc.c index f1793f8..7fa9489 100644 --- a/compiler/core/snacc.c +++ b/compiler/core/snacc.c @@ -2116,7 +2116,7 @@ int copy_file(const char* source, const char* destination) { // Open the source file in binary read mode FILE* src = 0; - if (fopen_s(&src, source, "rb") != NO_ERROR || !src) + if (fopen_s(&src, source, "rb") != 0 || !src) { perror("Error opening source file"); perror(source); @@ -2125,7 +2125,7 @@ int copy_file(const char* source, const char* destination) // Open the destination file in binary write mode FILE* dest = 0; - if (fopen_s(&dest, destination, "wb") != NO_ERROR || !dest) + if (fopen_s(&dest, destination, "wb") != 0 || !dest) { perror("Error opening destination file"); fclose(src);