AIX, HP-UX, and SunOS needs to use rand() rather than random() #8

Merged
merged 3 commits into from Nov 15, 2011

Conversation

Projects
None yet
2 participants
@vortechs2000
Contributor

vortechs2000 commented Nov 10, 2011

This fixes up the selftest run on AIX, HP-UX, and SunOS (Solaris 10, Sparc-based). It may also need to be adjusted for the other systems, such as those that show up as __UTYPE_SOLARIS, but I haven't hit one of those systems yet.

vortechs2000 added some commits Oct 7, 2011

Adjust selftest script to properly compile the czmq_selftest and allow
alternate locations of the zmq library.

Add czmq_selftest.c to the compile line.  Add CFLAGS and LDFLAGS vars
to the compile line.

Add relative path './' to valgrind call out to czmq_selftest.

Can now specify alternate zmq location from the CLI as follows:
LD_LIBRARY_PATH=${zmq_lib_path} LDFLAGS=-L${zmq_lib_path} \
  CFLAGS=-I${zmq_include_path} ./selftest

Signed-off-by: AJ Lewis <aj.lewis@quantum.com>
AIX, HP-UX, and SunOS needs to use rand() rather than random()
The selftest for zhash was failing on these platforms because random()
returns up to 2^31-1 and RAND_MAX is set to 2^15-1.  Because of this,
the random index picked in the selftest by randof() was overflowing
the array.

Also, ifaddrs.h does not exist on these platforms

hintjens added a commit that referenced this pull request Nov 15, 2011

Merge pull request #8 from vortechs2000/master
AIX, HP-UX, and SunOS needs to use rand() rather than random()

@hintjens hintjens merged commit 2841ee1 into zeromq:master Nov 15, 2011

@genjix genjix referenced this pull request Mar 6, 2014

Closed

certificates being ignored? #385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment