fix strerror on non-linux

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
make -rt configurable (not needed on mac)

Thanks to Andrew Beekhof

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Support compilation on Mac OSX


Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Re-add new automake options

I like the automake options (and encourage other developers to
install the neccessary autotools).

Here is a handy script to install the newest autotools
into a private directory (if you can't get them pre-packaged).
http://people.redhat.com/meyering/autotools-install

autotools-install --prefix=$HOME/autotools --skip-check

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Merge some portability changes from the mingw branch

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
check: add mac checker

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
LOG: pass args directly into qb_log_from_external_source()

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Fix some sparc test failures.

I (Angus) have changed some of Fabio's changes.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
re-fix qb_strerror_r() in case caller frees buf.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Fix a compile warning on sparc (epoll_create1)

The problem is that sys/epoll.h was broken on sparc and alpha for a
bunch of glibc releases.

glibc has the symbol correctly exported, that's why ./configure finds
it, but the header is not always correct. Recent versions of glibc have
the correct header, so we simply workaround the broken ones.

This fix is only necessary to build with --enable-fatal-warnings,
otherwise you simply see a build warning, but there are no runtime
issues at any stage.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Fixed bug: incorrect array length definition

When MAX_BINS is larger than MAX_BIN_ELEMENTS, this bug will cause
boudary overflow in qb_array_create function.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
IPC: add a new state to the connection state

This to handle disconnecting in a failure state (before
the connection has been established.

Another aspect to this is we don't want to call
connection_destroyed() if we haven't called
connection_created().

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
IPC: remove fd from poll loop in the disconnect

Until now we have been relying on getting a POLLHUP, but
under heavy load we seem to get an old poll event
that cause a double deref of the connection object.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
map: add some introductory doxygen

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Allow the array to automatically grow.

this makes it a bit friendlier to use, as
the user will not have to call qb_array_grow().

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
map: free unused leaf nodes

So if a node has no children and no value or notifier
then it is freed.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Fix ./check -h output

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
trie: correct the free'ing of node mem

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Fix two simple coverity warnings

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
ipc: make coverity happy.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>