zeromq/czmq — pull request #564 by guidefloripa (2014-07-21 22:06:24+00:00)
Title: Fix mingw compilation

The functions wcstombs_s (in zbeacon.c) and _vscprintf (in zsys.c) are not compatible with mingw (32-bit) compilers.

In the function 'wcstombs_s', a workaround is first get the required size to be allocated calling 'wcstombs' with size 0, allocate the memory, and then call 'wcstombs' with the allocated size.

For the function '_vscprintf', in mingw compilers a workaround is using 'vsnprintf' with pointer NULL and size 0 to get the required size.