(fd_set): Define to new name, after including winsock.h, so we can
provide our own implementation.
#ifdef _WINSOCKAPI_
#undef _WINSOCKAPI_
#endif
+#ifdef _WINSOCK_H
+#undef _WINSOCK_H
+#endif
/* avoid confusion with our version of select */
#ifdef select
#undef FD_ZERO
#endif
-/* allow us to provide our own version of fd_set */
-#define fd_set ws_fd_set
-
/* avoid duplicate definition of timeval */
#ifdef HAVE_TIMEVAL
#define timeval ws_timeval
#undef FD_CLR
#undef FD_ISSET
#undef FD_ZERO
-#undef fd_set
+
+/* allow us to provide our own version of fd_set */
+#define fd_set ws_fd_set
#include "w32.h"
#ifdef HAVE_TIMEVAL