On native Windows, the file system is case-insensitive, so this this
doesn't matter there.
However, when compiling on a case-sensitive filesystem, such as when
cross-compiling from a Unixoid using mingw, we have to use the case
the file is supplied with, which is all lowercase.
Solution: restore inclusion of poll.h if using poll before zmq.h as
it was originally, as AIX redefines the POSIX structures and provides
compatibility macros.
Also add alternative aliases for 32 bit AIX's pollitem struct:
events -> reqevents
revents -> rtnevents
1. stl container is not thread safety
2. rm_fd() and loop() end to clear the retired event source will in multi-thread operation
3. may be crashed in reaper thread to delete the items in the std::vector as the source is nullptr
1. stl container is not thread safety
2. rm_fd() and loop() end to clear the retired event source will in multi-thread operation
3. may be crashed in reaper thread to delete the items in the std::vector as the source is nullptr
Solution: set SOVERSION in CMakeLists to match the SONAME generated
by libtool so that there is no mismatch between the output of the
*NIX build systems.
Before:
$ ls -l
total 2696
lrwxrwxrwx 1 luca luca 15 Dec 1 22:36 libzmq.so -> libzmq.so.4.2.0
lrwxrwxrwx 1 luca luca 15 Dec 1 22:36 libzmq.so.4.2.0 -> libzmq.so.4.2.1
-rwxr-xr-x 1 luca luca 906168 Dec 1 22:36 libzmq.so.4.2.1
$ readelf -d libzmq.so.4.2.1 | grep SONAME
0x000000000000000e (SONAME) Library soname: [libzmq.so.4.2.0]
After:
$ ls -l
total 2700
lrwxrwxrwx 1 luca luca 15 Dec 1 22:31 libzmq.so -> libzmq.so.5.1.0
-rwxr-xr-x 1 luca luca 906168 Dec 1 22:31 libzmq.so.4.2.1
lrwxrwxrwx 1 luca luca 15 Dec 1 22:31 libzmq.so.5.1.0 -> libzmq.so.4.2.1
$ readelf -d libzmq.so.4.2.1 | grep SONAME
0x000000000000000e (SONAME) Library soname: [libzmq.so.5.1.0]
* bug fix: AIX pollset error
buf fix: AIX only, pollset 'rm_fd' set fd_table to null first then set pe->fd to retired_fd
* remove extra spaces
remove extra spaces
Summary:
To set `Type Of Service` for IP layer packets ZMQ provides `ZMQ_TOS` socket
option. However this only works for v4 sockets. Considering things are moving to
IPv6 heavily (especially within enterprise networks), ZMQ should support setting
`traffic class` for v6 based on `ZMQ_TOS`.
There is a subtle difference between v4 and v6 in terms of the positioning of
field but TOS has same meaning in both v4 and v6. Linux provides following APIs
for v4/v6 to set TOS field value.
```
// For v4
setsockopt(fd, IPPROTO_IP, IP_TOS, tos, sizeof(tos));
// For v6
setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, tos, sizeof(tos));
```
Test Plan:
Make sure Cmake works fine and all tests passes.
Imported this change to `OpenR` project and tested on our local testbed.
Captured some packets exchanged between PUB/SUB and ROUTER/ROUTER sockets
pairs. Verify that `TCLASS` value is set as per expectation.
Tasks: #2208
Solution: search and add it via AC_CHECK_LIB when building with
libunwind, as the backtrace function uses dladdr. This problem
only appears on some distributions and with some compiler/toolchain
versions.