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

Comparing libev/ev.c (file contents):
Revision 1.426 by root, Sun May 6 13:42:10 2012 UTC vs.
Revision 1.427 by root, Sun May 6 19:29:59 2012 UTC

1876 write (evfd, &counter, sizeof (uint64_t)); 1876 write (evfd, &counter, sizeof (uint64_t));
1877 } 1877 }
1878 else 1878 else
1879#endif 1879#endif
1880 { 1880 {
1881 /* win32 people keep sending patches that change this write() to send() */ 1881#ifdef _WIN32
1882 /* and then run away. but send() is wrong, it wants a socket handle on win32 */ 1882 WSABUF buf;
1883 /* so when you think this write should be a send instead, please find out */ 1883 DWORD sent;
1884 /* where your send() is from - it's definitely not the microsoft send, and */ 1884 buf.buf = &buf;
1885 /* tell me. thank you. */ 1885 buf.len = 1;
1886 /* it might be that your problem is that your environment needs EV_USE_WSASOCKET */ 1886 WSASend (EV_FD_TO_WIN32_HANDLE (evpipe [1]), &buf, 1, &sent, 0, 0, 0);
1887 /* check the ev documentation on how to use this flag */ 1887#else
1888 write (evpipe [1], &(evpipe [1]), 1); 1888 write (evpipe [1], &(evpipe [1]), 1);
1889#endif
1889 } 1890 }
1890 1891
1891 errno = old_errno; 1892 errno = old_errno;
1892 } 1893 }
1893} 1894}
1908 read (evfd, &counter, sizeof (uint64_t)); 1909 read (evfd, &counter, sizeof (uint64_t));
1909 } 1910 }
1910 else 1911 else
1911#endif 1912#endif
1912 { 1913 {
1913 char dummy; 1914 char dummy[4];
1914 /* see discussion in evpipe_write when you think this read should be recv in win32 */ 1915#ifdef _WIN32
1916 WSABUF buf;
1917 DWORD recvd;
1918 buf.buf = dummy;
1919 buf.len = sizeof (dummy);
1920 WSARecv (EV_FD_TO_WIN32_HANDLE (evpipe [0]), &buf, 1, &recvd, 0, 0, 0);
1921#else
1915 read (evpipe [0], &dummy, 1); 1922 read (evpipe [0], &dummy, sizeof (dummy));
1923#endif
1916 } 1924 }
1917 } 1925 }
1918 1926
1919 pipe_write_skipped = 0; 1927 pipe_write_skipped = 0;
1920 1928

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines