commit a82527e00fd535d0740deb45e39d041863116404
parent e26d50d87cb2b1695d42f1ff8b9ab29a7d10e3aa
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Tue, 12 Aug 2025 14:54:23 +0200
Some generic fixes, mainly for building on Windows
Diffstat:
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git 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
@@ -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
@@ -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
@@ -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