Windows: removed hidden old winsock 1 (wsock32.dll) support, as
discussed in fltk.development. We exclusively use winsock 2 (ws2_32.dll) and winsock2.h now. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7987 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
ea3cb98f4f
commit
ceba5030a1
7
CHANGES
7
CHANGES
@ -188,9 +188,10 @@ CHANGES IN FLTK 1.3.0
|
||||
Fl_Value_Input, and Fl_Text_Display derived
|
||||
widgets (STR #1770)
|
||||
- Initial setup (STR #1904)
|
||||
- winsock dll is dynamically loaded and by default
|
||||
ws2_32.dll, use of winsock1 is still possible by defining
|
||||
USE_WSOCK1 at compile time.
|
||||
- FLTK now uses winsock2 (ws2_32.dll) instead of wsock32.dll
|
||||
for Windows. The dll is loaded dynamically only if/when
|
||||
needed; there is no need to link with winsock (ws2_32.lib)
|
||||
if your program doesn't need socket operations.
|
||||
- Cairo support: added --enable-cairo and --enable-cairoext
|
||||
configure options.
|
||||
- visualc(6) & vc2005 devenv's are in the ide subdirectory
|
||||
|
@ -35,14 +35,10 @@
|
||||
#include <FL/Fl_Window.H>
|
||||
#include <FL/Fl_Tooltip.H>
|
||||
|
||||
// recent versions of MinGW warn us "Please include winsock2.h before windows.h"
|
||||
// hence we must include winsock*.h before FL/x.H (A.S. Dec. 2010)
|
||||
// recent versions of MinGW warn: "Please include winsock2.h before windows.h",
|
||||
// hence we must include winsock2.h before FL/x.H (A.S. Dec. 2010)
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
# if !defined(USE_WSOCK1)
|
||||
# include <winsock2.h>
|
||||
# else
|
||||
# include <winsock.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <FL/x.H>
|
||||
|
@ -29,6 +29,8 @@
|
||||
// in. Search other files for "WIN32" or filenames ending in _win32.cxx
|
||||
// for other system-specific code.
|
||||
|
||||
// This file must be #include'd in Fl.cxx and not compiled separately.
|
||||
|
||||
#ifndef FL_DOXYGEN
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/fl_utf8.h>
|
||||
@ -46,22 +48,17 @@
|
||||
# include <sys/time.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
// note: the corresponding winsock*.h has been #include'd in Fl.cxx
|
||||
#if !defined(USE_WSOCK1)
|
||||
# define WSCK_DLL_NAME "WS2_32.DLL"
|
||||
#else
|
||||
# define WSCK_DLL_NAME "WSOCK32.DLL"
|
||||
|
||||
#if !defined(NO_TRACK_MOUSE)
|
||||
#include <commctrl.h> // TrackMouseEvent
|
||||
#endif
|
||||
#include <winuser.h>
|
||||
#include <commctrl.h>
|
||||
#include <FL/x.H>
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
# include <ole2.h>
|
||||
# include <shellapi.h>
|
||||
#include <ole2.h>
|
||||
#include <shellapi.h>
|
||||
|
||||
#include "aimm.h"
|
||||
|
||||
@ -97,12 +94,16 @@ FL_EXPORT Fl_Surface_Device *fl_surface = (Fl_Surface_Device*)fl_display_device;
|
||||
#if defined(__CYGWIN__) && !defined(SOCKET)
|
||||
# define SOCKET int
|
||||
#endif
|
||||
|
||||
// note: winsock2.h has been #include'd in Fl.cxx
|
||||
#define WSCK_DLL_NAME "WS2_32.DLL"
|
||||
|
||||
typedef int (WINAPI* fl_wsk_select_f)(int, fd_set*, fd_set*, fd_set*, const struct timeval*);
|
||||
typedef int (WINAPI* fl_wsk_fd_is_set_f)(SOCKET, fd_set *);
|
||||
|
||||
static HMODULE s_wsock_mod = 0;
|
||||
static fl_wsk_select_f s_wsock_select=0;
|
||||
static fl_wsk_fd_is_set_f fl_wsk_fd_is_set=0;
|
||||
static fl_wsk_select_f s_wsock_select = 0;
|
||||
static fl_wsk_fd_is_set_f fl_wsk_fd_is_set = 0;
|
||||
|
||||
static HMODULE get_wsock_mod() {
|
||||
if (!s_wsock_mod) {
|
||||
|
Loading…
Reference in New Issue
Block a user