mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Add option 2 to SQLITE_TESTCTRL_USELONGDOUBLE to move the setting to its
defaults. Enhance the CLI and testfixture to make use of this value. Base the default on sizeof(LONGDOUBLE_TYPE) rather than on sizeof(long double). FossilOrigin-Name: 64e6bd1c25d8e1dbfe511cba1921ff052c0fa4fe410fc9ce4435700a70cb88b1
This commit is contained in:
@@ -4472,11 +4472,14 @@ int sqlite3_test_control(int op, ...){
|
||||
|
||||
/* sqlite3_test_control(SQLITE_TESTCTRL_USELONGDOUBLE, int X);
|
||||
**
|
||||
** Enable long double usage if X>0. Disable if X==0. No-op if X<0.
|
||||
** Return the status of long double usage afterwards.
|
||||
** X<0 Make no changes to the bUseLongDouble. Just report value.
|
||||
** X==0 Disable bUseLongDouble
|
||||
** X==1 Enable bUseLongDouble
|
||||
** X==2 Set bUseLongDouble to its default value for this platform
|
||||
*/
|
||||
case SQLITE_TESTCTRL_USELONGDOUBLE: {
|
||||
int b = va_arg(ap, int);
|
||||
if( b==2 ) b = sizeof(LONGDOUBLE_TYPE)>8;
|
||||
if( b>=0 ) sqlite3Config.bUseLongDouble = b>0;
|
||||
rc = sqlite3Config.bUseLongDouble!=0;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user