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

Comparing libev/ev_select.c (file contents):
Revision 1.36 by root, Wed Jun 4 07:42:58 2008 UTC vs.
Revision 1.37 by root, Mon Jun 9 14:11:30 2008 UTC

77 SOCKET handle = anfds [fd].handle; 77 SOCKET handle = anfds [fd].handle;
78 #else 78 #else
79 int handle = fd; 79 int handle = fd;
80 #endif 80 #endif
81 81
82 /* FD_SET is broken on windows (it adds the fd to a set twice or more,
83 * which eventually leads to overflows). Need to call it only on changes.
84 */
85 #if EV_SELECT_IS_WINSOCKET
86 if ((oev ^ nev) & EV_READ)
87 #endif
82 if (nev & EV_READ) 88 if (nev & EV_READ)
83 FD_SET (handle, (fd_set *)vec_ri); 89 FD_SET (handle, (fd_set *)vec_ri);
84 else 90 else
85 FD_CLR (handle, (fd_set *)vec_ri); 91 FD_CLR (handle, (fd_set *)vec_ri);
86 92
93 #if EV_SELECT_IS_WINSOCKET
94 if ((oev ^ nev) & EV_WRITE)
95 #endif
87 if (nev & EV_WRITE) 96 if (nev & EV_WRITE)
88 FD_SET (handle, (fd_set *)vec_wi); 97 FD_SET (handle, (fd_set *)vec_wi);
89 else 98 else
90 FD_CLR (handle, (fd_set *)vec_wi); 99 FD_CLR (handle, (fd_set *)vec_wi);
91 100
92#else 101#else
93 102
94 int word = fd / NFDBITS; 103 int word = fd / NFDBITS;
95 fd_mask mask = 1UL << (fd % NFDBITS); 104 fd_mask mask = 1UL << (fd % NFDBITS);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines