Skip to content

Commit

Permalink
Different fixed to make OpenVMS port work.
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Sustrik <[email protected]>
  • Loading branch information
Brett Cameron authored and sustrik committed Mar 8, 2011
1 parent 184bdb8 commit b00be26
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Bernd Prager <[email protected]>
Bernd Melchers <[email protected]>
Bob Beaty <[email protected]>
Brian Buchanan <[email protected]>
Brett Cameron <[email protected]>
Burak Arslan <[email protected]>
Chia-liang Kao <[email protected]>
Chris Rempel <[email protected]>
Expand Down Expand Up @@ -70,7 +71,6 @@ Alessio Spadaro <[email protected]>
Alexander Majorov <[email protected]>
Anh Vu <[email protected]>
Bernd Schumacher <[email protected]>
Brett Cameron <[email protected]>
Brian Granger <[email protected]>
Carsten Dinkelmann <[email protected]>
David Bahi <[email protected]>
Expand Down
16 changes: 10 additions & 6 deletions src/ip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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))
{
Expand All @@ -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
}

2 changes: 0 additions & 2 deletions src/ip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions src/semaphore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 1 addition & 9 deletions src/stdint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "platform.hpp"

#ifdef ZMQ_HAVE_SOLARIS
#if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OPENVMS

#include <inttypes.h>

Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit b00be26

Please sign in to comment.