X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/e7d1fc1a4bbd47e0d2f7d59d1ce4ccaa4fa0ab10..c56a8061de2b5b4b9760ed49d4600bf40991b797:/ev_win32.c diff --git a/ev_win32.c b/ev_win32.c index 5821128..e95969d 100644 --- a/ev_win32.c +++ b/ev_win32.c @@ -29,7 +29,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef WIN32 +#ifdef _WIN32 #include @@ -73,8 +73,15 @@ ev_pipe (int filedes [2]) 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; @@ -104,6 +111,7 @@ ev_gettimeofday (struct timeval *tv, struct timezone *tz) } #undef gettimeofday -#define gettimeofdy(tv,tz) ev_gettimeofday (tv, tz) +#define gettimeofday(tv,tz) ev_gettimeofday (tv, tz) #endif +