* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef WIN32
+#ifdef _WIN32
#include <sys/timeb.h>
closesocket (listener);
+#if EV_SELECT_IS_WINSOCKET
+ filedes [0] = _open_osfhandle (sock [0], 0);
+ filedes [1] = _open_osfhandle (sock [1], 0);
+#else
+ /* when select isn't winsocket, we also expect socket, connect, accept etc.
+ * to work on fds */
filedes [0] = sock [0];
filedes [1] = sock [1];
+#endif
return 0;
}
#undef gettimeofday
-#define gettimeofdy(tv,tz) ev_gettimeofday (tv, tz)
+#define gettimeofday(tv,tz) ev_gettimeofday (tv, tz)
#endif
+