1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Merge latest trunk changes into this branch.

FossilOrigin-Name: 2b3945e6a597e6853cac567052e92926c8cb6d7a029ac64c2d45c321bbe2e94d
This commit is contained in:
dan
2024-10-02 11:11:29 +00:00
40 changed files with 2483 additions and 1715 deletions

View File

@@ -159,6 +159,7 @@ char *sqlite3_temp_directory = 0;
*/
char *sqlite3_data_directory = 0;
#if !defined(SQLITE_OMIT_WSD) && !defined(SQLITE_USE_LONG_DOUBLE)
/*
** Determine whether or not high-precision (long double) floating point
** math works correctly on CPU currently running.
@@ -183,7 +184,7 @@ static SQLITE_NOINLINE int hasHighPrecisionDouble(int rc){
return b!=c;
}
}
#endif /* !SQLITE_OMIT_WSD && !SQLITE_USE_LONG_DOUBLE */
/*
** Initialize SQLite.
@@ -380,9 +381,7 @@ int sqlite3_initialize(void){
}
#endif
/* Experimentally determine if high-precision floating point is
** available. */
#ifndef SQLITE_OMIT_WSD
#if !defined(SQLITE_OMIT_WSD) && !defined(SQLITE_USE_LONG_DOUBLE)
sqlite3Config.bUseLongDouble = hasHighPrecisionDouble(rc);
#endif
@@ -4645,12 +4644,18 @@ int sqlite3_test_control(int op, ...){
** X==0 Disable bUseLongDouble
** X==1 Enable bUseLongDouble
** X>=2 Set bUseLongDouble to its default value for this platform
**
** If the SQLITE_USE_LONG_DOUBLE compile-time option has been used, then
** the bUseLongDouble setting is fixed. This test-control becomes a
** no-op, except that it still reports the fixed setting.
*/
case SQLITE_TESTCTRL_USELONGDOUBLE: {
#if !defined(SQLITE_USE_LONG_DOUBLE)
int b = va_arg(ap, int);
if( b>=2 ) b = hasHighPrecisionDouble(b);
if( b>=0 ) sqlite3Config.bUseLongDouble = b>0;
rc = sqlite3Config.bUseLongDouble!=0;
#endif
rc = SqliteUseLongDouble!=0;
break;
}
#endif