]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Provide -DHAVE_LOG2=0 and -DHAVE_LOG10=0 compile-time options for use on systems
authordrh <>
Thu, 23 Feb 2023 01:52:54 +0000 (01:52 +0000)
committerdrh <>
Thu, 23 Feb 2023 01:52:54 +0000 (01:52 +0000)
that lack the log2() and log10() standard math library routines, to cause
SQLite to substitute its own alternatives.

FossilOrigin-Name: 7ee22f95e7a7d8650f961f20e304e56c7813e624f05655d7392ca9347748270f

manifest
manifest.uuid
src/func.c

index 05ecf9a686fe4bf20da2350bed07fec4a336cd48..a376f1ad12ca4bc5c1e0d0563f100057af10b4f6 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Enable\sthe\scount-of-view\soptimization\sby\sdefault.\nEnhancement\srequest\s[eaed8e36ce888f1e].
-D 2023-02-22T21:47:02.308
+C Provide\s-DHAVE_LOG2=0\sand\s-DHAVE_LOG10=0\scompile-time\soptions\sfor\suse\son\ssystems\nthat\slack\sthe\slog2()\sand\slog10()\sstandard\smath\slibrary\sroutines,\sto\scause\nSQLite\sto\ssubstitute\sits\sown\salternatives.
+D 2023-02-23T01:52:54.076
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -574,7 +574,7 @@ F src/delete.c 86573edae75e3d3e9a8b590d87db8e47222103029df4f3e11fa56044459b514e
 F src/expr.c 2e5e67e800c9416996df52409746a2f3c7dadf5d38b5a367ce379b239e3f40c8
 F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
 F src/fkey.c 722f20779f5342a787922deded3628d8c74b5249cab04098cf17ee2f2aaff002
-F src/func.c 64c4cb2eebf6ddb6b4b08dc17790e7152b887f223f8caf0c0fe96da1c5a876ca
+F src/func.c d187be57a886ddf4e6b7ef584a494361899be3df5eee6d4a747b68ff4aff4122
 F src/global.c e06ff8e0acd85aec13563c9ecb44fbbf38232ccf73594998fd880b92d619594b
 F src/hash.c c6af5f96a7a76d000f07c5402c48c318c2566beecdee9e78b9d9f60ce7119565
 F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51
@@ -2046,8 +2046,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 7c2d3406000dc8ac5a99cc205b036356b67e4b0b94738592ffc5680749696904
-R 5d4e72d33df5d01cbe3901dfb215f87e
+P a4aacdd323a854d771c8cb1e2e4cfc4fb66b0020cfed23525733603605f5c63b
+R d9f0889f326fe560e4856fa0dae980c0
 U drh
-Z 008d21ed5d10af73f833ad6a800d4467
+Z c988455137d4c4b07349732581414345
 # Remove this line to create a well-formed Fossil manifest.
index a3eae223f43178dc90e08f1deffcddbccdd3e97c..3a0aa55d965a2ce8d7a8d38788e38f9072d700c4 100644 (file)
@@ -1 +1 @@
-a4aacdd323a854d771c8cb1e2e4cfc4fb66b0020cfed23525733603605f5c63b
\ No newline at end of file
+7ee22f95e7a7d8650f961f20e304e56c7813e624f05655d7392ca9347748270f
\ No newline at end of file
index c1efd8acf8814f2a71c5bb97c80e4086fe27f9df..045c60613bb4238cf7cfe7436a90016e6ec99159 100644 (file)
@@ -2161,6 +2161,18 @@ static void ceilingFunc(
 static double xCeil(double x){ return ceil(x); }
 static double xFloor(double x){ return floor(x); }
 
+/*
+** Some systems do not have log2() and log10() in their standard math
+** libraries.
+*/
+#if defined(HAVE_LOG10) && HAVE_LOG10==0
+# define log10(X) (0.4342944819032517867*log(X))
+#endif
+#if defined(HAVE_LOG2) && HAVE_LOG2==0
+# define log2(X) (1.442695040888963456*log(X))
+#endif
+
+
 /*
 ** Implementation of SQL functions:
 **