aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2017-09-12 13:27:43 +0000
committerdrh <drh@noemail.net>2017-09-12 13:27:43 +0000
commitb9772e7fe8eed080490e22c838c2ddf07d0e7c6b (patch)
tree6dfad018e67056ac5bf7498ebddd05b4be6cea2f /src/util.c
parent3e1e14d818c335c4d3dbe6f80559c54e929c5399 (diff)
downloadsqlite-b9772e7fe8eed080490e22c838c2ddf07d0e7c6b.tar.gz
sqlite-b9772e7fe8eed080490e22c838c2ddf07d0e7c6b.zip
Changes to (hopefully) get the build working with recent Intel compilers.
FossilOrigin-Name: b22cdd6734ecda2b2b9749668f353abc2660f192d6a40c5d266309d30e25695e
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index a6d349296..09f7e051a 100644
--- a/src/util.c
+++ b/src/util.c
@@ -491,7 +491,11 @@ do_atof_calc:
if( esign<0 ){
result = 0.0*s;
}else{
+#ifdef INFINITY
+ result = INFINITY;
+#else
result = 1e308*1e308*s; /* Infinity */
+#endif
}
}
}else{
@@ -1276,7 +1280,7 @@ int sqlite3SafetyCheckSickOrOk(sqlite3 *db){
** overflow, leave *pA unchanged and return 1.
*/
int sqlite3AddInt64(i64 *pA, i64 iB){
-#if GCC_VERSION>=5004000
+#if GCC_VERSION>=5004000 && !defined(__INTEL_COMPILER)
return __builtin_add_overflow(*pA, iB, pA);
#else
i64 iA = *pA;
@@ -1296,7 +1300,7 @@ int sqlite3AddInt64(i64 *pA, i64 iB){
#endif
}
int sqlite3SubInt64(i64 *pA, i64 iB){
-#if GCC_VERSION>=5004000
+#if GCC_VERSION>=5004000 && !defined(__INTEL_COMPILER)
return __builtin_sub_overflow(*pA, iB, pA);
#else
testcase( iB==SMALLEST_INT64+1 );
@@ -1311,7 +1315,7 @@ int sqlite3SubInt64(i64 *pA, i64 iB){
#endif
}
int sqlite3MulInt64(i64 *pA, i64 iB){
-#if GCC_VERSION>=5004000
+#if GCC_VERSION>=5004000 && !defined(__INTEL_COMPILER)
return __builtin_mul_overflow(*pA, iB, pA);
#else
i64 iA = *pA;