OSDN Git Service

Overhaul WinSock fd_set content management macros.
[mingw/mingw-org-wsl.git] / w32api / ChangeLog
index b682fc6..092ff33 100644 (file)
@@ -1,3 +1,218 @@
+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.
+
+       * include/winsock.h (USE_SYS_TYPES_FD_SET): Deprecate it; use...
+       (_USE_SYS_TYPES_FD_SET): ...this alternative; it is named to conform
+       with preferred convention for system feature test macros.
+
+2017-11-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Use WINSOCK_API_LINKAGE consistently in WinSock headers.
+
+       * include/winsock.h (WINSOCK_API_LINKAGE): Define, and prefix to...
+       (accept, bind, closesocket, connect, ioctlsocket, inet_addr, inet_ntoa)
+       (getpeername, getsockname, getsockopt, listen, recv, recvfrom, send)
+       (sendto, setsockopt, shutdown, socket, gethostbyaddr, gethostbyname)
+       (getservbyport, getservbyname, getprotobynumber, getprotobyname)
+       (WSAStartup, WSACleanup, WSASetLastError, WSAGetLastError)
+       (WSAIsBlocking, WSAUnhookBlockingHook, WSASetBlockingHook)
+       (WSACancelBlockingCall, WSAAsyncGetServByName, WSAAsyncGetServByPort)
+       (WSAAsyncGetProtoByName, WSAAsyncGetProtoByNumber, WSAAsyncSelect)
+       (WSAAsyncGetHostByName, WSAAsyncGetHostByAddr, WSACancelAsyncRequest)
+       (htonl, ntohl, htons, ntohs, select): ...these function prototypes.
+
+       * include/winsock2.h (WINSOCK_API_LINKAGE): Remove it from...
+       (LPFN_WSASTARTUP): ...this typedef; it is inappropriate.
+
+2017-10-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Refactor <wtypes.h> vs. <nspapi.h> and WinSock headers.
+
+       * include/wtypes.h: Tidy layout; assert copyright.
+       [_BEGIN_C_DECLS, _END_C_DECLS]: Use them, as appropriate.
+       [__NSPAPI_H_SOURCED__]: Restrict exposure of declared content to...
+       [!__BLOB_DATA_TYPE_DEFINED] (BLOB, PBLOB, LPBLOB): ...these; define...
+       (__BLOB_DATA_TYPE_DEFINED__): ...this internal guard; it renames...
+       (__BLOB_T_DEFINED): ...this; do not define...
+       (_WTYPES_H): ...this external guard.
+
+       * include/nspapi.h: Tidy layout; assert copyright.
+       [_BEGIN_C_DECLS, _END_C_DECLS]: Use them, as appropriate.
+       (__CSADDR_T_DEFINED): Do not define; it is no longer required.
+       [__WINSOCK2_H_SOURCED__]: Restrict exposure of declared content to...
+       (struct _CSADDR_INFO): ...this, as an incomplete type, along with...
+       (CSADDR_INFO, PCSADDR_INFO, LPCSADDR_INFO): ...these typedefs; also...
+       (SOCKET_ADDRESS, PSOCKET_ADDRESS, LPSOCKET_ADDRESS): ...define fully.
+       [__WINSOCK2_H_SOURCED__] (_NSPAPI_H): Do not define external guard.
+       [!__WINSOCK2_H_SOURCED__] (struct _CSADDR_INFO): Define fully.
+       (__BLOB_T_DEFINED, BLOB, PBLOB, LPBLOB): Do not define; instead...
+       (__NSPAPI_H_SOURCED__): ...define this, temporarily; include wtypes.h
+       [!__WINSOCK2_H_SOURCED__ && _WIN32_WINNT >= WIN2K]: Include winsock2.h
+       [!__WINSOCK2_H_SOURCED__ && _WIN32_WINNT < WIN2K]: Include winsock.h
+       [UNICODE vs. !UNICODE]: Discriminate generic symbol names, using...
+       (__AW_SUFFIXED__): ...this, to facilitate definition of each of...
+       (SetService, GetAddressByName, _SERVICE_INFO): ...these, and...
+       (__AW_ALIAS__): ...this, for definition of each of...
+       (SERVICE_INFO, LPSERVICE_INFO): ...these.
+
+       * include/winsock2.h (__WINSOCK2_H_SOURCED__): Define it temporarily.
+       (__CSADDR_T_DEFINED, struct _CSADDR_INFO, CSADDR_INFO, PCSADDR_INFO)
+       (LPCSADDR_INFO, __BLOB_T_DEFINED, BLOB, PBLOB, LPBLOB): Do not define;
+       include nspapi.h selectively, to acquire them.
+
+2017-09-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Factor <winerror.h> duplicate content out of winsock headers.
+
+       * include/winsock.h include/winsock2.h [!defined WSABASEERR]: Delete
+       conditional block, and all of its content; selectively include...
+       * include/winerror.h [__WINSOCK_H_SOURCED__]: ...this instead.
+       [__WINSOCK_H_SOURCED__] (_WINERROR_H): Do not define it.
+       (__WINSOCK_V1_ERRORS__, __WINSOCK_V2_ERRORS__): New temporary macros;
+       define them, to segregate WSA error messages applicable to WinSock v2
+       only, from those applicable to both WinSock v1.1 and WinSock v2.
+       (__WSA_ERRNO): New macro; use it to redefine all WSA specific error
+       codes, except WSABASEERR, relative to WSABASEERR itself.
+
+2017-09-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Factor <sys/time.h> duplicate content out of winsock headers.
+
+       * include/winsock.h include/winsock2.h [_TIMEVAL_DEFINED]: Delete
+       conditional block, and all its content; include <sys/time.h> instead.
+       (__WINSOCK_H_SOURCED__): New macro; define it temporarily, only while
+       processing this header, such that only selected content from other
+       internally referenced headers is exposed.
+
+2017-09-09  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Source BSD non-standard type definitions from mingwrt header.
+
+       * include/winsock.h include/winsock2.h [_BSDTYPES_DEFINED]: Delete
+       conditional block, and its entire type definition content; include...
+       * include/sys/bsdtypes.h: ...this common file instead; it defines...
+       (u_char, u_int, u_long, u_short): ...these non-standard data types.
+
+2017-09-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Correct misuse of __INSIDE_MSYS__ feature test.
+
+       * include/winsock2.h [!__INSIDE_MSYS__]: One of several instances
+       omits "defined" operator; it should be expressed consistently as...
+       [! defined __INSIDE_MSYS__]: ...this; correct it.
+
+2017-09-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Prepare for <winsock.h> vs. <winsock2.h> refactoring.
+
+       * include/winsock.h: Tidy layout; assert copyright.
+       (_BEGIN_C_DECLS, _END_C_DECLS): Use them to avoid C++ name mangling.
+
+       * include/winsock2.h: Assert copyright; tidy layout, ensuring that all
+       sections, which are common with <winsock.h>, are laid out congruently.
+       (_BEGIN_C_DECLS, _END_C_DECLS): Use them to avoid C++ name mangling.
+       (SD_RECEIVE, SD_SEND, SD_BOTH): Delete duplicate constant definitions.
+       (SO_DONTLINGER, MSG_MAXIOVLEN): Likewise, delete duplicate definitions.
+       (__AW_ALIAS__, __AW_SUFFIXED__): Use them, to avoid reproduction of...
+       [UNICODE]: ...alternative typedefs, and function name aliases...
+       [!UNICODE]: ...versus this case.
+
+2017-08-28  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Resolve secondary issue arising from MinGW-Bug [#2350]
+
+       * include/winuser.h (GetTitleBarInfo)
+       [_WIN32_WINDOWS >= _WIN32_WINDOWS_98]: Remove exposure restriction;
+       it conflicted with current MSDN documentation, so now falls within...
+       [_WIN32_WINNT >= Win2K || _WIN32_WINDOWS >= Win98]: ...this.
+
+2017-08-28  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Resolve MinGW-Bug [#2350]
+
+       * include/winuser.h (GetTitleBarInfo): Move prototype after...
+       (PTITLEBARINFO): ...this type definition; it is used as a function
+       argument type, so must be defined beforehand.
+
+2017-08-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Extend testsuite to cover winsock fd_set macro operations.
+
+       * tests/winsock.at: New file; it implements appropriate tests, and
+       enables use of "-k winsock", "-k winsock2", and "-k fd_set" autotest
+       keywords to invoke them, (e.g. make check TESTSUITEFLAGS='-k fd_set').
+
+       * tests/testsuite.at.in (winsock.at): Integrate it.
+       (MINGW_AT_CHECK_RUN): Accept a variant list of libraries when linking.
+       (MINGW_AT_LINK_LIBS_DEFAULT): New macro; it establishes the initial
+       default list of libraries, or resets the list to this initial default.
+       (MINGW_AT_LINK_LIBS): New macro; it establishes an augmented list of
+       library specifications, to be used until subsequently reset.
+
+2017-07-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Prepare and tag for release of MinGW.org WSL-5.0.1
+
+       * All files (wsl-5.0.1-release): Tag assigned.
+
+2017-07-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Automate testsuite dependency generation.
+
+       * tests/Makefile.in (testsuite) [$srcdir/*.at]: Automatically
+       enumerate all such wildcard matches as prerequisites, instead of...
+       (headers.at): ...this sole explicit dependency.
+
+2017-06-20  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Make <winnt.h> header effectively self-contained.
+
+       * include/winnt.h (_WINNT_H): Defer definition unless included via...
+       (windef.h): ...this; include it, to enforce inclusion order, then...
+       [_WINNT_H]: ...re-evaluate it, to avoid recursive inclusion loop.
+
+2017-06-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Consolidate <winuser.h> version specific conditionals.
+
+       * include/winuser.h: Reorganize file content; group manifest constant
+       definitions into one nested collection of conditional blocks, with one
+       block per Windows version evolution; do likewise for type definitions
+       and function prototypes which are always exposed, and separately...
+       [! defined NOGDI]: ...for those which may be suppressed, when GDI
+       support is not required.
+
 2017-06-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Make <winuser.h> header effectively self-contained.