aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2021-01-09 18:24:33 +0000
committerdrh <drh@noemail.net>2021-01-09 18:24:33 +0000
commit4ee492f176e963341b1d75a803663697e95ea00a (patch)
treeac9bb4859804f0a85518f5c990a313e99fe72fca /src
parent1242c0ccf4b16ca70e877aca1c36df02dc94de12 (diff)
downloadsqlite-4ee492f176e963341b1d75a803663697e95ea00a.tar.gz
sqlite-4ee492f176e963341b1d75a803663697e95ea00a.zip
More detailed compile-time testing before attempting to use atomic load
intrinsics. See [forum:/forumpost/fc0237a39b30ac0a|forum post fc0237a39b30ac0a]. FossilOrigin-Name: 5204c2c4a7b73a64764b0d2d1d7c53709bb64e0d2685a829c7bf31af13bab5e7
Diffstat (limited to 'src')
-rw-r--r--src/sqliteInt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index f20fd7067..980ae6d58 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -214,7 +214,8 @@
#ifndef __has_extension
# define __has_extension(x) 0 /* compatibility with non-clang compilers */
#endif
-#if GCC_VERSION>=4007000 || __has_extension(c_atomic)
+#if GCC_VERSION>=4007000 || \
+ (__has_extension(c_atomic) && __has_extension(c_atomic_store_n))
# define AtomicLoad(PTR) __atomic_load_n((PTR),__ATOMIC_RELAXED)
# define AtomicStore(PTR,VAL) __atomic_store_n((PTR),(VAL),__ATOMIC_RELAXED)
#else