Skip to content

Commit 1a5d7c5

Browse files
committed
Upgraded SQLite3 to 3.7.8 and added patch re large exponents
1 parent 8c73315 commit 1a5d7c5

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

sqlite3/readme.txt

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Sqlite3 built as follows:
22

3-
1. Download recent version from http://www.sqlite.org/sqlite-amalgamation-3070701.zip
3+
1. Download recent version from http://www.sqlite.org/sqlite-amalgamation-3070800.zip
44

55
2. Unzip the file
66

@@ -14,11 +14,12 @@ sqlite3ext.h
1414
3. Edit: sqlite3.c and add the following lines to the start of it:
1515

1616
// These first few lines added by NJG
17-
// version 3.7.7.1
17+
// version 3.7.8
1818
# pragma warning (disable : 4018) // signed/unsigned mismatch
1919
# pragma warning (disable : 4022) // pointer mismatch for actual parameter x
2020
# pragma warning (disable : 4047) // 'void ** ' differs in levels of indirection from 'long *'
2121
# pragma warning (disable : 4049) // terminating line number emission
22+
# pragma warning (disable : 4056) // overflow in floating-point constant arithmetic
2223
# pragma warning (disable : 4100) // unreferenced formal parameter
2324
# pragma warning (disable : 4115) // named type definition in parentheses
2425
# pragma warning (disable : 4127) // conditional expression is constant
@@ -28,6 +29,7 @@ sqlite3ext.h
2829
# pragma warning (disable : 4701) // 'xxx' may be used without having been initialized
2930
# pragma warning (disable : 4702) // unreachable code
3031
# pragma warning (disable : 4706) // assignment within conditional expression
32+
# pragma warning (disable : 4756) // overflow in constant arithmetic
3133
# pragma warning (disable : 4761) // integral size mismatch in argument; conversion supplied
3234

3335
#define SQLITE_SOUNDEX 1
@@ -36,3 +38,27 @@ sqlite3ext.h
3638
#define SQLITE_ENABLE_RTREE 1
3739
#define SQLITE_USE_URI 1
3840

41+
42+
43+
Note: added patch:
44+
45+
http://www.sqlite.org/src/ci/59bb999c8b?sbs=0
46+
47+
48+
@@ -379,10 +379,16 @@
49+
result = s / scale;
50+
result /= 1.0e+308;
51+
}else{
52+
result = s * scale;
53+
result *= 1.0e+308;
54+
+ }
55+
+ }else if( e>=342 ){
56+
+ if( esign<0 ){
57+
+ result = 0.0*s;
58+
+ }else{
59+
+ result = 1e308*1e308*s; /* Infinity */
60+
}
61+
}else{
62+
/* 1.0e+22 is the largest power of 10 than can be
63+
** represented exactly. */
64+
while( e%22 ) { scale *= 1.0e+1; e -= 1; }

0 commit comments

Comments
 (0)