Hi Rom,

thanks for applying the patches. The winsock situation only applies to winsock2.h (in my test compile, I switched to winsock2, just to see, if it compiles - it was not included in the Patch). If you include windows.h without WIN32_LEAN_AND_MEAN, you will also include winsock.h . If you therefore afterwards include winsock2.h, you get MinGW warnings:
"""
#include <windows.h>
#include <winsock2.h>
int main () {}
"""
gives:
"""
In file included from wstest.cpp:2:0:
/usr/share/mingw-w64/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]
 #warning Please include winsock2.h before windows.h
  ^
"""
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/4a90b143-1fb8-43e9-a54c-956127e0c579/windowsh-and-winsock2h

So, while it doesn't apply for winsock.h, it does for winsock2. The WIN32_LEAN_AND_MEAN macro however is always recommended, because it reduces compile time and removes many many preprocessor definitions, which can break some portable code:
http://blogs.msdn.com/b/oldnewthing/archive/2009/11/30/9929944.aspx

Best,
Timo

On 28.04.2014 21:10, Rom Walton wrote:
I need to investigate 2 a little bit more.  One of the first things
winsock.h does is pull in windows.h.

_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to