Fabien Costantini wrote:
>> Even, if a developer would
>> not use add_fd() in one program, s/he might use it in another program
>> that can be linked (statically or via dll) with the same FLTK library.
> Good point, that add points for not permitting such practice.
>
> As for now, I'd like to support and keep the original Matt suggestion and
> implementing it as best as we can, so here's what I'm currently changing:
> The dynamic library to be loaded is by default WS2_32.DLL
> the header used in fltk is winsock2.h
> Defining the USE_WINSOCK1 compile time variable, would change this to the
> couple (winsock_32.dll/winsock.h)
>
> Because, winsock2.h is preferably used in conjunction with WS2_32.DLL (check
> Ian feedback on STR#1906) , I can't anymore dynamically propose a choice
> between winsock 1 or 2 dll.
Full (99%) ACK :-)
I would still like to load the dll at some time shortly after startup,
just to prevent later errors, if someone would start watching sockets
with add_fd() at a later time, and the winsock dll can't be loaded then.
If this is okay and working, then (maybe) we could also make the
compiler macro USE_ASYNC_SELECT obsolete. By loading the dll and ...
fl_wsk_async_select = (fl_wsk_async_select_f)
GetProcAddress(s_wsock_mod, "WSAAsyncSelect");
we get this additionally. However, I don't know, if the code with
WSAAsyncSelect() has ever been tested and would be working. Does
anybody know this?
-----
Concerning my tests with FLTK 1.3, dynamic loading of ws2_32.dll,
and using socket functions in my application: as proposed elsewhere,
I removed "-lwsock32" from "fltk-config --ldflags", and tested
some fltk test applications, and they worked as expected. Thus,
dynamically loading the winsock dll is okay.
Then, I added -lws2_32 to my application's linker commands and
tested my application with FLTK 1.3, and it worked, too. I even
used a testcase with add_fd(), and this is okay, as well :-)
So, GTG (good to go) from me, but maybe more modifications to come
(see above).
Thanks for your work, Fabien ;-)
Regards
Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev