[zeromq-dev] Checking for Win platform?
sustrik at imatix.com
Mon Nov 2 23:52:53 CET 2009
>It is a pretty common standard in visual studio to include "WIN32" as a
>preprocessor definition. This could work for your header chagne.
>typedef void* fd_t
>typedef int fd_t
That's one option. It would require anyone compiling an application to
define WIN32 (even under MinGW or so).
The other option would be to include zmq_platform.h from zmq.h,
zmq_platform.h having a single line:
zmq_platform would be shipped in Win32 package. On other platforms
autotools can automatically generate zmq_platform.h. Say:
Similar thing to the Win32 trick would have to be done on OpenVMS
platform, where autotools are not available.
Not sure which option is better though...
More information about the zeromq-dev