Fixed compiler warnings.

The winsock2.h header should be always included before windows.h header (or we should define WIN32_LEAN_AND_MEAN). It's because windows.h header includes also winsock.h header and there is possible conflict between winsock and winsock2.

I didn't test in on Visual Studio yet. I hope there is no WIN32_LEAN_AND_MEAN redefinition errors...
This commit is contained in:
deve 2015-12-03 14:59:54 +01:00
parent 0bd15acb93
commit 94d5c19b7f
8 changed files with 6 additions and 4 deletions

@ -41,7 +41,7 @@ extern "C" {
#elif defined(ANDROID)
# include <GLES/gl.h>
#elif defined(WIN32)
# define _WINSOCKAPI_
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#else
#define GL_GLEXT_PROTOTYPES

@ -82,6 +82,7 @@ please use the included version."
using namespace irr;
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#if defined(__linux__) && !defined(ANDROID)

@ -52,6 +52,7 @@ namespace irr {
# include <dirent.h>
# include <unistd.h>
#else
# define WIN32_LEAN_AND_MEAN
# include <direct.h>
# include <windows.h>
# include <stdio.h>

@ -122,8 +122,6 @@
# include <unistd.h>
# endif
# define WIN32_LEAN_AND_MEAN
# define _WINSOCKAPI_
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# ifdef _MSC_VER
# include <direct.h>

@ -30,6 +30,7 @@
#include <errno.h>
#if defined(WIN32) && !defined(__CYGWIN__)
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#else
# include <sys/time.h>

@ -28,6 +28,7 @@
#endif
#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif

@ -74,6 +74,7 @@ Profiler profiler;
// --- Begin portable precise timer ---
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
double getTimeMilliseconds()

@ -25,7 +25,6 @@
#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# define _WINSOCKAPI_
# include <windows.h>
# include <time.h>
#else