Pull request to merge porting to WindRiver VxWorks 6.x (#2966)

* Problem: Still need to port over more files to VxWorks 6.x

Solution: Port more files to VxWorks 6.x

* Problem: Need to port over remaining files to VxWorks 6.x. Also remove POSIX thread dependency for VxWorks (because of priority inversion problem in POSIX mutexes with VxWorks 6.x processes)

Solution: Port over remaining files to VxWorks 6.x. Also removed POSIX thread dependency for VxWorks

* Problem: Needed to modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x.

Solution:  Modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x
This commit is contained in:
Manuel Segura
2018-03-10 03:03:02 -08:00
committed by Luca Boccassi
parent 0d23b5ca69
commit 4726f7262d
35 changed files with 809 additions and 60 deletions

View File

@@ -39,6 +39,9 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#ifdef ZMQ_HAVE_VXWORKS
#include <sockLib.h>
#endif
#endif
#if defined ZMQ_HAVE_OPENVMS
@@ -224,7 +227,7 @@ int zmq::tcp_write (fd_t s_, const void *data_, size_t size_)
return nbytes;
#else
ssize_t nbytes = send (s_, data_, size_, 0);
ssize_t nbytes = send (s_, (char *) data_, size_, 0);
// Several errors are OK. When speculative write is being done we may not
// be able to write a single byte from the socket. Also, SIGSTOP issued
@@ -273,7 +276,7 @@ int zmq::tcp_read (fd_t s_, void *data_, size_t size_)
#else
const ssize_t rc = recv (s_, data_, size_, 0);
const ssize_t rc = recv (s_, (char *) data_, size_, 0);
// Several errors are OK. When speculative read is being done we may not
// be able to read a single byte from the socket. Also, SIGSTOP issued
@@ -297,7 +300,7 @@ void zmq::tcp_assert_tuning_error (zmq::fd_t s_, int rc_)
// Check whether an error occurred
int err = 0;
#ifdef ZMQ_HAVE_HPUX
#if defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_VXWORKS
int len = sizeof err;
#else
socklen_t len = sizeof err;