On 3 September 2010 19:57, Kelly Brock <[email protected]> wrote: > 1. Don't look for "_WIN32": use the guaranteed "_MSC_VER" so folks > with > unique build requirements don't have to screw with adding an additional > definition to their projects. I.e. "#if defined _MSC_VER" replaces "#if > defined _WIN32". This is similar to using "__GNUC__", you know the > compiler > defined it and unless someone is intentionally playing games, there should > never be a problem using that check. > > _WIN32 is for the platform, _MSC_VER is for Visual Studio. Visual Studio isn't the only compiler for Win32/Win64 and _MSC_VER will break on those other compilers, for example MinGW and Cygwin.
_MSC_VER should only be for fruity #pragmas and particulars of MSVC, such as lack of C99 headers, broken inline, etc. MSVC is very retarded with static libraries, Winsock for example doesn't work properly unless you have WIN32 defined and even MSVC 2010 conveniently removes it from the default configuration compared to application targets. -- Steve-o
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
