During the compilation of libxml2-2.4.12 I found that the libxml source file, nanohttp.c:716 uses an #ifdef _WINSOCKAPI_ directive to control the way sockets are used. When compiling libxml2-2.4.12 with MingW1.1 the _WINSOCKAPI_ is not defined. In the Microsoft Platform SDK the WinSock2.h file reads:
#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */
whereas the mingw winsock2.h reads:
#if !(defined _WINSOCK2_H || defined _WINSOCK_H)
#define _WINSOCK_H /* to prevent later inclusion of winsock.h */
If I add #define _WINSOCKAPI_ under the definition for _GNU_H_WINDOWS32_SOCKETS then compilation of libxml continues. Why was the #define changed for MingW? Should the #defin _WINSOCKAPI_ be in there as well or am I breaking things by adding it?