Francois Gouget fgouget@free.fr writes:
Make winsock.h and winsock2.h independent from the Unix headers Make them compatible with both the Unix C headers and the MSVCRT headers Ensure compatibility with the Unix headers via the USE_WS_PREFIX macro Add WINE_NOWINSOCK: prevents winsock.h from being included from windows.h when defined Add ws2tcpip.h, move definitions to the right header
I don't like the WS_API preprocessor abuse. It would be much better to declare function prototypes and typedefs explicitly, even if it requires a bit more typing. Your solution makes it hard to find out what gets defined when, and will break tools that extract information from header files.