From a82527e00fd535d0740deb45e39d041863116404 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 12 Aug 2025 14:54:23 +0200 Subject: Some generic fixes, mainly for building on Windows --- .gitignore | 3 +++ src/utils/compilers.h | 13 +++++++++++++ src/utils/utils.h | 1 + src/utils/wrapthread.h | 4 ++-- 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/utils/compilers.h diff --git a/.gitignore b/.gitignore index 1611bcc..38d22f8 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,6 @@ tools/results *.s *.pyd *.dll +*.exp +*.lib +*.pdb diff --git a/src/utils/compilers.h b/src/utils/compilers.h new file mode 100644 index 0000000..a7d6df5 --- /dev/null +++ b/src/utils/compilers.h @@ -0,0 +1,13 @@ +#if defined(__GNUC__) + +#define unused __attribute__((unused)) + +#elif defined(__clang__) + +#define unused __attribute__((unused)) + +#else + +#define unused + +#endif diff --git a/src/utils/utils.h b/src/utils/utils.h index b2ab64d..383781a 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -1,3 +1,4 @@ +#include "compilers.h" #include "dbg_log.h" #include "constants.h" #include "math.h" diff --git a/src/utils/wrapthread.h b/src/utils/wrapthread.h index 482b67f..28654fe 100644 --- a/src/utils/wrapthread.h +++ b/src/utils/wrapthread.h @@ -2,8 +2,8 @@ #define wrapthread_atomic -#define wrapthread_define_var_thread_t(x) char x; (void)(x) -#define wrapthread_define_var_mutex_t(x) char x; (void)(x) +#define wrapthread_define_var_thread_t(x) unused char x +#define wrapthread_define_var_mutex_t(x) unused char x #define wrapthread_define_struct_thread_t(x) char x #define wrapthread_define_struct_mutex_t(x) char x -- cgit v1.3