summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am89
-rw-r--r--src/pgm_receiver.cpp2
-rw-r--r--src/pgm_receiver.hpp2
-rw-r--r--src/pgm_sender.cpp2
-rw-r--r--src/pgm_sender.hpp2
-rw-r--r--src/pgm_socket.cpp2
-rw-r--r--src/pgm_socket.hpp2
-rw-r--r--src/platform.hpp.in8
-rw-r--r--src/socket_base.cpp4
9 files changed, 101 insertions, 12 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index f75c3a1..e2f28e2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,7 +15,7 @@ include_HEADERS = ../bindings/c/zmq.h
endif
endif
-if BUILD_PGM
+if BUILD_PGM1
pgm_sources = ../foreign/openpgm/@pgm_basename@/openpgm/pgm/packet.c \
../foreign/openpgm/@pgm_basename@/openpgm/pgm/timer.c \
../foreign/openpgm/@pgm_basename@/openpgm/pgm/if.c \
@@ -32,6 +32,38 @@ pgm_sources = ../foreign/openpgm/@pgm_basename@/openpgm/pgm/packet.c \
../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c
endif
+if BUILD_PGM2
+pgm_sources = ../foreign/openpgm/@pgm_basename@/openpgm/pgm/packet.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/time.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/if.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getifaddrs.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnodeaddr.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoaddr.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoname.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/nametoindex.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/inet_network.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/md5.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/gsi.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/tsi.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/signal.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/txwi.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/rxwi.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/transport.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/source.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/receiver.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/recv.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/pgm.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/timer.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/net.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/rate_control.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/async.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/checksum.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/reed_solomon.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/wsastrerror.c \
+ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/glib-compat.c
+endif
+
libzmq_la_SOURCES = $(pgm_sources) \
app_thread.hpp \
atomic_bitmap.hpp \
@@ -140,7 +172,7 @@ libzmq_la_SOURCES = $(pgm_sources) \
libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAFS@
-if BUILD_PGM
+if BUILD_PGM1
libzmq_la_CXXFLAGS = -I$(top_srcdir)/foreign/openpgm/@pgm_basename@/openpgm/pgm/include/ -Wall @LIBZMQ_EXTRA_CXXFLAGS@
libzmq_la_CFLAGS = -I$(top_srcdir)/foreign/openpgm/@pgm_basename@/openpgm/pgm/include/ @LIBZMQ_EXTRA_CXXFLAGS@ \
-pipe \
@@ -180,7 +212,58 @@ libzmq_la_CFLAGS = -I$(top_srcdir)/foreign/openpgm/@pgm_basename@/openpgm/pgm/in
-DCONFIG_HAVE_SIGHANDLER_T \
-DCONFIG_BIND_INADDR_ANY \
-DCONFIG_GALOIS_MUL_LUT
-else
+endif
+
+if BUILD_PGM2
+libzmq_la_CXXFLAGS = -I$(top_srcdir)/foreign/openpgm/@pgm_basename@/openpgm/pgm/include/ -Wall @LIBZMQ_EXTRA_CXXFLAGS@
+libzmq_la_CFLAGS = -I$(top_srcdir)/foreign/openpgm/@pgm_basename@/openpgm/pgm/include/ @LIBZMQ_EXTRA_CXXFLAGS@ \
+ -pipe \
+ -Wall \
+ -Wextra \
+ -Wfloat-equal \
+ -Wshadow \
+ -Wunsafe-loop-optimizations \
+ -Wpointer-arith \
+ -Wbad-function-cast \
+ -Wcast-qual \
+ -Wcast-align \
+ -Wwrite-strings \
+ -Waggregate-return \
+ -Wstrict-prototypes \
+ -Wold-style-definition \
+ -Wmissing-prototypes \
+ -Wmissing-declarations \
+ -Wmissing-noreturn \
+ -Wmissing-format-attribute \
+ -Wredundant-decls \
+ -Wnested-externs \
+ -Winline \
+ -pedantic \
+ -std=gnu99 \
+ --param max-inline-insns-single=600 \
+ -D_REENTRANT \
+ -D_GNU_SOURCE \
+ -D__need_IOV_MAX \
+ -DCONFIG_HAVE_PSELECT \
+ -DCONFIG_HAVE_POLL \
+ -DCONFIG_HAVE_PPOLL \
+ -DCONFIG_HAVE_EPOLL \
+ -DCONFIG_HAVE_CLOCK_GETTIME \
+ -DCONFIG_HAVE_CLOCK_NANOSLEEP \
+ -DCONFIG_HAVE_NANOSLEEP \
+ -DCONFIG_HAVE_USLEEP \
+ -DCONFIG_HAVE_RTC \
+ -DCONFIG_HAVE_TSC \
+ -DCONFIG_HAVE_IFR_NETMASK \
+ -DCONFIG_HAVE_GETIFADDRS \
+ -DCONFIG_HAVE_GETHOSTBYNAME2 \
+ -DCONFIG_HAVE_GETPROTOBYNAME_R \
+ -DCONFIG_BIND_INADDR_ANY \
+ -DCONFIG_GALOIS_MUL_LUT \
+ -DGETTEXT_PACKAGE=\'"pgm"\'
+endif
+
+if BUILD_NO_PGM
libzmq_la_CXXFLAGS = -Wall @LIBZMQ_EXTRA_CXXFLAGS@
endif
diff --git a/src/pgm_receiver.cpp b/src/pgm_receiver.cpp
index 50a8ff9..998becb 100644
--- a/src/pgm_receiver.cpp
+++ b/src/pgm_receiver.cpp
@@ -19,7 +19,7 @@
#include "platform.hpp"
-#if defined ZMQ_HAVE_OPENPGM
+#if defined ZMQ_HAVE_OPENPGM1
#include <iostream>
diff --git a/src/pgm_receiver.hpp b/src/pgm_receiver.hpp
index b573081..3471324 100644
--- a/src/pgm_receiver.hpp
+++ b/src/pgm_receiver.hpp
@@ -22,7 +22,7 @@
#include "platform.hpp"
-#if defined ZMQ_HAVE_OPENPGM
+#if defined ZMQ_HAVE_OPENPGM1
#include "io_object.hpp"
#include "i_engine.hpp"
diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp
index 423865b..d5f62ab 100644
--- a/src/pgm_sender.cpp
+++ b/src/pgm_sender.cpp
@@ -19,7 +19,7 @@
#include "platform.hpp"
-#if defined ZMQ_HAVE_OPENPGM
+#if defined ZMQ_HAVE_OPENPGM1
#include <iostream>
diff --git a/src/pgm_sender.hpp b/src/pgm_sender.hpp
index 8fdda6c..32e97f6 100644
--- a/src/pgm_sender.hpp
+++ b/src/pgm_sender.hpp
@@ -22,7 +22,7 @@
#include "platform.hpp"
-#if defined ZMQ_HAVE_OPENPGM
+#if defined ZMQ_HAVE_OPENPGM1
#include "stdint.hpp"
#include "io_object.hpp"
diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp
index 88ef68e..0d7a3e2 100644
--- a/src/pgm_socket.cpp
+++ b/src/pgm_socket.cpp
@@ -19,7 +19,7 @@
#include "platform.hpp"
-#if defined ZMQ_HAVE_OPENPGM
+#if defined ZMQ_HAVE_OPENPGM1
#ifdef ZMQ_HAVE_LINUX
#include <pgm/pgm.h>
diff --git a/src/pgm_socket.hpp b/src/pgm_socket.hpp
index c9d0feb..fc7a0a3 100644
--- a/src/pgm_socket.hpp
+++ b/src/pgm_socket.hpp
@@ -22,7 +22,7 @@
#include "platform.hpp"
-#if defined ZMQ_HAVE_OPENPGM
+#if defined ZMQ_HAVE_OPENPGM1
#ifdef ZMQ_HAVE_LINUX
#include <glib.h>
diff --git a/src/platform.hpp.in b/src/platform.hpp.in
index e6bb10c..3c28737 100644
--- a/src/platform.hpp.in
+++ b/src/platform.hpp.in
@@ -178,9 +178,15 @@
/* Have OpenBSD OS */
#undef ZMQ_HAVE_OPENBSD
-/* Have OpenPGM extension. */
+/* Have OpenPGM v1 or v2 extension. */
#undef ZMQ_HAVE_OPENPGM
+/* Have OpenPGM v1 extension. */
+#undef ZMQ_HAVE_OPENPGM1
+
+/* Have OpenPGM v2 extension. */
+#undef ZMQ_HAVE_OPENPGM2
+
/* Have DarwinOSX OS */
#undef ZMQ_HAVE_OSX
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index 6763167..b466b8c 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -93,7 +93,7 @@ int zmq::socket_base_t::bind (const char *addr_)
return 0;
}
-#if defined ZMQ_HAVE_OPENPGM
+#if defined ZMQ_HAVE_OPENPGM1
if (addr_type == "pgm" || addr_type == "udp") {
// In the case of PGM bind behaves the same like connect.
return connect (addr_);
@@ -179,7 +179,7 @@ int zmq::socket_base_t::connect (const char *addr_)
return 0;
}
-#if defined ZMQ_HAVE_OPENPGM
+#if defined ZMQ_HAVE_OPENPGM1
if (addr_type == "pgm" || addr_type == "udp") {
// If the socket type requires bi-directional communication