diff options
author | dan <Dan Kennedy> | 2024-10-02 11:11:29 +0000 |
---|---|---|
committer | dan <Dan Kennedy> | 2024-10-02 11:11:29 +0000 |
commit | 512ad53f3ac8ae97bf83021efd96f96e79750b57 (patch) | |
tree | 0ee9e2dd9df3f092d5e0015987e296300fcfb6e7 /src/sqliteInt.h | |
parent | f9d1141a3b34e36cf26be87dbd199b036985b2d6 (diff) | |
parent | 7151010919cff7ab5134173f5d22fdf534104c34 (diff) | |
download | sqlite-512ad53f3ac8ae97bf83021efd96f96e79750b57.tar.gz sqlite-512ad53f3ac8ae97bf83021efd96f96e79750b57.zip |
Merge latest trunk changes into this branch.
FossilOrigin-Name: 2b3945e6a597e6853cac567052e92926c8cb6d7a029ac64c2d45c321bbe2e94d
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 604f7e975..5b166d9a3 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -4249,6 +4249,41 @@ typedef struct { # define Tuning(X) 0 #endif +/* By default, SQLite will use long double if the long double type +** actually provides higher resolution than double. This use or non-use +** of long double is switchable at run-time by a test-control. Dekker +** algorithms are used for high-precision floating point when long double +** is not available. +** +** Having the run-time option to enable/disable long double support +** causes problems for some compiler tool chains. So the following +** compile-time option is available to permanently enable/disable the use +** of long double. +** +** -DSQLITE_USE_LONG_DOUBLE=0 Omit all use of "long double" from +** the code. Instead, the Dekker algorithm +** is always used when high-precision +** floating point is required. +** +** -DSQLITE_USE_LONG_DOUBLE=1 Always use long double when high +** precision is needed. Never fall back +** to using Dekker algorithms. +** +** If the SQLITE_USE_LONG_DOUBLE macro is not defined, then the determination +** of whether or not to use long double is made at run-time. +*/ +#ifndef SQLITE_USE_LONG_DOUBLE +# define SqliteUseLongDouble sqlite3Config.bUseLongDouble +#elif SQLITE_USE_LONG_DOUBLE+0==1 +# define SqliteUseLongDouble 1 +#elif SQLITE_USE_LONG_DOUBLE+0==0 +# undef LONGDOUBLE_TYPE +# define LONGDOUBLE_TYPE double +# define SqliteUseLongDouble 0 +#else +# error "SQLITE_USE_LONG_DOUBLE should be set to either 0 or 1" +#endif + /* ** Structure containing global configuration data for the SQLite library. ** |