mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
Multi-value Wasm.
This commit is contained in:
29
sqlite3/long_double.patch
Normal file
29
sqlite3/long_double.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
--- sqlite3.c.orig
|
||||
+++ sqlite3.c
|
||||
@@ -35561,7 +35561,7 @@
|
||||
|
||||
if( e==0 ){
|
||||
*pResult = s;
|
||||
- }else if( sqlite3Config.bUseLongDouble ){
|
||||
+ }else if( sizeof(LONGDOUBLE_TYPE)>8 && sqlite3Config.bUseLongDouble ){
|
||||
LONGDOUBLE_TYPE r = (LONGDOUBLE_TYPE)s;
|
||||
if( e>0 ){
|
||||
while( e>=100 ){ e-=100; r *= 1.0e+100L; }
|
||||
@@ -35967,7 +35967,7 @@
|
||||
/* Multiply r by powers of ten until it lands somewhere in between
|
||||
** 1.0e+19 and 1.0e+17.
|
||||
*/
|
||||
- if( sqlite3Config.bUseLongDouble ){
|
||||
+ if( sizeof(LONGDOUBLE_TYPE)>8 && sqlite3Config.bUseLongDouble ){
|
||||
LONGDOUBLE_TYPE rr = r;
|
||||
if( rr>=1.0e+19 ){
|
||||
while( rr>=1.0e+119L ){ exp+=100; rr *= 1.0e-100L; }
|
||||
@@ -89354,7 +89354,7 @@
|
||||
** than NULL */
|
||||
return 1;
|
||||
}
|
||||
- if( sqlite3Config.bUseLongDouble ){
|
||||
+ if( sizeof(LONGDOUBLE_TYPE)>8 && sqlite3Config.bUseLongDouble ){
|
||||
LONGDOUBLE_TYPE x = (LONGDOUBLE_TYPE)i;
|
||||
testcase( x<r );
|
||||
testcase( x>r );
|
||||
Reference in New Issue
Block a user