mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-27 13:33:18 +08:00
refine c17 check for ATOMIC_VAR_INIT
This commit is contained in:
parent
870cd98e14
commit
67dcbbfa43
@ -39,7 +39,7 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||||||
#include <stdatomic.h>
|
#include <stdatomic.h>
|
||||||
#define mi_atomic(name) atomic_##name
|
#define mi_atomic(name) atomic_##name
|
||||||
#define mi_memory_order(name) memory_order_##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
|
#define MI_ATOMIC_VAR_INIT(x) x
|
||||||
#else
|
#else
|
||||||
#define MI_ATOMIC_VAR_INIT(x) ATOMIC_VAR_INIT(x)
|
#define MI_ATOMIC_VAR_INIT(x) ATOMIC_VAR_INIT(x)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user