Commit graph

12 commits

Author SHA1 Message Date
clboss-contributor
4057154967 feat: add clang C++20 build job to CI
Add clang build configuration to catch C++20 compatibility issues early.

Changes:
- Add build-clang job to .github/workflows/build.yml
- Add missing #include<cstdint> for std::uint* types (clang strict mode)
- Add -lexecinfo for FreeBSD in configure.ac (backtrace_symbols)
- Fix pessimizing-move warning in test_earningsrebalancer.cpp
- Fix CHANGELOG.md formatting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 11:24:31 -08:00
Ken Sedgwick
39a09c2908 Use BacktraceException for appropriate (most) exceptions 2024-08-19 15:04:30 -07:00
Lakshya Singh
33292b5d3e gcc: Fix Compatibility Issue with GCC 13
This commit addresses a compatibility issue introduced by GCC
in version 13 (refer to [1]). The issue is present in both
the Arch base system and the latest version of Fedora.

To resolve this, the commit introduces a Kernel-mimicking approach
through a new `Compiler.hpp` file. In this file, we define various
compiler hacks required to enhance code readability by reducing verbosity.

For more details on the issue, see [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134

```
In file included from ./Boss/Msg/RequestPeerFromScid.hpp:4,
                 from Boss/Mod/PeerFromScidMapper.cpp:3:
./Ln/Scid.hpp:16:14: error: 'uint64_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
   16 |         std::uint64_t val;
      |              ^~~~~~~~
      |              wint_t
./Ln/Scid.hpp: In constructor 'Ln::Scid::Scid(std::nullptr_t)':
./Ln/Scid.hpp:19:44: error: class 'Ln::Scid' does not have any field named 'val'
   19 |         Scid(std::nullptr_t _ = nullptr) : val(0) { }
      |                                            ^~~
./Ln/Scid.hpp: In member function 'Ln::Scid::operator bool() const':
./Ln/Scid.hpp:25:24: error: 'val' was not declared in this scope
   25 |                 return val != 0;
      |                        ^~~
./Ln/Scid.hpp: In member function 'bool Ln::Scid::operator==(const Ln::Scid&) const':
./Ln/Scid.hpp:32:24: error: 'val' was not declared in this scope
   32 |                 return val == i.val;
      |                        ^~~
./Ln/Scid.hpp:32:33: error: 'const class Ln::Scid' has no member named 'val'
   32 |                 return val == i.val;
      |                                 ^~~
./Ln/Scid.hpp: In member function 'bool Ln::Scid::operator<(const Ln::Scid&) const':
./Ln/Scid.hpp:39:24: error: 'val' was not declared in this scope
   39 |                 return val < i.val;
      |                        ^~~
./Ln/Scid.hpp:39:32: error: 'const class Ln::Scid' has no member named 'val'
   39 |                 return val < i.val;
      |                                ^~~
/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.  -I./external/basicsecure/ -I./external/bitcoin-ripemd160/ -I./external/bitcoin-sha256/ -I./external/secp256k1/include/ -I./external/jsmn  -Wall -Werror -pthread    -Wno-noexcept-type -DUSE_VALGRIND -O2 -MT Boss/Mod/libclboss_la-UnmanagedManager.lo -MD -MP -MF Boss/Mod/.deps/libclboss_la-UnmanagedManager.Tpo -c -o Boss/Mod/libclboss_la-UnmanagedManager.lo `test -f 'Boss/Mod/UnmanagedManager.cpp' || echo './'`Boss/Mod/UnmanagedManager.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./external/basicsecure/ -I./external/bitcoin-ripemd160/ -I./external/bitcoin-sha256/ -I./external/secp256k1/include/ -I./external/jsmn -Wall -Werror -pthread -Wno-noexcept-type -DUSE_VALGRIND -O2 -MT Boss/Mod/libclboss_la-UnmanagedManager.lo -MD -MP -MF Boss/Mod/.deps/libclboss_la-UnmanagedManager.Tpo -c Boss/Mod/UnmanagedManager.cpp -o Boss/Mod/libclboss_la-UnmanagedManager.o

```

Reported-by: Lakshya Singh <@king-11>
Co-Developed-by: Lakshya Singh <@king-11>

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-08-18 12:34:08 -07:00
ZmnSCPxj jxPCSnmZ
6709bc255f Net/IPAddrOrOnion.cpp: Data type that could be either an IP address or onion hidden service. 2020-12-30 23:14:10 +00:00
ZmnSCPxj jxPCSnmZ
b501c1b895 Net/get_bin_of_onion.cpp: Function to invent a bin for hidden services. 2020-12-30 23:14:10 +00:00
ZmnSCPxj jxPCSnmZ
75d7fd1c15 Net/IPBinnerBySubnet.cpp: IP binner that just bins according to subnet. 2020-12-30 23:14:10 +00:00
ZmnSCPxj jxPCSnmZ
14e2ab96d1 Net/IPAddr.cpp: Class to represent actual IP addresses. 2020-12-30 23:14:10 +00:00
ZmnSCPxj jxPCSnmZ
c862046472 Net/ProxyConnector.cpp: Send the entire CONNECT sequence in a single write call instead of multiple ones. 2020-11-15 20:02:41 +08:00
ZmnSCPxj jxPCSnmZ
971beadaa1 Net/*: Follow proper standards for system types. 2020-11-09 05:59:53 +00:00
ZmnSCPxj jxPCSnmZ
82ce1dd111 Net/*: Add capability to connect to hosts. 2020-09-14 10:58:33 +08:00
ZmnSCPxj jxPCSnmZ
786920dbb1 Net/Fd.cpp: Preserve errno across the destructor. 2020-09-09 07:06:34 +08:00
ZmnSCPxj jxPCSnmZ
500c3b0435 Net/Fd.cpp: RAII class to handle file descriptors. 2020-09-07 20:12:28 +08:00