mdbx: check gcc/clang version for stdatomic.h

This commit is contained in:
Leo Yuriev 2017-04-27 18:33:05 +03:00
parent 4e9b734b52
commit 8848df34bc

View File

@ -447,7 +447,9 @@ int mdbx_rpid_check(MDB_env *env, mdbx_pid_t pid);
/*----------------------------------------------------------------------------*/
#if (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
#if (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__) && \
(__GNUC_PREREQ(4, 9) || __CLANG_PREREQ(3, 8) || \
!(defined(__GNUC__) || defined(__clang__)))
#include <stdatomic.h>
#elif defined(__GNUC__) || defined(__clang__)
/* LY: nothing required */