Skip to content

Commit 982f8d5

Browse files
committed
Merge branch 'auxpow-29.x' into 29.x
2 parents dcea925 + fb3a734 commit 982f8d5

21 files changed

+249
-64
lines changed

CMakePresets.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"version": 3,
3-
"cmakeMinimumRequired": {"major": 3, "minor": 21, "patch": 0},
43
"configurePresets": [
54
{
65
"name": "vs2022",

depends/builders/freebsd.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ build_freebsd_CXX=clang++
33

44
build_freebsd_SHA256SUM = sha256sum
55
build_freebsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
6+
7+
# freebsd host on freebsd builder: override freebsd host preferences.
8+
freebsd_CC = clang
9+
freebsd_CXX = clang++

depends/builders/openbsd.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ build_openbsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CON
77
build_openbsd_TAR = gtar
88
# openBSD touch doesn't understand -h
99
build_openbsd_TOUCH = touch -m -t 200001011200
10+
11+
# openbsd host on openbsd builder: override openbsd host preferences.
12+
openbsd_CC = clang
13+
openbsd_CXX = clang++

depends/funcs.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ $(1)_cmake=env CC="$$($(1)_cc)" \
187187
-DCMAKE_INSTALL_LIBDIR=lib/ \
188188
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
189189
-DCMAKE_VERBOSE_MAKEFILE:BOOL=$(V) \
190+
-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY:BOOL=TRUE \
190191
$$($(1)_config_opts)
191192
ifeq ($($(1)_type),build)
192193
$(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib"

depends/packages/libevent.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ $(package)_file_name=$(package)-$($(package)_version).tar.gz
55
$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
66
$(package)_patches=cmake_fixups.patch
77
$(package)_patches += netbsd_fixup.patch
8+
$(package)_patches += winver_fixup.patch
89
$(package)_build_subdir=build
910

1011
# When building for Windows, we set _WIN32_WINNT to target the same Windows
@@ -25,7 +26,8 @@ endef
2526

2627
define $(package)_preprocess_cmds
2728
patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch && \
28-
patch -p1 < $($(package)_patch_dir)/netbsd_fixup.patch
29+
patch -p1 < $($(package)_patch_dir)/netbsd_fixup.patch && \
30+
patch -p1 < $($(package)_patch_dir)/winver_fixup.patch
2931
endef
3032

3133
define $(package)_config_cmds
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
Cherry-picked from a14ff91254f40cf36e0fee199e26fb11260fab49.
2+
3+
move _WIN32_WINNT defintions before first #include
4+
5+
_WIN32_WINNT and WIN32_LEAN_AND_MEAN need to be defined
6+
before the windows.h is included for the first time.
7+
Avoid the confusion of indirect #include by defining
8+
before any.
9+
10+
diff --git a/event_iocp.c b/event_iocp.c
11+
index 6b2a2e15..4955e426 100644
12+
--- a/event_iocp.c
13+
+++ b/event_iocp.c
14+
@@ -23,12 +23,14 @@
15+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
16+
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17+
*/
18+
-#include "evconfig-private.h"
19+
20+
#ifndef _WIN32_WINNT
21+
/* Minimum required for InitializeCriticalSectionAndSpinCount */
22+
#define _WIN32_WINNT 0x0403
23+
#endif
24+
+
25+
+#include "evconfig-private.h"
26+
+
27+
#include <winsock2.h>
28+
#include <windows.h>
29+
#include <process.h>
30+
diff --git a/evthread_win32.c b/evthread_win32.c
31+
index 2ec80560..8647f72b 100644
32+
--- a/evthread_win32.c
33+
+++ b/evthread_win32.c
34+
@@ -23,18 +23,21 @@
35+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36+
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37+
*/
38+
-#include "event2/event-config.h"
39+
-#include "evconfig-private.h"
40+
41+
#ifdef _WIN32
42+
#ifndef _WIN32_WINNT
43+
/* Minimum required for InitializeCriticalSectionAndSpinCount */
44+
#define _WIN32_WINNT 0x0403
45+
#endif
46+
-#include <winsock2.h>
47+
#define WIN32_LEAN_AND_MEAN
48+
+#endif
49+
+
50+
+#include "event2/event-config.h"
51+
+#include "evconfig-private.h"
52+
+
53+
+#ifdef _WIN32
54+
+#include <winsock2.h>
55+
#include <windows.h>
56+
-#undef WIN32_LEAN_AND_MEAN
57+
#include <sys/locking.h>
58+
#endif
59+
60+
diff --git a/evutil.c b/evutil.c
61+
index 9817f086..8537ffe8 100644
62+
--- a/evutil.c
63+
+++ b/evutil.c
64+
@@ -24,6 +24,14 @@
65+
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66+
*/
67+
68+
+#ifdef _WIN32
69+
+#ifndef _WIN32_WINNT
70+
+/* For structs needed by GetAdaptersAddresses */
71+
+#define _WIN32_WINNT 0x0501
72+
+#endif
73+
+#define WIN32_LEAN_AND_MEAN
74+
+#endif
75+
+
76+
#include "event2/event-config.h"
77+
#include "evconfig-private.h"
78+
79+
@@ -31,15 +39,10 @@
80+
#include <winsock2.h>
81+
#include <winerror.h>
82+
#include <ws2tcpip.h>
83+
-#define WIN32_LEAN_AND_MEAN
84+
#include <windows.h>
85+
-#undef WIN32_LEAN_AND_MEAN
86+
#include <io.h>
87+
#include <tchar.h>
88+
#include <process.h>
89+
-#undef _WIN32_WINNT
90+
-/* For structs needed by GetAdaptersAddresses */
91+
-#define _WIN32_WINNT 0x0501
92+
#include <iphlpapi.h>
93+
#include <netioapi.h>
94+
#endif
95+
diff --git a/listener.c b/listener.c
96+
index f5c00c9c..d1080e76 100644
97+
--- a/listener.c
98+
+++ b/listener.c
99+
@@ -24,16 +24,19 @@
100+
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
101+
*/
102+
103+
+#ifdef _WIN32
104+
+#ifndef _WIN32_WINNT
105+
+/* Minimum required for InitializeCriticalSectionAndSpinCount */
106+
+#define _WIN32_WINNT 0x0403
107+
+#endif
108+
+#endif
109+
+
110+
#include "event2/event-config.h"
111+
#include "evconfig-private.h"
112+
113+
#include <sys/types.h>
114+
115+
#ifdef _WIN32
116+
-#ifndef _WIN32_WINNT
117+
-/* Minimum required for InitializeCriticalSectionAndSpinCount */
118+
-#define _WIN32_WINNT 0x0403
119+
-#endif
120+
#include <winsock2.h>
121+
#include <winerror.h>
122+
#include <ws2tcpip.h>

doc/build-freebsd.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,6 @@ cmake -B build -DENABLE_WALLET=OFF
129129
### 2. Compile
130130

131131
```bash
132-
cmake --build build # Use "-j N" for N parallel jobs.
133-
ctest --test-dir build # Use "-j N" for N parallel tests. Some tests are disabled if Python 3 is not available.
132+
cmake --build build # Append "-j N" for N parallel jobs.
133+
ctest --test-dir build # Append "-j N" for N parallel tests. Some tests are disabled if Python 3 is not available.
134134
```

doc/build-netbsd.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,6 @@ Run `cmake -B build -LH` to see the full list of available options.
118118
Build and run the tests:
119119

120120
```bash
121-
cmake --build build # Use "-j N" for N parallel jobs.
122-
ctest --test-dir build # Use "-j N" for N parallel tests. Some tests are disabled if Python 3 is not available.
121+
cmake --build build # Append "-j N" for N parallel jobs.
122+
ctest --test-dir build # Append "-j N" for N parallel tests. Some tests are disabled if Python 3 is not available.
123123
```

doc/build-openbsd.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ cmake -B build -DBerkeleyDB_INCLUDE_DIR:PATH="${BDB_PREFIX}/include" -DWITH_BDB=
118118
### 2. Compile
119119

120120
```bash
121-
cmake --build build # Use "-j N" for N parallel jobs.
122-
ctest --test-dir build # Use "-j N" for N parallel tests. Some tests are disabled if Python 3 is not available.
121+
cmake --build build # Append "-j N" for N parallel jobs.
122+
ctest --test-dir build # Append "-j N" for N parallel tests. Some tests are disabled if Python 3 is not available.
123123
```
124124

125125
## Resource limits

doc/build-osx.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ After configuration, you are ready to compile.
191191
Run the following in your terminal to compile Namecoin Core:
192192

193193
``` bash
194-
cmake --build build # Use "-j N" here for N parallel jobs.
195-
ctest --test-dir build # Use "-j N" for N parallel tests. Some tests are disabled if Python 3 is not available.
194+
cmake --build build # Append "-j N" here for N parallel jobs.
195+
ctest --test-dir build # Append "-j N" for N parallel tests. Some tests are disabled if Python 3 is not available.
196196
```
197197

198198
### 3. Deploy (optional)

0 commit comments

Comments
 (0)