Libev windows fixes
This commit is contained in:
parent
6dbf49110b
commit
b9540c28e9
18
deps/libev/ev.c
vendored
18
deps/libev/ev.c
vendored
@ -984,7 +984,6 @@ fd_reify (EV_P)
|
|||||||
unsigned long arg;
|
unsigned long arg;
|
||||||
anfd->handle = EV_FD_TO_WIN32_HANDLE (fd);
|
anfd->handle = EV_FD_TO_WIN32_HANDLE (fd);
|
||||||
assert (("libev: only socket fds supported in this configuration", ioctlsocket (anfd->handle, FIONREAD, &arg) == 0));
|
assert (("libev: only socket fds supported in this configuration", ioctlsocket (anfd->handle, FIONREAD, &arg) == 0));
|
||||||
printf ("oi %d %x\n", fd, anfd->handle);//D
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1313,12 +1312,12 @@ evpipe_write (EV_P_ EV_ATOMIC_T *flag)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
/* win32 people keep sending patches that change this write() to send() */
|
|
||||||
/* and then run away. but send() is wrong, it wants a socket handle on win32 */
|
#ifdef __MINGW32__
|
||||||
/* so when you think this write should be a send instead, please find out */
|
send(EV_FD_TO_WIN32_HANDLE(evpipe [1]), &dummy, 1, 0);
|
||||||
/* where your send() is from - it's definitely not the microsoft send, and */
|
#else
|
||||||
/* tell me. thank you. */
|
write (evpipe [1], &dummy, 1);
|
||||||
write (evpipe [1], &dummy, 1);
|
#endif
|
||||||
|
|
||||||
errno = old_errno;
|
errno = old_errno;
|
||||||
}
|
}
|
||||||
@ -1341,8 +1340,11 @@ pipecb (EV_P_ ev_io *iow, int revents)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
char dummy;
|
char dummy;
|
||||||
/* see discussion in evpipe_write when you think this read should be recv in win32 */
|
#ifdef __MINGW32__
|
||||||
|
recv(EV_FD_TO_WIN32_HANDLE(evpipe [0]), &dummy, 1, 0);
|
||||||
|
#else
|
||||||
read (evpipe [0], &dummy, 1);
|
read (evpipe [0], &dummy, 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sig_pending)
|
if (sig_pending)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user