I am moving this discussion to the coders list as requested.
Alex Burger wrote:
Hi Andy.
Andy Smith wrote:
Alex Burger wrote:
I think it's time to add an MSVC define so we can easily tell the difference between cygwin, mingw and MSVC as all three define WIN32.
I would be more inclined to do something like a WIN32_SDK. For the most part MSVC and MinGW should compile the same code with few exceptions. The idea behind MinGW is a native Windows port of gcc without the POSIX wrappers of Cygwin.
5.2.1 and later have a HAVE_WIN32_PLATFORM_SDK define in net-snmp-config.h. I added this because it was not possible to compile without the SDK after some new code was added to the 5.2 line.
I wonder if this has anything to do with the MinGW build problems. I think I would have tested it when I implemented, but that would have been with 5.2.1 pre1. HAVE_WIN32_PLATFORM_SDK should be defined for MinGW and Cygwin.
Not unconditionally, but they can be if the platform SDK is installed.
The idea of a MSVC define is to be able to identify MSVC without having to say 'WIN32 but not Cygwin and not MinGW'. I did that in the pass_persist patch because I didn't want to affect MinGW or Cygwin, as I couldn't test them because they would not compile. I didn't want to make it worse.. :)
In most (not all...that would be easy) cases code that will compile with MSVC will compile with MinGW. More and more of the Windows API is being implemented there. Keeping Cygwin separate in most cases still makes sense because a lot of POSIX code will compile out of the box with Cygwin. Those are just some things to keep in mind. I will take a stab at fixing MinGW builds soon (hopefully tonight).
Regards, Andy
If you reply, please send it to Coders instead.
Alex
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
