summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--benchmark/meson.build2
-rw-r--r--meson.build6
-rw-r--r--src/allocator.c1
3 files changed, 6 insertions, 3 deletions
diff --git a/benchmark/meson.build b/benchmark/meson.build
index 3c231c6..bf32b5d 100644
--- a/benchmark/meson.build
+++ b/benchmark/meson.build
@@ -15,7 +15,7 @@ glib_dep = dependency(
if glib_dep.found()
build_benchmarks = true
- benchmark_c_args = platform_c_args
+ benchmark_c_args = extra_c_args
benchmark_c_suppressions = []
if cc.get_id() in ['clang', 'emscripten']
diff --git a/meson.build b/meson.build
index 81f6c62..7ab6b9a 100644
--- a/meson.build
+++ b/meson.build
@@ -170,6 +170,10 @@ elif host_machine.system() in ['dragonfly', 'freebsd', 'netbsd', 'openbsd']
system_c_args += [
'-D_BSD_SOURCE',
]
+elif host_machine.system() == 'windows'
+ system_c_args += [
+ '-DWIN32_LEAN_AND_MEAN',
+ ]
else
system_c_args += [
'-D_POSIX_C_SOURCE=200809L',
@@ -365,7 +369,7 @@ endif
# Set any additional arguments required for building libraries or programs
library_c_args = platform_c_args + extra_c_args + ['-DZIX_INTERNAL']
library_link_args = []
-program_c_args = platform_c_args + extra_c_args
+program_c_args = extra_c_args
program_link_args = []
if cc.get_id() == 'emscripten'
wasm_c_args = [
diff --git a/src/allocator.c b/src/allocator.c
index 686322b..b1453b4 100644
--- a/src/allocator.c
+++ b/src/allocator.c
@@ -8,7 +8,6 @@
#include <zix/attributes.h>
#ifdef _WIN32
-# define WIN32_LEAN_AND_MEAN
# include <malloc.h>
# include <windows.h>
#endif