+2017-11-28 Keith Marshall <keith@users.osdn.me>
+
+ Make <wsnetbs.h> header effectively self-contained.
+
+ * include/wsnetbs.h: Assert copyright; tidy layout; include
+ "_winsock.h", so making this header effectively self-contained, and
+ thus relieving the user of a responsibility for ensuring that some
+ other appropriate WinSock header has been included first.
+
+2017-11-28 Keith Marshall <keith@users.osdn.me>
+
+ Factor <winsock.h> duplicate content out of <winsock2.h>
+
+ * include/winsock2.h: Remove all declarations and definitions which
+ are identically specified in <winsock.h>, but keep them in scope by...
+ [! defined _WINSOCK_H]: ...including <winsock.h> itself; override any
+ declarations and definitions therefrom, which introduce conflicts.
+ [defined _WINSOCK_H]: Diagnose misuse; suppress all further
+ definitions and declarations.
+
+ * include/winsock.h (SOMAXCONN): Add comment; note disparity between
+ WinSock v1.1 and WinSock v2, the latter of which will override when
+ correctly included by <winsock2.h>
+
+2017-11-24 Keith Marshall <keith@users.osdn.me>
+
+ Make <winsock.h> and <winsock2.h> duplicate code congruent.
+
+ * include/winsock.h (SOMAXCONN): Move definition into...
+ [!__INSIDE_MSYS__]: ...this guarded scope.
+
+ * include/winsock2.h: Rearrange as necessary.
+ [_BEGIN_C_DECLS, _END_C_DECLS]: Keep them balanced.
+ (_USE_SYS_TYPES_FD_SET): Define and use, as in <winsock.h>
+ [!_WINSOCK_ANOMALOUS_TYPEDEFS] (FD_SET): Declare function, not type.
+ [!_WINSOCK_ANOMALOUS_TYPEDEFS] (PFD_SET, LPFD_SET): Suppress typedefs.
+ (FD_SET, FD_ISSET, FD_CLR, FD_ZERO): Reimplement, as in <winsock.h>
+ (FD_READ_BIT, FD_WRITE_BIT, FD_OOB_BIT, FD_ACCEPT_BIT)
+ (FD_CONNECT_BIT, FD_CLOSE_BIT, FD_QOS_BIT, FD_GROUP_QOS_BIT)
+ (FD_ROUTING_INTERFACE_CHANGE_BIT, FD_ADDRESS_LIST_CHANGE_BIT)
+ (FD_MAX_EVENTS): Enumerate them, as in <winsock.h>
+ [!(defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)]: Recast...
+ [!defined __INSIDE_MSYS__]: ...as this, throughout.
+ (gethostname): Update function prototype, adding...
+ (WINSOCK_API_LINKAGE): ...this DLL import control attribute.
+
+ * include/ws2spi.h: Tidy layout; assert copyright.
+ [_BEGIN_C_DECLS, _END_C_DECLS]: Use them, as appropriate.
+ (LPFD_SET): Delete all type references; use...
+ (fd_set *): ...this instead.
+
+2017-11-14 Keith Marshall <keith@users.osdn.me>
+
+ Establish default selection for WinSock API declaration.
+
+ * include/windows.h include/nspapi.h: Include...
+ * include/_winsock.h: ...this new system private header; it selects...
+ [_WIN32_WINNT >= _WIN32_WINNT_NT4]: ...WinSock v2 API declarations, as
+ provided by conditional inclusion of <winsock2.h>, otherwise...
+ [_WIN32_WINNT < _WIN32_WINNT_NT4]: ...WinSock v1.1 API declarations,
+ as provided by inclusion of <winsock.h>
+
+ * tests/headers.at <_winsock.h>: Add reference.
+
+2017-11-14 Keith Marshall <keith@users.osdn.me>
+
+ Update gethostname() declaration; drop Cygwin specificity.
+
+ * include/winsock.h (gethostname): Declare unconditionally; add...
+ (WINSOCK_API_LINKAGE): ...this DLL import control attribute.
+ [!(defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)]: Recast...
+ [!defined __INSIDE_MSYS__]: ...as this, throughout.
+
+2017-11-09 Keith Marshall <keith@users.osdn.me>
+
+ Normalize fd_set event macros for <winsock2.h> compatibility.
+
+ * include/winsock.h (FD_READ, FD_WRITE, FD_OOB, FD_ACCEPT, FD_CONNECT)
+ (FD_CLOSE): Redefine them, deriving respective values as shifts by...
+ (FD_READ_BIT, FD_WRITE_BIT, FD_OOB_BIT, FD_ACCEPT_BIT, FD_CONNECT_BIT)
+ (FD_CLOSE_BIT): ...this new enumerated count sequence, applying each
+ count to a bit flag with value of 1, in each case respectively.
+ [_WINSOCK2_H]: Extend shift count enumeration, to include...
+ (FD_QOS_BIT, FD_GROUP_QOS_BIT, FD_ROUTING_INTERFACE_CHANGE_BIT)
+ (FD_ADDRESS_LIST_CHANGE_BIT): ...these additional counts; hence...
+ [_WINSOCK2_H] (FD_QOS, FD_GROUP_QOS, FD_ROUTING_INTERFACE_CHANGE)
+ [_WINSOCK2_H] (FD_ADDRESS_LIST_CHANGE): ...define each of these.
+ (FD_MAX_EVENTS): Define unconditionally; it represents a shift count
+ of 1 greater than the offset of the last defined flag; hence...
+ (FD_ALL_EVENTS): ...derive this mask for all event flags.
+
+2017-11-09 Keith Marshall <keith@users.osdn.me>
+
+ Filter potential WinSock v2 conflicts out of <winsock.h>
+
+ * include/winsock.h [_WINSOCK2_H] <mswsock.h>: Do not include it.
+ [_WINSOCK2_H] (IP_MULTICAST_IF, IP_MULTICAST_TTL, IP_MULTICAST_LOOP)
+ (IP_ADD_MEMBERSHIP, IP_DROP_MEMBERSHIP, IP_DEFAULT_MULTICAST_TTL)
+ (IP_DEFAULT_MULTICAST_LOOP, IP_MAX_MEMBERSHIPS, struct ip_mreq): Do
+ not define any of these; they are not compatible with WinSock v2.
+ [_WINSOCK2_H] (SOMAXCONN): Do not define it; it will be defined
+ appropiately in <winsock2.h>
+
+2017-11-09 Keith Marshall <keith@users.osdn.me>
+
+ Filter out <winsock.h> typedef anomalies.
+
+ * include/winsock.h (FD_SET, PFD_SET, LPFD_SET): If user defines...
+ [_WINSOCK_ANOMALOUS_TYPEDEFS]: ...this new feature test macro, expose
+ them as type definitions, but warn of potential conflict with...
+ [!_WINSOCK_ANOMALOUS_TYPEDEFS] (FD_SET): ...this POSIX.1 mandated
+ function; declare its prototype.
+
+2017-11-08 Keith Marshall <keith@users.osdn.me>
+
+ Overhaul WinSock fd_set content management macros.
+
+ * include/winsock.h (FD_SET, FD_ISSET, FD_CLR, FD_ZERO): Replace the
+ original implementations of each of these macros, redirecting to...
+ (__FD_SET, __FD_ISSET, __FD_CLR, __FD_ZERO): ...these new, equivalent
+ inline functions, respectively; these are more robust, and correct a
+ defect in the original FD_SET macro implementation, whereby duplicate
+ descriptors could be added to an fd_set array, but would not then be
+ removed by the corresponding FD_CLR macro.
+
+ * tests/winsock.at (MINGW_AT_CHECK_WINSOCK): Ensure that all test
+ programs are linked with -lwsock32 or -lws2_32, as appropriate; the
+ __FD_SET and __FD_ISSET functions are dependent on the __WSAFDIsSet()
+ function, which is implemented in each of these libraries.
+
+2017-11-07 Keith Marshall <keith@users.osdn.me>
+
+ Identify features which have been deprecated in WinSock v2.
+
+ * include/winsock.h (__WINSOCK2_DEPRECATED): Define as nothing.
+ * include/winsock2.h (__WINSOCK2_DEPRECATED): Define as equivalent...
+ (__MINGW_ATTRIB_DEPRECATED): ...to this.
+
+ * include/winsock.h include/winsock2.h: Qualify...
+ (WSAIsBlocking, WSAUnhookBlockingHook, WSASetBlockingHook)
+ (WSACancelBlockingCall): ...each of these function prototypes, with...
+ (__WINSOCK2_DEPRECATED): ...this attribute.
+
2017-11-07 Keith Marshall <keith@users.osdn.me>
Adopt system naming convention for USE_SYS_TYPES_FD_SET macro.