+2021-07-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ select: port better to MinGW
+ Problem reported by Eli Zaretskii in:
+ https://lists.gnu.org/r/bug-gnulib/2021-07/msg00017.html
+ * lib/select.c (rpl_select) [_WIN32 && !__CYGWIN__]:
+ Pass a SOCKET, not a HANDLE, to FD_ISSET.
+
2021-07-06 Paul Eggert <eggert@cs.ucla.edu>
year2038: Add --disable-year2038 option
if (h != handle_array[nhandles])
{
/* Perform handle->descriptor mapping. */
- WSAEventSelect ((SOCKET) h, NULL, 0);
- if (FD_ISSET (h, &handle_rfds))
+ SOCKET s = (SOCKET) h;
+ WSAEventSelect (s, NULL, 0);
+ if (FD_ISSET (s, &handle_rfds))
FD_SET (i, rfds);
- if (FD_ISSET (h, &handle_wfds))
+ if (FD_ISSET (s, &handle_wfds))
FD_SET (i, wfds);
- if (FD_ISSET (h, &handle_xfds))
+ if (FD_ISSET (s, &handle_xfds))
FD_SET (i, xfds);
}
else