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:
parent
0bd15acb93
commit
94d5c19b7f
@ -41,7 +41,7 @@ extern "C" {
|
|||||||
#elif defined(ANDROID)
|
#elif defined(ANDROID)
|
||||||
# include <GLES/gl.h>
|
# include <GLES/gl.h>
|
||||||
#elif defined(WIN32)
|
#elif defined(WIN32)
|
||||||
# define _WINSOCKAPI_
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#else
|
#else
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#define GL_GLEXT_PROTOTYPES
|
||||||
|
@ -82,6 +82,7 @@ please use the included version."
|
|||||||
using namespace irr;
|
using namespace irr;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(__linux__) && !defined(ANDROID)
|
#if defined(__linux__) && !defined(ANDROID)
|
||||||
|
@ -52,6 +52,7 @@ namespace irr {
|
|||||||
# include <dirent.h>
|
# include <dirent.h>
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#else
|
#else
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
|
@ -122,8 +122,6 @@
|
|||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# endif
|
# endif
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# define _WINSOCKAPI_
|
|
||||||
# define WIN32_LEAN_AND_MEAN
|
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#else
|
#else
|
||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ Profiler profiler;
|
|||||||
|
|
||||||
// --- Begin portable precise timer ---
|
// --- Begin portable precise timer ---
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
double getTimeMilliseconds()
|
double getTimeMilliseconds()
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# define _WINSOCKAPI_
|
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <time.h>
|
# include <time.h>
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user