Skip to content

Commit 74c7f20

Browse files
Merge pull request #5789 from PastaPastaPasta/develop-trivial-2023-12-27
backport: trivial 2023 12 27
2 parents 0395299 + 5447f9d commit 74c7f20

File tree

17 files changed

+324
-38
lines changed

17 files changed

+324
-38
lines changed

configure.ac

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,8 @@ fi
8282
AC_PROG_OBJCXX
8383
])
8484

85-
dnl Since libtool 1.5.2 (released 2004-01-25), on Linux libtool no longer
86-
dnl sets RPATH for any directories in the dynamic linker search path.
87-
dnl See more: https://wiki.debian.org/RpathIssue
88-
LT_PREREQ([1.5.2])
85+
dnl OpenBSD ships with 2.4.2
86+
LT_PREREQ([2.4.2])
8987
dnl Libtool init checks.
9088
LT_INIT([pic-only win32-dll])
9189

@@ -1243,7 +1241,7 @@ dnl Do not change "-I/usr/include" to "-isystem /usr/include" because that
12431241
dnl is not necessary (/usr/include is already a system directory) and because
12441242
dnl it would break GCC's #include_next.
12451243
AC_DEFUN([SUPPRESS_WARNINGS],
1246-
[$(echo $1 |${SED} -E -e 's/(^| )-I/\1-isystem /g' -e 's;-isystem /usr/include([/ ]|$);-I/usr/include\1;g')])
1244+
[[$(echo $1 |${SED} -E -e 's/(^| )-I/\1-isystem /g' -e 's;-isystem /usr/include/*( |$);-I/usr/include\1;g')]])
12471245

12481246
dnl enable-fuzz should disable all other targets
12491247
if test "x$enable_fuzz" = "xyes"; then

contrib/devtools/test-symbol-check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def test_PE(self):
167167
executable = 'test3.exe'
168168
with open(source, 'w', encoding="utf8") as f:
169169
f.write('''
170-
#include <windows.h>
170+
#include <combaseapi.h>
171171
172172
int main()
173173
{

depends/hosts/openbsd.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
openbsd_CFLAGS=-pipe
2-
openbsd_CFLAGS_CXXFLAGS=$(openbsd_CFLAGS)
2+
openbsd_CXXFLAGS=$(openbsd_CFLAGS)
33

4-
openbsd_CFLAGS_release_CFLAGS=-O2
5-
openbsd_CFLAGS_release_CXXFLAGS=$(openbsd_release_CFLAGS)
4+
openbsd_release_CFLAGS=-O2
5+
openbsd_release_CXXFLAGS=$(openbsd_release_CFLAGS)
66

7-
openbsd_CFLAGS_debug_CFLAGS=-O1
8-
openbsd_CFLAGS_debug_CXXFLAGS=$(openbsd_debug_CFLAGS)
7+
openbsd_debug_CFLAGS=-O1
8+
openbsd_debug_CXXFLAGS=$(openbsd_debug_CFLAGS)
99

1010
ifeq (86,$(findstring 86,$(build_arch)))
1111
i686_openbsd_CC=clang -m32

depends/packages/libevent.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ define $(package)_stage_cmds
3636
endef
3737

3838
define $(package)_postprocess_cmds
39-
rm lib/*.la
39+
rm lib/*.la && \
40+
rm include/ev*.h
4041
endef

depends/patches/qt/mac-qmake.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@ QMAKE_MAC_SDK.macosx.PlatformPath = /phony
1919
!host_build: QMAKE_LFLAGS += -target $${MAC_TARGET}
2020
QMAKE_AR = $${CROSS_COMPILE}ar cq
2121
QMAKE_RANLIB=$${CROSS_COMPILE}ranlib
22-
QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool
23-
QMAKE_INSTALL_NAME_TOOL=$${CROSS_COMPILE}install_name_tool
2422
load(qt_config)

doc/build-freebsd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The following dependencies are **optional**:
3737
## Preparation
3838

3939
### 1. Install Required Dependencies
40-
Install the required dependencies the usual way you [install software on FreeBSD](https://www.freebsd.org/doc/en/books/handbook/ports.html) - either with `pkg` or via the Ports collection. The example commands below use `pkg` which is usually run as `root` or via `sudo`. If you want to use `sudo`, and you haven't set it up: [use this guide](http://www.freebsdwiki.net/index.php/Sudo%2C_configuring) to setup `sudo` access on FreeBSD.
40+
Run the following as root to install the base dependencies for building.
4141

4242
```bash
4343
pkg install autoconf automake boost-libs git gmake libevent libtool pkgconf

src/Makefile.test.include

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,19 @@ all-local: $(FUZZ_BINARY)
398398
endif
399399

400400
%.cpp.test: %.cpp
401-
@echo Running tests: `cat $< | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1` from $<
402-
$(AM_V_at)$(TEST_BINARY) --catch_system_errors=no -l test_suite -t "`cat $< | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1`" -- DEBUG_LOG_OUT > $<.log 2>&1 || (cat $<.log && false)
401+
@echo Running tests: $$(\
402+
cat $< | \
403+
grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
404+
cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\
405+
) from $<
406+
$(AM_V_at)export TEST_LOGFILE=$(abs_builddir)/$$(\
407+
echo $< | grep -E -o "(wallet/test/.*\.cpp|test/.*\.cpp)" | $(SED) -e s/\.cpp/.log/ \
408+
) && \
409+
$(TEST_BINARY) --catch_system_errors=no -l test_suite -t "$$(\
410+
cat $< | \
411+
grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
412+
cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\
413+
)" -- DEBUG_LOG_OUT > "$$TEST_LOGFILE" 2>&1 || (cat "$$TEST_LOGFILE" && false)
403414

404415
test/data/%.json.h: test/data/%.json
405416
@$(MKDIR_P) $(@D)

src/addrman.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class CAddrInfo : public CAddress
5858
mutable int nRandomPos{-1};
5959

6060
friend class CAddrMan;
61+
friend class CAddrManDeterministic;
6162

6263
public:
6364

@@ -808,6 +809,7 @@ class CAddrMan
808809
void ResetI2PPorts() EXCLUSIVE_LOCKS_REQUIRED(cs);
809810

810811
friend class CAddrManTest;
812+
friend class CAddrManDeterministic;
811813
};
812814

813815
#endif // BITCOIN_ADDRMAN_H

src/qt/bitcoin.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,17 @@ void BitcoinApplication::requestShutdown()
334334
window->setClientModel(nullptr);
335335
pollShutdownTimer->stop();
336336

337+
#ifdef ENABLE_WALLET
338+
// Delete wallet controller here manually, instead of relying on Qt object
339+
// tracking (https://doc.qt.io/qt-5/objecttrees.html). This makes sure
340+
// walletmodel m_handle_* notification handlers are deleted before wallets
341+
// are unloaded, which can simplify wallet implementations. It also avoids
342+
// these notifications having to be handled while GUI objects are being
343+
// destroyed, making GUI code less fragile as well.
344+
delete m_wallet_controller;
345+
m_wallet_controller = nullptr;
346+
#endif // ENABLE_WALLET
347+
337348
delete clientModel;
338349
clientModel = nullptr;
339350

@@ -414,6 +425,16 @@ WId BitcoinApplication::getMainWinId() const
414425
return window->winId();
415426
}
416427

428+
bool BitcoinApplication::event(QEvent* e)
429+
{
430+
if (e->type() == QEvent::Quit) {
431+
requestShutdown();
432+
return true;
433+
}
434+
435+
return QApplication::event(e);
436+
}
437+
417438
static void SetupUIArgs(ArgsManager& argsman)
418439
{
419440
argsman.AddArg("-choosedatadir", strprintf(QObject::tr("Choose data directory on startup (default: %u)").toStdString(), DEFAULT_CHOOSE_DATADIR), ArgsManager::ALLOW_ANY, OptionsCategory::GUI);

src/qt/bitcoin.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ public Q_SLOTS:
9898
void splashFinished();
9999
void windowShown(BitcoinGUI* window);
100100

101+
protected:
102+
bool event(QEvent* e) override;
103+
101104
private:
102105
QThread *coreThread;
103106
interfaces::Node& m_node;

0 commit comments

Comments
 (0)