diff options
author | drh <drh@noemail.net> | 2017-01-03 20:01:24 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-01-03 20:01:24 +0000 |
commit | b94f2eccc13b55560e40d35b0f887e7c01ec11c7 (patch) | |
tree | f5fba1e960d800e95c1fa1d88ed04dde6eccf7f1 /src/sqliteInt.h | |
parent | eea46aeafc8ae4ca1f4a86961ac1132cb528a00e (diff) | |
download | sqlite-b94f2eccc13b55560e40d35b0f887e7c01ec11c7.tar.gz sqlite-b94f2eccc13b55560e40d35b0f887e7c01ec11c7.zip |
Use the CLANG_VERSION macro to control clang-specific features.
FossilOrigin-Name: f8ebeec211483503e135104ef977b3c384a1d789
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index c034d6841..e57453e67 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -110,6 +110,14 @@ # define GCC_VERSION 0 #endif +/* What version of CLANG is being used. 0 means GCC is not being used */ +#ifdef __clang__ +# define CLANG_VERSION \ + (__clang_major__*1000000+__clang_minor__*1000+__clang_patchlevel__) +#else +# define CLANG_VERSION 0 +#endif + /* Needed for various definitions... */ #if defined(__GNUC__) && !defined(_GNU_SOURCE) # define _GNU_SOURCE @@ -233,7 +241,7 @@ ** the sqlite3StatusDown() function is threadsafe. */ #if !defined(SQLITE_DISABLE_INTRINSIC) \ - && defined(__GNUC__) && GCC_VERSION>=4004000 + && (GCC_VERSION>=4004000 || CLANG_VERSION>=3000000) # define SQLITE_ATOMIC_STATUS_DOWN 1 #endif |