cosmetic msvc xml fix
Problem: need local system hostname

Solution: added zsys_hostname() method
Merge pull request #495 from hintjens/master

Problem: need local system hostname
Inconsistent Variable Name

The parameter arglist is referenced as args halfway through the
function. Changed the parameter arglist to args.
Fixes for Windows

Windows does not support the %zd argument in printf. Added conditional
compile statement to allow Windows to compile with %u instead of %zd.
Also modified the conditional compile statement for zsys.c so the MSC
and MINGW32 will use _vscprintf.
Merge pull request #496 from danriegsecker/master

Small Modifications
Problem: under some debuggers, asserts in zsys_close

Valgrind, for instance, delays threads randomly at exit, so the
atexit handler can be called while child threads are still alive
and this leads to assert failures in zsys_close when zactor
tries to close its pipe.

Solution: allow zsys_close() after atexit handler has run.
Problem: win32 api calls in portable code

Technique of defining e.g. closesocket to work on POSIX boxes is
kind of horrid; this makes the code harder to copy and understand.
I'd rather be explicit about putting non-portable code into zsys.

Solution: define zsys_udp_close() to close (UDP) sockets.
Fixed erroneous zsys.h
Problem: need gossip discovery service

This is to provide an alternative or complement to zbeacon for networks
with one or more static services. The gossip service will run on every
node, so that nodes maintain and synchronize their maps of the network.
This will allow any mix of static and dynamic nodes on a network, where
static nodes bind, and dynamic nodes connect.

The main use case for zgossip is Zyre, which builds a fully-connected
cluster across all known nodes in a network.

This commit is for the basic zgossip API, which is built on the zactor
class. The code doesn't do anything real yet.
selftest/zauth: increase poll timeout for slow platforms

fixes #497 .
Merge pull request #499 from mhaberler/master

selftest/zauth: increase poll timeout for slow platforms
Merge pull request #498 from hintjens/master

Problem: under some debuggers, asserts in zsys_close
Merge pull request #500 from evoskuil/master

cosmetic msvc xml fix
zsys.c fixes for windows and for non-android build breaks
Merge pull request #505 from evoskuil/master

zsys.c fixes for windows and for non-android build breaks
On 64-bit Windows, ssize_t is long long

Fixes #502
Fixed signed/unsigned comparison

Fixes #503, though not tested on Windows.
Fixed inconsistent use of S_IFDIR et al

* If S_ISDIR, S_ISREG not defined by compiler, czmq_prelude.h now
  defines them.

* zfile_is_directory and zfile_is_regular now use these macros.

* CZMQ now uses POSIX S_IRUSR and S_IWUSR instead of sometimes
  S_IREAD and S_IWRITE, and defines the S_IRUSR and S_IWUSR macros
  if they're needed.

Fixes #504
Problem: zmq_socket returns void *, not zsock_t

zsys_socket was inconsistently using socket and handle, the code
would not build on ZMQ v2 for example. Since 'socket' is dangerous
to use (it silently resolves to the library function if there's no
variable in scope), I've switched to using 'handle' in this code.

Also, the socket configuration API is zsocket_set_xxx, which may be
replaced by direct calls to libzmq when we deprecate zsockopt.c.