Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
7f43e7ff
Commit
7f43e7ff
authored
Oct 19, 2019
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: build targeting Windows XP is broken
Solution: fix build issues
parent
92e32268
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
12 deletions
+17
-12
ip_resolver.cpp
src/ip_resolver.cpp
+2
-2
thread.cpp
src/thread.cpp
+4
-4
thread.hpp
src/thread.hpp
+5
-0
udp_address.cpp
src/udp_address.cpp
+1
-1
test_radio_dish.cpp
tests/test_radio_dish.cpp
+4
-4
testutil.cpp
tests/testutil.cpp
+1
-1
No files found.
src/ip_resolver.cpp
View file @
7f43e7ff
...
...
@@ -581,7 +581,7 @@ int zmq::ip_resolver_t::get_interface_name (unsigned long index_,
char
*
if_name_result
=
NULL
;
#if
!defined ZMQ_HAVE_WINDOWS_TARGET_
XP && !defined ZMQ_HAVE_WINDOWS_UWP
#if
_WIN32_WINNT > _WIN32_WINNT_WIN
XP && !defined ZMQ_HAVE_WINDOWS_UWP
if_name_result
=
if_indextoname
(
index_
,
buffer
);
#endif
...
...
@@ -724,7 +724,7 @@ void zmq::ip_resolver_t::do_freeaddrinfo (struct addrinfo *res_)
unsigned
int
zmq
::
ip_resolver_t
::
do_if_nametoindex
(
const
char
*
ifname_
)
{
#if
!defined ZMQ_HAVE_WINDOWS_TARGET_XP && !defined ZMQ_HAVE_WINDOWS_UWP
\
#if
_WIN32_WINNT > _WIN32_WINNT_WINXP && !defined ZMQ_HAVE_WINDOWS_UWP
\
&& !defined ZMQ_HAVE_VXWORKS
return
if_nametoindex
(
ifname_
);
#else
...
...
src/thread.cpp
View file @
7f43e7ff
...
...
@@ -65,10 +65,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
,
&
_thread_id
);
#else
_descriptor
=
(
HANDLE
)
_beginthreadex
(
NULL
,
0
,
&::
thread_routine
,
this
,
0
,
NULL
);
_descriptor
=
(
HANDLE
)
_beginthreadex
(
NULL
,
0
,
&::
thread_routine
,
this
,
0
,
&
_thread_id
);
#endif
win_assert
(
_descriptor
!=
NULL
);
_started
=
true
;
...
...
@@ -76,7 +76,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
()
==
_thread_id
;
}
void
zmq
::
thread_t
::
stop
()
...
...
src/thread.hpp
View file @
7f43e7ff
...
...
@@ -107,6 +107,11 @@ class thread_t
#ifdef ZMQ_HAVE_WINDOWS
HANDLE
_descriptor
;
#if defined _WIN32_WCE
DWORD
_thread_id
;
#else
unsigned
int
_thread_id
;
#endif
#elif defined ZMQ_HAVE_VXWORKS
int
_descriptor
;
enum
...
...
src/udp_address.cpp
View file @
7f43e7ff
...
...
@@ -104,7 +104,7 @@ int zmq::udp_address_t::resolve (const char *name_, bool bind_, bool ipv6_)
if
(
src_name
==
"*"
)
{
_bind_interface
=
0
;
}
else
{
#if
!defined ZMQ_HAVE_WINDOWS_TARGET_XP && !defined ZMQ_HAVE_WINDOWS_UWP
\
#if
_WIN32_WINNT > _WIN32_WINNT_WINXP && !defined ZMQ_HAVE_WINDOWS_UWP
\
&& !defined ZMQ_HAVE_VXWORKS
_bind_interface
=
if_nametoindex
(
src_name
.
c_str
());
if
(
_bind_interface
==
0
)
{
...
...
tests/test_radio_dish.cpp
View file @
7f43e7ff
...
...
@@ -299,14 +299,14 @@ static bool is_multicast_available (int ipv6_)
any_ipv6
->
sin6_flowinfo
=
0
;
any_ipv6
->
sin6_scope_id
=
0
;
rc
=
inet_pton
(
AF_INET6
,
"::"
,
&
any_ipv6
->
sin6_addr
);
rc
=
test_
inet_pton
(
AF_INET6
,
"::"
,
&
any_ipv6
->
sin6_addr
);
if
(
rc
==
0
)
{
goto
out
;
}
*
mcast_ipv6
=
*
any_ipv6
;
rc
=
inet_pton
(
AF_INET6
,
MCAST_IPV6
,
&
mcast_ipv6
->
sin6_addr
);
rc
=
test_
inet_pton
(
AF_INET6
,
MCAST_IPV6
,
&
mcast_ipv6
->
sin6_addr
);
if
(
rc
==
0
)
{
goto
out
;
}
...
...
@@ -319,14 +319,14 @@ static bool is_multicast_available (int ipv6_)
any_ipv4
->
sin_family
=
AF_INET
;
any_ipv4
->
sin_port
=
htons
(
5555
);
rc
=
inet_pton
(
AF_INET
,
"0.0.0.0"
,
&
any_ipv4
->
sin_addr
);
rc
=
test_
inet_pton
(
AF_INET
,
"0.0.0.0"
,
&
any_ipv4
->
sin_addr
);
if
(
rc
==
0
)
{
goto
out
;
}
*
mcast_ipv4
=
*
any_ipv4
;
rc
=
inet_pton
(
AF_INET
,
MCAST_IPV4
,
&
mcast_ipv4
->
sin_addr
);
rc
=
test_
inet_pton
(
AF_INET
,
MCAST_IPV4
,
&
mcast_ipv4
->
sin_addr
);
if
(
rc
==
0
)
{
goto
out
;
}
...
...
tests/testutil.cpp
View file @
7f43e7ff
...
...
@@ -38,7 +38,7 @@
#include <crtdbg.h>
#pragma warning(disable : 4996)
// iphlpapi is needed for if_nametoindex (not on Windows XP)
#if
!defined ZMQ_HAVE_WINDOWS_TARGET_
XP
#if
_WIN32_WINNT > _WIN32_WINNT_WIN
XP
#pragma comment(lib, "iphlpapi")
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment