summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Cameron <Brett.Cameron@hp.com>2011-03-08 14:39:52 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-03-08 14:39:52 +0100
commitb00be2651c39d0c08064f206b31a14e810ba0b22 (patch)
treede77476ed71703c080779211256b749aca40f027
parent184bdb8e2bb6fe252af1bf4dd16d1c9ed8892f7a (diff)
Different fixed to make OpenVMS port work.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
-rw-r--r--AUTHORS2
-rw-r--r--src/ip.cpp16
-rw-r--r--src/ip.hpp2
-rw-r--r--src/semaphore.hpp2
-rw-r--r--src/stdint.hpp10
5 files changed, 14 insertions, 18 deletions
diff --git a/AUTHORS b/AUTHORS
index c9417ef..b75ac86 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -8,6 +8,7 @@ Bernd Prager <bernd@prager.ws>
Bernd Melchers <melchers@ZEDAT.FU-Berlin.DE>
Bob Beaty <rbeaty@peak6.com>
Brian Buchanan <bwb@holo.org>
+Brett Cameron <Brett.Cameron@hp.com>
Burak Arslan <burak-github@arskom.com.tr>
Chia-liang Kao <clkao@clkao.org>
Chris Rempel <csrl@gmx.com>
@@ -70,7 +71,6 @@ Alessio Spadaro <alessio.spadaro@finservice.com>
Alexander Majorov <alexander.majorov@intel.com>
Anh Vu <vietanh.vu@m4x.org>
Bernd Schumacher <bernd.schumacher@hp.com>
-Brett Cameron <Brett.Cameron@hp.com>
Brian Granger <ellisonbg.net@gmail.com>
Carsten Dinkelmann <din@foobar-cpa.de>
David Bahi <dbahi@novell.com>
diff --git a/src/ip.cpp b/src/ip.cpp
index 4c50a66..c19c5bb 100644
--- a/src/ip.cpp
+++ b/src/ip.cpp
@@ -229,10 +229,13 @@ int zmq::resolve_ip_interface (sockaddr_storage* addr_, socklen_t *addr_len_,
}
// There's no such interface name. Assume literal address.
+#if defined ZMQ_HAVE_OPENVMS && defined __ia64
+ __addrinfo64 *res = NULL;
+ __addrinfo64 req;
+#else
addrinfo *res = NULL;
-
- // Set up the query.
addrinfo req;
+#endif
memset (&req, 0, sizeof (req));
// We only support IPv4 addresses for now.
@@ -312,11 +315,13 @@ int zmq::resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_,
return 0;
}
-#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
-
int zmq::resolve_local_path (sockaddr_storage *addr_, socklen_t *addr_len_,
const char *path_)
{
+#if defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS
+ errno = EPROTONOSUPPORT;
+ return -1;
+#else
sockaddr_un *un = (sockaddr_un*) addr_;
if (strlen (path_) >= sizeof (un->sun_path))
{
@@ -327,7 +332,6 @@ int zmq::resolve_local_path (sockaddr_storage *addr_, socklen_t *addr_len_,
un->sun_family = AF_UNIX;
*addr_len_ = sizeof (sockaddr_un);
return 0;
-}
-
#endif
+}
diff --git a/src/ip.hpp b/src/ip.hpp
index 3c21e2e..ec2db43 100644
--- a/src/ip.hpp
+++ b/src/ip.hpp
@@ -60,11 +60,9 @@ namespace zmq
int resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_,
const char *hostname_);
-#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
// This function sets up address for UNIX domain transport.
int resolve_local_path (sockaddr_storage *addr_, socklen_t *addr_len_,
const char* pathname_);
-#endif
}
#endif
diff --git a/src/semaphore.hpp b/src/semaphore.hpp
index dffd8fc..edc0683 100644
--- a/src/semaphore.hpp
+++ b/src/semaphore.hpp
@@ -26,6 +26,8 @@
#if defined ZMQ_HAVE_WINDOWS
#include "windows.hpp"
+#elif defined ZMQ_HAVE_OPENVMS
+#include <pthread.h>
#else
#include <semaphore.h>
#endif
diff --git a/src/stdint.hpp b/src/stdint.hpp
index 3ee6c06..73186d3 100644
--- a/src/stdint.hpp
+++ b/src/stdint.hpp
@@ -23,7 +23,7 @@
#include "platform.hpp"
-#ifdef ZMQ_HAVE_SOLARIS
+#if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OPENVMS
#include <inttypes.h>
@@ -54,14 +54,6 @@ typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
#endif
-#elif defined ZMQ_HAVE_OPENVMS
-
-#include <types.h>
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-
#else
#include <stdint.h>