]> 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 17:12:07 +0000 (17:12 +0000)
committerdrh <>
Thu, 23 Feb 2023 17:12:07 +0000 (17:12 +0000)
that lack the log2() and log10() standard math library routines, to cause
SQLite to substitute its own alternatives.

FossilOrigin-Name: ff3362ab53752de10bd95a16804ce3ef31edd8f0cb3099841c3e4ffc1d79d64d

manifest
manifest.uuid
src/func.c

index f17d7340c450175df100999dd709d9009668ec91..e70c0be570beb5c4a0ab2e7024d3108830fea689 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Version\s3.41.0
-D 2023-02-21T18:09:37.622
+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-23T17:12:07.022
 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
@@ -2045,10 +2045,12 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 409a19145e9558686acab730b94c6d53691b6d0efcea1e9239fc7e5863586a85
-R 8cba8b939a0caa0ad935e665db07c75b
-T +sym-release *
-T +sym-version-3.41.0 *
+P 05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d
+Q +7ee22f95e7a7d8650f961f20e304e56c7813e624f05655d7392ca9347748270f
+R e32a6bb18fb7e6a7c60cf00c13ca09f9
+T *branch * branch-3.41
+T *sym-branch-3.41 *
+T -sym-trunk *
 U drh
-Z dc017a46fcafa54656c31865fbc11b74
+Z b5792cce823e99c05e2551b47650c040
 # Remove this line to create a well-formed Fossil manifest.
index 93e13b11f8dd5f8c1df91be4812255a710403cf3..6fbb4a991b059b8b27a64b279cf887df186786e4 100644 (file)
@@ -1 +1 @@
-05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d
\ No newline at end of file
+ff3362ab53752de10bd95a16804ce3ef31edd8f0cb3099841c3e4ffc1d79d64d
\ 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:
 **