Update deps (#1348)

* Update submodules/static deps to latest versions

* Add mingw zmq build patch

* Drop support for Windows 2000
pull/1355/head
Jason Rhinelander 4 years ago committed by GitHub
parent c64c9093f2
commit f5e5066bd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,17 +19,17 @@ set(EXPAT_SOURCE expat-${EXPAT_VERSION}.tar.xz)
set(EXPAT_HASH SHA512=e082874efcc4b00709e2c0192c88fb15dfc4f33fc3a2b09e619b010ea93baaf7e7572683f738463db0ce2350cab3de48a0c38af6b74d1c4f5a9e311f499edab0
CACHE STRING "expat source hash")
set(UNBOUND_VERSION 1.10.1 CACHE STRING "unbound version")
set(UNBOUND_VERSION 1.11.0 CACHE STRING "unbound version")
set(UNBOUND_MIRROR ${LOCAL_MIRROR} https://nlnetlabs.nl/downloads/unbound CACHE STRING "unbound download mirror(s)")
set(UNBOUND_SOURCE unbound-${UNBOUND_VERSION}.tar.gz)
set(UNBOUND_HASH SHA256=b73677c21a71cf92f15cc8cfe76a3d875e40f65b6150081c39620b286582d536
set(UNBOUND_HASH SHA256=9f2f0798f76eb8f30feaeda7e442ceed479bc54db0e3ac19c052d68685e51ef7
CACHE STRING "unbound source hash")
set(SQLITE3_VERSION 3320300 CACHE STRING "sqlite3 version")
set(SQLITE3_VERSION 3330000 CACHE STRING "sqlite3 version")
set(SQLITE3_MIRROR ${LOCAL_MIRROR} https://www.sqlite.org/2020
CACHE STRING "sqlite3 download mirror(s)")
set(SQLITE3_SOURCE sqlite-autoconf-${SQLITE3_VERSION}.tar.gz)
set(SQLITE3_HASH SHA512=add0ef47c059be0a75add7ab4fe52b2fbd4060cacbf1cbb93f1b4007cdeb8fc92256b1aadc224c4839e733fb868e56d9d73dd33c56a6f66180d1ff001d8d275e
set(SQLITE3_HASH SHA512=c0d79d4012a01f12128ab5044b887576a130663245b85befcc0ab82ad3a315dd1e7f54b6301f842410c9c21b73237432c44a1d7c2fe0e0709435fec1f1a20a11
CACHE STRING "sqlite3 source hash")
set(SODIUM_VERSION 1.0.18 CACHE STRING "libsodium version")
@ -41,11 +41,11 @@ set(SODIUM_SOURCE libsodium-${SODIUM_VERSION}.tar.gz)
set(SODIUM_HASH SHA512=17e8638e46d8f6f7d024fe5559eccf2b8baf23e143fadd472a7d29d228b186d86686a5e6920385fe2020729119a5f12f989c3a782afbd05a8db4819bb18666ef
CACHE STRING "libsodium source hash")
set(ZMQ_VERSION 4.3.2 CACHE STRING "libzmq version")
set(ZMQ_VERSION 4.3.3 CACHE STRING "libzmq version")
set(ZMQ_MIRROR ${LOCAL_MIRROR} https://github.com/zeromq/libzmq/releases/download/v${ZMQ_VERSION}
CACHE STRING "libzmq mirror(s)")
set(ZMQ_SOURCE zeromq-${ZMQ_VERSION}.tar.gz)
set(ZMQ_HASH SHA512=b6251641e884181db9e6b0b705cced7ea4038d404bdae812ff47bdd0eed12510b6af6846b85cb96898e253ccbac71eca7fe588673300ddb9c3109c973250c8e4
set(ZMQ_HASH SHA512=4c18d784085179c5b1fcb753a93813095a12c8d34970f2e1bfca6499be6c9d67769c71c68b7ca54ff181b20390043170e89733c22f76ff1ea46494814f7095b1
CACHE STRING "libzmq source hash")
@ -204,10 +204,9 @@ build_external(sqlite3)
add_static_target(sqlite3 sqlite3_external libsqlite3.a)
if(ZMQ_VERSION VERSION_LESS 4.3.3 AND CMAKE_CROSSCOMPILING AND ARCH_TRIPLET MATCHES mingw)
if(ZMQ_VERSION VERSION_LESS 4.3.4 AND CMAKE_CROSSCOMPILING AND ARCH_TRIPLET MATCHES mingw)
set(zmq_patch
#PATCH_COMMAND patch -p1 -i ${PROJECT_SOURCE_DIR}/contrib/cross/patches/libzmq-pr3601-mingw-build-fix.patch)
PATCH_COMMAND patch -p1 -i ${PROJECT_SOURCE_DIR}/contrib/cross/patches/libzmq-win32-release.patch)
PATCH_COMMAND patch -p1 -i ${PROJECT_SOURCE_DIR}/contrib/cross/patches/libzmq-mingw-closesocket.patch)
endif()
build_external(zmq
DEPENDS sodium_external

@ -15,7 +15,7 @@ if(NOT MSVC_VERSION)
add_compile_options(-fno-ident -Wa,-mbig-obj)
link_libraries( -lws2_32 -lshlwapi -ldbghelp -luser32 -liphlpapi -lpsapi -luserenv )
# zmq requires windows xp or higher
add_definitions(-DWINVER=0x0500 -D_WIN32_WINNT=0x0500)
add_definitions(-DWINVER=0x0501 -D_WIN32_WINNT=0x0501)
endif()
if(EMBEDDED_CFG)

@ -0,0 +1,12 @@
diff --git a/tests/testutil.hpp b/tests/testutil.hpp
index c6f5e4de..6a1c8bb8 100644
--- a/tests/testutil.hpp
+++ b/tests/testutil.hpp
@@ -102,7 +102,6 @@ const uint8_t zmtp_ready_sub[27] = {
#include <winsock2.h>
#include <ws2tcpip.h>
#include <stdexcept>
-#define close closesocket
typedef int socket_size_t;
inline const char *as_setsockopt_opt_t (const void *opt)
{

@ -1,69 +0,0 @@
diff --git a/src/thread.cpp b/src/thread.cpp
index b14d70757..3675899be 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -32,6 +32,10 @@
#include "thread.hpp"
#include "err.hpp"
+#ifdef ZMQ_HAVE_WINDOWS
+#include <winnt.h>
+#endif
+
bool zmq::thread_t::get_started () const
{
return _started;
@@ -113,10 +117,22 @@ struct thread_info_t
#pragma pack(pop)
}
+typedef struct _MY_EXCEPTION_REGISTRATION_RECORD
+{
+ struct _MY_EXCEPTION_REGISTRATION_RECORD *Next;
+ void *Handler;
+} MY_EXCEPTION_REGISTRATION_RECORD;
+
+static EXCEPTION_DISPOSITION NTAPI continue_execution (EXCEPTION_RECORD *rec,
+ void *frame, CONTEXT *ctx, void *disp)
+{
+ return ExceptionContinueExecution;
+}
+
void zmq::thread_t::
applyThreadName () // to be called in secondary thread context
{
- if (!_name[0])
+ if (!_name[0] || !IsDebuggerPresent())
return;
thread_info_t thread_info;
@@ -125,17 +141,19 @@ void zmq::thread_t::
thread_info._thread_id = -1;
thread_info._flags = 0;
-#pragma warning(push)
-#pragma warning(disable : 6320 6322)
- __try {
- DWORD MS_VC_EXCEPTION = 0x406D1388;
+ NT_TIB *tib = ((NT_TIB*)NtCurrentTeb());
+
+ MY_EXCEPTION_REGISTRATION_RECORD rec;
+ rec.Next = (MY_EXCEPTION_REGISTRATION_RECORD *)tib->ExceptionList;
+ rec.Handler = continue_execution;
+
+ // push our handler, raise, and finally pop our handler
+ tib->ExceptionList = (_EXCEPTION_REGISTRATION_RECORD *)&rec;
+ DWORD MS_VC_EXCEPTION = 0x406D1388;
RaiseException (MS_VC_EXCEPTION, 0,
- sizeof (thread_info) / sizeof (ULONG_PTR),
- (ULONG_PTR *) &thread_info);
- }
- __except (EXCEPTION_CONTINUE_EXECUTION) {
- }
-#pragma warning(pop)
+ sizeof (thread_info) / sizeof (ULONG_PTR),
+ (ULONG_PTR *) &thread_info);
+ tib->ExceptionList = (_EXCEPTION_REGISTRATION_RECORD *)(((MY_EXCEPTION_REGISTRATION_RECORD *)tib->ExceptionList)->Next);
}
#elif defined ZMQ_HAVE_VXWORKS

@ -1,43 +0,0 @@
diff --git a/RELICENSE/tomzbench.md b/RELICENSE/tomzbench.md
new file mode 100644
index 000000000..1cbcc4fdb
--- /dev/null
+++ b/RELICENSE/tomzbench.md
@@ -0,0 +1,14 @@
+# Permission to Relicense under MPLv2
+
+This is a statement by Thomas Chiantia
+that grants permission to relicense its copyrights in the libzmq C++
+library (ZeroMQ) under the Mozilla Public License v2 (MPLv2).
+
+A portion of the commits made by the Github handle "tomzbench", with
+commit author "Thomas<Thomas@Altronix.com>", are copyright of
+Thomas Chiantia.
+This document hereby grants the libzmq project team to relicense libzmq,
+including all past, present and future contributions of the author listed above.
+
+Thomas Chiantia
+2019/08/10
diff --git a/src/thread.cpp b/src/thread.cpp
index 2cad2adaa..6f07e9cee 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -117,11 +117,14 @@ struct thread_info_t
#pragma pack(pop)
}
-typedef struct _MY_EXCEPTION_REGISTRATION_RECORD
+struct MY_EXCEPTION_REGISTRATION_RECORD
{
- struct _MY_EXCEPTION_REGISTRATION_RECORD *Next;
- void *Handler;
-} MY_EXCEPTION_REGISTRATION_RECORD;
+ typedef EXCEPTION_DISPOSITION (NTAPI *HandlerFunctionType) (
+ EXCEPTION_RECORD *, void *, CONTEXT *, void *);
+
+ MY_EXCEPTION_REGISTRATION_RECORD *Next;
+ HandlerFunctionType Handler;
+};
static EXCEPTION_DISPOSITION NTAPI continue_execution (EXCEPTION_RECORD *rec,
void *frame,

@ -1,198 +0,0 @@
From 00440f91ebbae83d7d2aeb429b306bee27f3b165 Mon Sep 17 00:00:00 2001
From: Rick V <rick@snowlight.net>
Date: Wed, 31 Oct 2019 17:20:05 -0500
Subject: ZMQ patches for Windows
Configure with: ./configure [--host=i686-w64-mingw32 --target=i686-w64-mingw32] --disable-shared
CFLAGS='-march=nocona -mfpmath=sse -O3' CPPFLAGS=-DZMQ_HAVE_WINDOWS_TARGET_XP
-rick
---
diff --git a/include/zmq.h b/include/zmq.h
index f5713f80..bb7b818e 100644
--- a/include/zmq.h
+++ b/include/zmq.h
@@ -65,14 +65,9 @@ extern "C" {
#endif
#ifdef __MINGW32__
-// Require Windows XP or higher with MinGW for getaddrinfo().
-#if (_WIN32_WINNT >= 0x0501)
-#else
-#error You need at least Windows XP target
-#endif
-#endif
#include <winsock2.h>
#endif
+#endif
/* Handle DSO symbol visibility */
#if defined _WIN32
diff --git a/src/address.hpp b/src/address.hpp
index b20a10e5..f848ec2b 100644
--- a/src/address.hpp
+++ b/src/address.hpp
@@ -38,6 +38,7 @@
#include <sys/socket.h>
#else
#include <ws2tcpip.h>
+#include <wspiapi.h>
#endif
namespace zmq
diff --git a/src/ip_resolver.cpp b/src/ip_resolver.cpp
index 4a8283de..a8b6fe6c 100644
--- a/src/ip_resolver.cpp
+++ b/src/ip_resolver.cpp
@@ -595,6 +595,7 @@ int zmq::ip_resolver_t::wchar_to_utf8 (const WCHAR *src_, char **dest_) const
return 0;
}
+#if !defined ZMQ_HAVE_WINDOWS_TARGET_XP
int zmq::ip_resolver_t::resolve_nic_name (ip_addr_t *ip_addr_, const char *nic_)
{
int rc;
@@ -674,6 +675,17 @@ int zmq::ip_resolver_t::resolve_nic_name (ip_addr_t *ip_addr_, const char *nic_)
}
return 0;
}
+#else
+// On other platforms we assume there are no sane interface names.
+int zmq::ip_resolver_t::resolve_nic_name (ip_addr_t *ip_addr_, const char *nic_)
+{
+ LIBZMQ_UNUSED (ip_addr_);
+ LIBZMQ_UNUSED (nic_);
+
+ errno = ENODEV;
+ return -1;
+}
+#endif
#else
diff --git a/src/precompiled.hpp b/src/precompiled.hpp
index f22a6937..45e5ba10 100644
--- a/src/precompiled.hpp
+++ b/src/precompiled.hpp
@@ -85,6 +85,7 @@
#include <time.h>
#include <winsock2.h>
#include <ws2tcpip.h>
+#include <wspiapi.h>
// standard C++ headers
#include <algorithm>
diff --git a/src/thread.cpp b/src/thread.cpp
index b14d7075..923d6a3d 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -61,10 +61,10 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_, const char *name_)
strncpy (_name, name_, sizeof (_name) - 1);
#if defined _WIN32_WCE
_descriptor =
- (HANDLE) CreateThread (NULL, 0, &::thread_routine, this, 0, NULL);
+ (HANDLE) CreateThread (NULL, 0, &::thread_routine, this, 0, &_threadID);
#else
_descriptor =
- (HANDLE) _beginthreadex (NULL, 0, &::thread_routine, this, 0, NULL);
+ (HANDLE) _beginthreadex (NULL, 0, &::thread_routine, this, 0, &_threadID);
#endif
win_assert (_descriptor != NULL);
_started = true;
@@ -72,7 +72,7 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_, const char *name_)
bool zmq::thread_t::is_current_thread () const
{
- return GetCurrentThreadId () == GetThreadId (_descriptor);
+ return GetCurrentThreadId () == _threadID;
}
void zmq::thread_t::stop ()
@@ -124,7 +124,7 @@ void zmq::thread_t::
thread_info._name = _name;
thread_info._thread_id = -1;
thread_info._flags = 0;
-
+#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 6320 6322)
__try {
@@ -136,6 +136,9 @@ void zmq::thread_t::
__except (EXCEPTION_CONTINUE_EXECUTION) {
}
#pragma warning(pop)
+#else
+(void)thread_info;
+#endif
}
#elif defined ZMQ_HAVE_VXWORKS
diff --git a/src/thread.hpp b/src/thread.hpp
index b13fc923..b4429af4 100644
--- a/src/thread.hpp
+++ b/src/thread.hpp
@@ -107,6 +107,7 @@ class thread_t
#ifdef ZMQ_HAVE_WINDOWS
HANDLE _descriptor;
+ unsigned _threadID;
#elif defined ZMQ_HAVE_VXWORKS
int _descriptor;
enum
diff --git a/src/udp_address.cpp b/src/udp_address.cpp
index d0dda564..1228e621 100644
--- a/src/udp_address.cpp
+++ b/src/udp_address.cpp
@@ -104,7 +104,11 @@ int zmq::udp_address_t::resolve (const char *name_, bool bind_, bool ipv6_)
if (src_name == "*") {
_bind_interface = 0;
} else {
+#ifndef _WIN32
_bind_interface = if_nametoindex (src_name.c_str ());
+#else
+ _bind_interface = 0;
+#endif
if (_bind_interface == 0) {
// Error, probably not an interface name.
_bind_interface = -1;
diff --git a/src/windows.hpp b/src/windows.hpp
index 2d3b4985..78c071a7 100644
--- a/src/windows.hpp
+++ b/src/windows.hpp
@@ -47,14 +47,6 @@
#define _WIN32_WINNT _WIN32_WINNT_WIN10
#endif
-#ifdef __MINGW32__
-// Require Windows XP or higher with MinGW for getaddrinfo().
-#if (_WIN32_WINNT >= 0x0501)
-#else
-#error You need at least Windows XP target
-#endif
-#endif
-
#include <winsock2.h>
#include <windows.h>
#include <mswsock.h>
@@ -78,6 +70,7 @@ struct tcp_keepalive
#endif
#include <ws2tcpip.h>
+#include <wspiapi.h>
#include <ipexport.h>
#if !defined _WIN32_WCE
#include <process.h>
diff --git a/tests/testutil_monitoring.cpp b/tests/testutil_monitoring.cpp
index 75bd763c..7fb8dedb 100644
--- a/tests/testutil_monitoring.cpp
+++ b/tests/testutil_monitoring.cpp
@@ -26,6 +26,7 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#define __USE_MINGW_ANSI_STDIO 1
#include "testutil_monitoring.hpp"
#include "testutil_unity.hpp"

2
external/date vendored

@ -1 +1 @@
Subproject commit 9a0ee2542848ab8625984fc8cdbfb9b5414c0082
Subproject commit cac99da8dc88be719a728dc1b597b0ac307c1800

@ -1 +1 @@
Subproject commit e63a58c5bac94a3a75a7083f87bb092531407a92
Subproject commit d8abf146a43ea12d28b09dfa71ece3bad4168185

2
external/libuv vendored

@ -1 +1 @@
Subproject commit f52786b4badf82e1bfad06b52ade0397b61cd14e
Subproject commit 25f4b8b8a3c0f934158cd37a37b0525d75ca488e

2
external/loki-mq vendored

@ -1 +1 @@
Subproject commit 30faadf01a561be8bda1b9fd78cd606bb209576a
Subproject commit 0ac1d48bc8058bab4f10aeb3010343084f7a37d0

2
external/pybind11 vendored

@ -1 +1 @@
Subproject commit fe755dce12766820a99eefbde32d6ceb0a828ca8
Subproject commit 3b1dbebabc801c9cf6f0953a4c20b904d444f879

@ -1 +1 @@
Subproject commit f7ef17a6bde6162e8b487deb36519bace412920a
Subproject commit b30ddc6a50dc582c93cd49d8d0cf8f5025ba1d2b
Loading…
Cancel
Save