--- libev/ev.c 2007/11/02 20:59:14 1.44 +++ libev/ev.c 2007/11/03 09:19:58 1.45 @@ -44,7 +44,9 @@ #include #include #include -#include +#ifndef WIN32 +# include +#endif #include #include @@ -440,12 +442,14 @@ static void siginit (void) { +#ifndef WIN32 fcntl (sigpipe [0], F_SETFD, FD_CLOEXEC); fcntl (sigpipe [1], F_SETFD, FD_CLOEXEC); /* rather than sort out wether we really need nb, set it */ fcntl (sigpipe [0], F_SETFL, O_NONBLOCK); fcntl (sigpipe [1], F_SETFL, O_NONBLOCK); +#endif ev_io_set (&sigev, sigpipe [0], EV_READ); ev_io_start (&sigev); @@ -467,6 +471,8 @@ static struct ev_child *childs [PID_HASHSIZE]; static struct ev_signal childev; +#ifndef WIN32 + #ifndef WCONTINUED # define WCONTINUED 0 #endif @@ -486,6 +492,8 @@ } } +#endif + /*****************************************************************************/ #if EV_USE_KQUEUE @@ -566,8 +574,10 @@ ev_watcher_init (&sigev, sigcb); siginit (); +#ifndef WIN32 ev_signal_init (&childev, childcb, SIGCHLD); ev_signal_start (&childev); +#endif } }