I have issues with the winsock headers. :(
When a header(1) needs the function and type declarations for winsock, I just include winsock2.h there. Fine.
Unfortunately, another header included by said header(1) may include windows.h, which seems to include winsock.h, unless you define WIN32_LEAN_AND_MEAN (which I don' t necessarily want to do).
When winsock.h gets included, of course I get a deluge of compiler errors, as it's trying to redefine all the types and structs from winsock2.h.
Is there a nice solution (what's the difference between the winsock headers - I've always just assumed I needed 2, since I always use 2-specific functions)?
ATM I just include winsock2.h whereever I just need windows.h, since w2 doesn't pull in winsock.h, and only pulls in windows.h if the include guard windows.h uses isn't already defined. Of course, that's not ideal, and only works if I write all the code.