When a TCP message has been received, use the actual read message length to allocate the buffer and return its size.
Merge pull request #1 from tuscland/master

Fix a problem with receiving TCP messages
fix crash on 64-bit Mac due to uninitialised int
Correct printing of blob bytes.

Blobs were dumped improperly when using %x, as values > 0x7f were sign
expanded. Using %hhx displayes values properly.

Patch submitted by Fabio Baltieri.
adjust argument to pthread_create so it is a valid function pointer cast.
ensure we compare integers of same signedness.
removed a couple of dead stores. (value written to ret is never read again)
fix potential memory leak.
call freeaddrinfo only when a call to getaddrinfo succeeds, free lo_server if it fails.
removed assignment to a variable that is never read again.
in dispatch_method, when a message with no argument is received, don't call malloc with a zero byte count.
fix a memory leak happening when calling lo_server_add_method with a path that contains invalid characters.
fix a logic error where a null pointer could be dereferenced.
tell the static analyzer that lo_address_init_with_sockaddr is not meant to be called with a NULL lo_address argument.
go further in dispatch_method to avoid another allocation of zero bytes.
Merge pull request #4 from tuscland/master

Fix issues reported by clang compiler and analyzer
Avoid including netinet/tcp.h on Windows.
Add new bundle-related functions to Windows .def file.
Changes to compile without warnings with MingW.

Includes an autoconf test to detect whether printf("%lld") or
printf("%I64d") is prefered.  (For non-C99-compliant compilers.)
Fix: If multiple calls to recv() were needed, message size was wrong.