Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (ab0fc2deccacbce124137831493b27cb24f0d8a9)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (ab0fc2deccacbce124137831493b27cb24f0d8a9)
  • Date: Tue, 7 Jan 2025 17:11:36 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

utils/ledger/BUILD | 2
utils/ledger/HISTORY | 5
utils/ledger/patches/0001-Fix-build-against-Boost-1.87.patch | 65
+++++++++++
3 files changed, 72 insertions(+)

New commits:
commit ab0fc2deccacbce124137831493b27cb24f0d8a9
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

ledger: Fix build against Boost 1.87

commit a1af4f2f06986ead5507e1a301c208fd15ed2d78
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

ledger: Fix build with GCC 14

diff --git a/utils/ledger/BUILD b/utils/ledger/BUILD
index 7ffcd92..d310a29 100755
--- a/utils/ledger/BUILD
+++ b/utils/ledger/BUILD
@@ -1,2 +1,4 @@
OPTS+=" $LEDGER_OPTS" &&
+# Fix build with GCC 14 (hopefully remove after 3.3.2)
+OPTS+=' -DCMAKE_CXX_STANDARD=14' &&
cmake_build
diff --git a/utils/ledger/HISTORY b/utils/ledger/HISTORY
index 305ad00..df3370b 100644
--- a/utils/ledger/HISTORY
+++ b/utils/ledger/HISTORY
@@ -1,3 +1,8 @@
+2025-01-07 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD: fixed build with GCC 14
+ * patches/0001-Fix-build-against-Boost-1.87.patch:
+ fixed build against Boost 1.87
+
2024-09-06 Ismael Luceno <ismael AT sourcemage.org>
* DETAILS: updated spell to 3.3.2
* patches/0001-Fix-build-with-Boost-1.85.0.patch:
diff --git a/utils/ledger/patches/0001-Fix-build-against-Boost-1.87.patch
b/utils/ledger/patches/0001-Fix-build-against-Boost-1.87.patch
new file mode 100644
index 0000000..a55ee85
--- /dev/null
+++ b/utils/ledger/patches/0001-Fix-build-against-Boost-1.87.patch
@@ -0,0 +1,65 @@
+From 1ce2e0ddd268efbe1e058a5bff7cb788b9b8c75d Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Tue, 7 Jan 2025 18:44:40 +0100
+Subject: [PATCH] Fix build against Boost 1.87
+
+Upstream-Status: Pending
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/filters.cc | 2 +-
+ src/utils.h | 14 ++++++--------
+ 2 files changed, 7 insertions(+), 9 deletions(-)
+
+diff --git a/src/filters.cc b/src/filters.cc
+index f725c2474bc5..1fb2e7fabe88 100644
+--- a/src/filters.cc
++++ b/src/filters.cc
+@@ -238,7 +238,7 @@ void anonymize_posts::render_commodity(amount_t& amt)
+ void anonymize_posts::operator()(post_t& post)
+ {
+ boost::uuids::detail::sha1 sha;
+- unsigned int message_digest[5];
++ unsigned char message_digest[20];
+ bool copy_xact_details = false;
+
+ if (last_xact != post.xact) {
+diff --git a/src/utils.h b/src/utils.h
+index b09377b8f9ca..6672183ec21d 100644
+--- a/src/utils.h
++++ b/src/utils.h
+@@ -607,16 +607,14 @@ inline int peek_next_nonws(std::istream& in) {
+ *_p = '\0'; \
+ }
+
+-inline string to_hex(unsigned int * message_digest, const int len = 1)
++inline string to_hex(const unsigned char message_digest[], int len = 20)
+ {
+ std::ostringstream buf;
+
+- for(int i = 0; i < 5 ; i++) {
+- buf.width(8);
+- buf.fill('0');
++ buf.width(len);
++ buf.fill('0');
++ for(int i = 0; i < len ; i++) {
+ buf << std::hex << message_digest[i];
+- if (i + 1 >= len)
+- break; // only output the first LEN dwords
+ }
+ return buf.str();
+ }
+@@ -627,9 +625,9 @@ inline string sha1sum(const string& str)
+
+ sha.process_bytes(str.c_str(), str.length());
+
+- unsigned int message_digest[5];
++ unsigned char message_digest[20];
+ sha.get_digest(message_digest);
+- return to_hex(message_digest, 5);
++ return to_hex(message_digest);
+ }
+
+ extern const string version;
+--
+2.47.1
+


  • [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (ab0fc2deccacbce124137831493b27cb24f0d8a9), Ismael Luceno, 01/07/2025

Archive powered by MHonArc 2.6.24.

Top of Page