diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2010-12-08 14:00:35 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2010-12-08 14:00:35 +0000 |
| commit | 97b4b0c704aef8194ab0f5d814d39452d0b3221f (patch) | |
| tree | 3c916fe9b80941338f730a440309066501dfbb80 /src/Fl.cxx | |
| parent | ef831abaa73298d9648010d8aede52dc95fcaee1 (diff) | |
Fixed Compiling with mingw-w64 (STR #2308).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7978 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 6a4daaabe..d0042ba77 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -33,8 +33,20 @@ #include "config.h" #include <FL/Fl.H> #include <FL/Fl_Window.H> -#include <FL/x.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) +#if defined(WIN32) && !defined(__CYGWIN__) +# if !defined(USE_WSOCK1) +# include <winsock2.h> +# else +# include <winsock.h> +# endif +#endif + +#include <FL/x.H> + #include <ctype.h> #include <stdio.h> #include <stdlib.h> |
