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
027990a1
Commit
027990a1
authored
Nov 01, 2013
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #732 from Hugne/tipc
zmq: narrow condition to include TIPC in build/test
parents
299068b5
58ac87de
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
48 additions
and
14 deletions
+48
-14
configure.ac
configure.ac
+34
-0
address.cpp
src/address.cpp
+2
-2
session_base.cpp
src/session_base.cpp
+1
-1
socket_base.cpp
src/socket_base.cpp
+3
-3
tipc_address.cpp
src/tipc_address.cpp
+1
-1
tipc_address.hpp
src/tipc_address.hpp
+1
-1
tipc_connecter.cpp
src/tipc_connecter.cpp
+1
-1
tipc_connecter.hpp
src/tipc_connecter.hpp
+1
-1
tipc_listener.cpp
src/tipc_listener.cpp
+1
-1
tipc_listener.hpp
src/tipc_listener.hpp
+1
-1
Makefile.am
tests/Makefile.am
+2
-2
No files found.
configure.ac
View file @
027990a1
...
...
@@ -63,6 +63,36 @@ LIBZMQ_CHECK_ENABLE_DEBUG
# Check wheter to enable code coverage
LIBZMQ_WITH_GCOV
AC_MSG_CHECKING([if TIPC is available and supports nonblocking connect])
AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/socket.h>
#include <linux/tipc.h>
]],[[
struct sockaddr_tipc topsrv;
int sd = socket(AF_TIPC, SOCK_SEQPACKET, 0);
if (sd == -EAFNOSUPPORT) {
return 1;
}
memset(&topsrv, 0, sizeof(topsrv));
topsrv.family = AF_TIPC;
topsrv.addrtype = TIPC_ADDR_NAME;
topsrv.addr.name.name.type = TIPC_TOP_SRV;
topsrv.addr.name.name.instance = TIPC_TOP_SRV;
fcntl(sd, F_SETFL, O_NONBLOCK);
if (connect(sd, (struct sockaddr *)&topsrv,
sizeof(topsrv)) != 0) {
if (errno != EINPROGRESS)
return -1;
}]])
],
[libzmq_tipc_support=yes],
[libzmq_tipc_support=no],
[libzmq_tipc_support=no])
AC_MSG_RESULT([$libzmq_tipc_support])
# Allow libsodium to be installed in a custom path:
AC_ARG_WITH([libsodium],
...
...
@@ -141,6 +171,9 @@ case "${host_os}" in
AC_DEFINE(ZMQ_HAVE_LINUX, 1, [Have Linux OS])
libzmq_on_linux="yes"
if test "x$libzmq_tipc_support" = "xyes"; then
AC_DEFINE(ZMQ_HAVE_TIPC, 1, [Have TIPC support])
fi
case "${host_os}" in
*android*)
AC_DEFINE(ZMQ_HAVE_ANDROID, 1, [Have Android OS])
...
...
@@ -436,6 +469,7 @@ if test "x$libzmq_pedantic" = "xyes"; then
fi
AC_LANG_POP([C++])
AM_CONDITIONAL(BUILD_TIPC, test "x$libzmq_tipc_support" = "xyes")
AM_CONDITIONAL(BUILD_PGM, test "x$libzmq_pgm_ext" = "xyes")
AM_CONDITIONAL(ON_MINGW, test "x$libzmq_on_mingw32" = "xyes")
AM_CONDITIONAL(ON_ANDROID, test "x$libzmq_on_android" = "xyes")
...
...
src/address.cpp
View file @
027990a1
...
...
@@ -52,7 +52,7 @@ zmq::address_t::~address_t ()
}
}
#endif
#if defined ZMQ_HAVE_
LINUX
#if defined ZMQ_HAVE_
TIPC
else
if
(
protocol
==
"tipc"
)
{
if
(
resolved
.
tipc_addr
)
{
delete
resolved
.
tipc_addr
;
...
...
@@ -75,7 +75,7 @@ int zmq::address_t::to_string (std::string &addr_) const
return
resolved
.
ipc_addr
->
to_string
(
addr_
);
}
#endif
#if defined ZMQ_HAVE_
LINUX
#if defined ZMQ_HAVE_
TIPC
else
if
(
protocol
==
"tipc"
)
{
if
(
resolved
.
tipc_addr
)
{
return
resolved
.
tipc_addr
->
to_string
(
addr_
);
...
...
src/session_base.cpp
View file @
027990a1
...
...
@@ -501,7 +501,7 @@ void zmq::session_base_t::start_connecting (bool wait_)
return
;
}
#endif
#if defined ZMQ_HAVE_
LINUX
#if defined ZMQ_HAVE_
TIPC
if
(
addr
->
protocol
==
"tipc"
)
{
tipc_connecter_t
*
connecter
=
new
(
std
::
nothrow
)
tipc_connecter_t
(
io_thread
,
this
,
options
,
addr
,
wait_
);
...
...
src/socket_base.cpp
View file @
027990a1
...
...
@@ -210,7 +210,7 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_)
#endif
// TIPC transport is only available on Linux.
#if !defined ZMQ_HAVE_
LINUX
#if !defined ZMQ_HAVE_
TIPC
if
(
protocol_
==
"tipc"
)
{
errno
=
EPROTONOSUPPORT
;
return
-
1
;
...
...
@@ -409,7 +409,7 @@ int zmq::socket_base_t::bind (const char *addr_)
return
0
;
}
#endif
#if defined ZMQ_HAVE_
LINUX
#if defined ZMQ_HAVE_
TIPC
if
(
protocol
==
"tipc"
)
{
tipc_listener_t
*
listener
=
new
(
std
::
nothrow
)
tipc_listener_t
(
io_thread
,
this
,
options
);
...
...
@@ -589,7 +589,7 @@ int zmq::socket_base_t::connect (const char *addr_)
return
-
1
;
}
#endif
#if defined ZMQ_HAVE_
LINUX
#if defined ZMQ_HAVE_
TIPC
else
if
(
protocol
==
"tipc"
)
{
paddr
->
resolved
.
tipc_addr
=
new
(
std
::
nothrow
)
tipc_address_t
();
...
...
src/tipc_address.cpp
View file @
027990a1
...
...
@@ -19,7 +19,7 @@
#include "tipc_address.hpp"
#if defined ZMQ_HAVE_
LINUX
#if defined ZMQ_HAVE_
TIPC
#include "err.hpp"
...
...
src/tipc_address.hpp
View file @
027990a1
...
...
@@ -24,7 +24,7 @@
#include "platform.hpp"
#if defined ZMQ_HAVE_
LINUX
#if defined ZMQ_HAVE_
TIPC
#include <sys/socket.h>
#include <linux/tipc.h>
...
...
src/tipc_connecter.cpp
View file @
027990a1
...
...
@@ -19,7 +19,7 @@
#include "tipc_connecter.hpp"
#if defined ZMQ_HAVE_
LINUX
#if defined ZMQ_HAVE_
TIPC
#include <new>
#include <string>
...
...
src/tipc_connecter.hpp
View file @
027990a1
...
...
@@ -22,7 +22,7 @@
#include "platform.hpp"
#if defined ZMQ_HAVE_
LINUX
#if defined ZMQ_HAVE_
TIPC
#include "fd.hpp"
#include "own.hpp"
...
...
src/tipc_listener.cpp
View file @
027990a1
...
...
@@ -19,7 +19,7 @@
#include "tipc_listener.hpp"
#if defined ZMQ_HAVE_
LINUX
#if defined ZMQ_HAVE_
TIPC
#include <new>
...
...
src/tipc_listener.hpp
View file @
027990a1
...
...
@@ -22,7 +22,7 @@
#include "platform.hpp"
#if defined ZMQ_HAVE_
LINUX
#if defined ZMQ_HAVE_
TIPC
#include <string>
...
...
tests/Makefile.am
View file @
027990a1
...
...
@@ -52,7 +52,7 @@ noinst_PROGRAMS += test_shutdown_stress \
test_fork
endif
if
ON_LINUX
if
BUILD_TIPC
noinst_PROGRAMS
+=
test_connect_delay_tipc
\
test_pair_tipc
\
test_reqrep_device_tipc
\
...
...
@@ -110,7 +110,7 @@ test_reqrep_ipc_SOURCES = test_reqrep_ipc.cpp testutil.hpp
test_timeo_SOURCES
=
test_timeo.cpp
test_fork_SOURCES
=
test_fork.cpp
endif
if
ON_LINUX
if
BUILD_TIPC
test_connect_delay_tipc_SOURCES
=
test_connect_delay_tipc.cpp
test_pair_tipc_SOURCES
=
test_pair_tipc.cpp
test_reqrep_device_tipc_SOURCES
=
test_reqrep_device_tipc.cpp
...
...
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