DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2031
Version: 1.3-current


As already seen in STR 1906 [1], Fl::ready() loads the Winsock dll, even if
there is no socket to watch (no previous add_fd() call, or all sockets
removed again).

The attached patch "Fl_win32_select.patch" solves this issue by checking
if nfds is non-zero before calling select().

The first (longer) part of this patch does only correct the indentation of
some lines. [2]

The second (one line) part adds the nfds check.

I tested this with the modified hello.cxx, as posted in STR 1906 [1],
and it works as expected.

Note: Although the attached patch file is for Windows only, similar
changes should be considered for Fl_x.cxx and Fl_mac.cxx. Therefore, I
marked this STR with Scope 3 (all operating systems).

---
[1] http://www.fltk.org/str.php?L1906 - 08:32 Aug 27, 2008
[2] http://www.fltk.org/cmp.php#CODING_STANDARDS


Link: http://www.fltk.org/str.php?L2031
Version: 1.3-current

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to