ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.429 by root, Tue May 8 15:50:49 2012 UTC vs.
Revision 1.433 by root, Tue May 15 13:03:20 2012 UTC

201# include <sys/wait.h> 201# include <sys/wait.h>
202# include <unistd.h> 202# include <unistd.h>
203#else 203#else
204# include <io.h> 204# include <io.h>
205# define WIN32_LEAN_AND_MEAN 205# define WIN32_LEAN_AND_MEAN
206# include <winsock2.h>
206# include <windows.h> 207# include <windows.h>
207# include <winsock2.h>
208# ifndef EV_SELECT_IS_WINSOCKET 208# ifndef EV_SELECT_IS_WINSOCKET
209# define EV_SELECT_IS_WINSOCKET 1 209# define EV_SELECT_IS_WINSOCKET 1
210# endif 210# endif
211# undef EV_AVOID_STDIO 211# undef EV_AVOID_STDIO
212#endif 212#endif
409/* some very old inotify.h headers don't have IN_DONT_FOLLOW */ 409/* some very old inotify.h headers don't have IN_DONT_FOLLOW */
410# ifndef IN_DONT_FOLLOW 410# ifndef IN_DONT_FOLLOW
411# undef EV_USE_INOTIFY 411# undef EV_USE_INOTIFY
412# define EV_USE_INOTIFY 0 412# define EV_USE_INOTIFY 0
413# endif 413# endif
414#endif
415
416#if EV_SELECT_IS_WINSOCKET
417# include <winsock.h>
418#endif 414#endif
419 415
420#if EV_USE_EVENTFD 416#if EV_USE_EVENTFD
421/* our minimum requirement is glibc 2.7 which has the stub, but not the header */ 417/* our minimum requirement is glibc 2.7 which has the stub, but not the header */
422# include <stdint.h> 418# include <stdint.h>
1914 { 1910 {
1915 char dummy[4]; 1911 char dummy[4];
1916#ifdef _WIN32 1912#ifdef _WIN32
1917 WSABUF buf; 1913 WSABUF buf;
1918 DWORD recvd; 1914 DWORD recvd;
1915 DWORD flags = 0;
1919 buf.buf = dummy; 1916 buf.buf = dummy;
1920 buf.len = sizeof (dummy); 1917 buf.len = sizeof (dummy);
1921 WSARecv (EV_FD_TO_WIN32_HANDLE (evpipe [0]), &buf, 1, &recvd, 0, 0, 0); 1918 WSARecv (EV_FD_TO_WIN32_HANDLE (evpipe [0]), &buf, 1, &recvd, &flags, 0, 0);
1922#else 1919#else
1923 read (evpipe [0], &dummy, sizeof (dummy)); 1920 read (evpipe [0], &dummy, sizeof (dummy));
1924#endif 1921#endif
1925 } 1922 }
1926 } 1923 }
2358 EV_INVOKE_PENDING; 2355 EV_INVOKE_PENDING;
2359 } 2356 }
2360#endif 2357#endif
2361 2358
2362#if EV_CHILD_ENABLE 2359#if EV_CHILD_ENABLE
2363 if (ev_is_active (&childev)) 2360 if (ev_is_default_loop (EV_A) && ev_is_active (&childev))
2364 { 2361 {
2365 ev_ref (EV_A); /* child watcher */ 2362 ev_ref (EV_A); /* child watcher */
2366 ev_signal_stop (EV_A_ &childev); 2363 ev_signal_stop (EV_A_ &childev);
2367 } 2364 }
2368#endif 2365#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines