New version and patch for 'sqlite'. (#6303)
This commit is contained in:
parent
cd7d812be9
commit
7f0659f032
@ -33,6 +33,8 @@ class Sqlite(AutotoolsPackage):
|
|||||||
"""
|
"""
|
||||||
homepage = "www.sqlite.org"
|
homepage = "www.sqlite.org"
|
||||||
|
|
||||||
|
version('3.21.0', '7913de4c3126ba3c24689cb7a199ea31',
|
||||||
|
url='https://www.sqlite.org/2017/sqlite-autoconf-3210000.tar.gz')
|
||||||
version('3.20.0', 'e262a28b73cc330e7e83520c8ce14e4d',
|
version('3.20.0', 'e262a28b73cc330e7e83520c8ce14e4d',
|
||||||
url='https://www.sqlite.org/2017/sqlite-autoconf-3200000.tar.gz')
|
url='https://www.sqlite.org/2017/sqlite-autoconf-3200000.tar.gz')
|
||||||
version('3.18.0', 'a6687a8ae1f66abc8df739aeadecfd0c',
|
version('3.18.0', 'a6687a8ae1f66abc8df739aeadecfd0c',
|
||||||
@ -50,6 +52,13 @@ class Sqlite(AutotoolsPackage):
|
|||||||
# following patch undefines the macro in shell.c
|
# following patch undefines the macro in shell.c
|
||||||
patch('sqlite_b0.patch', when='@3.18.0')
|
patch('sqlite_b0.patch', when='@3.18.0')
|
||||||
|
|
||||||
|
# Starting version 3.17.0, SQLite uses compiler built-ins
|
||||||
|
# __builtin_sub_overflow(), __builtin_add_overflow(), and
|
||||||
|
# __builtin_mul_overflow(), which are not supported by Intel compiler.
|
||||||
|
# Starting version 3.21.0 SQLite doesn't use the built-ins if Intel
|
||||||
|
# compiler is used.
|
||||||
|
patch('remove_overflow_builtins.patch', when='@3.17.0:3.20%intel')
|
||||||
|
|
||||||
def get_arch(self):
|
def get_arch(self):
|
||||||
arch = architecture.Arch()
|
arch = architecture.Arch()
|
||||||
arch.platform = architecture.platform()
|
arch.platform = architecture.platform()
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
diff --git a/sqlite3.c b/sqlite3.c
|
||||||
|
index 4ec1271..8615169 100644
|
||||||
|
--- a/sqlite3.c
|
||||||
|
+++ b/sqlite3.c
|
||||||
|
@@ -29466,9 +29466,6 @@ SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){
|
||||||
|
** overflow, leave *pA unchanged and return 1.
|
||||||
|
*/
|
||||||
|
SQLITE_PRIVATE int sqlite3AddInt64(i64 *pA, i64 iB){
|
||||||
|
-#if GCC_VERSION>=5004000
|
||||||
|
- return __builtin_add_overflow(*pA, iB, pA);
|
||||||
|
-#else
|
||||||
|
i64 iA = *pA;
|
||||||
|
testcase( iA==0 ); testcase( iA==1 );
|
||||||
|
testcase( iB==-1 ); testcase( iB==0 );
|
||||||
|
@@ -29483,12 +29480,8 @@ SQLITE_PRIVATE int sqlite3AddInt64(i64 *pA, i64 iB){
|
||||||
|
}
|
||||||
|
*pA += iB;
|
||||||
|
return 0;
|
||||||
|
-#endif
|
||||||
|
}
|
||||||
|
SQLITE_PRIVATE int sqlite3SubInt64(i64 *pA, i64 iB){
|
||||||
|
-#if GCC_VERSION>=5004000
|
||||||
|
- return __builtin_sub_overflow(*pA, iB, pA);
|
||||||
|
-#else
|
||||||
|
testcase( iB==SMALLEST_INT64+1 );
|
||||||
|
if( iB==SMALLEST_INT64 ){
|
||||||
|
testcase( (*pA)==(-1) ); testcase( (*pA)==0 );
|
||||||
|
@@ -29498,12 +29491,8 @@ SQLITE_PRIVATE int sqlite3SubInt64(i64 *pA, i64 iB){
|
||||||
|
}else{
|
||||||
|
return sqlite3AddInt64(pA, -iB);
|
||||||
|
}
|
||||||
|
-#endif
|
||||||
|
}
|
||||||
|
SQLITE_PRIVATE int sqlite3MulInt64(i64 *pA, i64 iB){
|
||||||
|
-#if GCC_VERSION>=5004000
|
||||||
|
- return __builtin_mul_overflow(*pA, iB, pA);
|
||||||
|
-#else
|
||||||
|
i64 iA = *pA;
|
||||||
|
if( iB>0 ){
|
||||||
|
if( iA>LARGEST_INT64/iB ) return 1;
|
||||||
|
@@ -29519,7 +29508,6 @@ SQLITE_PRIVATE int sqlite3MulInt64(i64 *pA, i64 iB){
|
||||||
|
}
|
||||||
|
*pA = iA*iB;
|
||||||
|
return 0;
|
||||||
|
-#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
Loading…
Reference in New Issue
Block a user