Windows: Disable dynamic linking/loading of winsock dll.
This *preliminary* commit disables dynamic linking/loading of winsock (ws2_32.dll) and links it statically to fluid and all FLTK test programs. This is done by conditional code (#if 0) that disables the old code and #defines some macros. This *must* be removed and replaced with the original socket interface once the code has proved to work as expected. Note: example programs in the examples/ folder are not yet modified. Todo: check and fix examples/Makefile if necessary. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12947 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
9e212ec6f9
commit
e34c06ffc9
@ -504,7 +504,7 @@ if (USE_SDL)
|
||||
endif(USE_SDL)
|
||||
|
||||
if (WIN32)
|
||||
list (APPEND OPTIONAL_LIBS comctl32)
|
||||
list (APPEND OPTIONAL_LIBS comctl32 ws2_32)
|
||||
endif (WIN32)
|
||||
|
||||
if (FLTK_HAVE_CAIRO)
|
||||
|
||||
@ -134,6 +134,12 @@ static bool initial_clipboard = true;
|
||||
# define SOCKET int
|
||||
#endif
|
||||
|
||||
// Disable dynamic linking/loading of Winsock DLL (STR #3454)
|
||||
// *FIXME* The old code should be entirely removed when the issue
|
||||
// is finally resolved.
|
||||
|
||||
#if (0) // *FIXME* dynamic loading of Winsock DLL (ws2_32.dll)
|
||||
|
||||
// note: winsock2.h has been #include'd in Fl.cxx
|
||||
#define WSCK_DLL_NAME "WS2_32.DLL"
|
||||
|
||||
@ -155,6 +161,21 @@ static HMODULE get_wsock_mod() {
|
||||
return s_wsock_mod;
|
||||
}
|
||||
|
||||
#else // static linking of ws2_32.dll
|
||||
|
||||
// *FIXME* These defines and the dummy function get_wsock_mod() must be
|
||||
// *removed* when the issue (STR #3454) is finally resolved. The code that
|
||||
// uses these defines and get_wsock_mod() must be modified to use the
|
||||
// official socket interface (select() and FL_ISSET).
|
||||
|
||||
#define fl_wsk_fd_is_set FD_ISSET
|
||||
#define s_wsock_select select
|
||||
static int get_wsock_mod() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // dynamic/static linking of ws2_32.dll (see above and STR #3454)
|
||||
|
||||
/*
|
||||
* Dynamic linking of imm32.dll
|
||||
* This library is only needed for a hand full (four ATM) functions relating to
|
||||
|
||||
Loading…
Reference in New Issue
Block a user