From 67dcbbfa43bf3d9300b4880fea0296cbb4f58a2a Mon Sep 17 00:00:00 2001 From: daanx Date: Sun, 23 Apr 2023 12:46:38 -0700 Subject: [PATCH] refine c17 check for ATOMIC_VAR_INIT --- include/mimalloc/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mimalloc/atomic.h b/include/mimalloc/atomic.h index bd95dd5f..fe418fab 100644 --- a/include/mimalloc/atomic.h +++ b/include/mimalloc/atomic.h @@ -39,7 +39,7 @@ terms of the MIT license. A copy of the license can be found in the file #include #define mi_atomic(name) atomic_##name #define mi_memory_order(name) memory_order_##name -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201710L) // c17, see issue #735 +#if !defined(ATOMIC_VAR_INIT) || (__STDC_VERSION__ >= 201710L) // c17, see issue #735 #define MI_ATOMIC_VAR_INIT(x) x #else #define MI_ATOMIC_VAR_INIT(x) ATOMIC_VAR_INIT(x)