Fixed windows compilation (without WIN32_LEAN_AND_MEAN

windows will define a macro MAX_PRIORITY, which clashes
with the constant of the same name in http_manaher).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/hilnius@14281 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2013-10-21 04:29:40 +00:00
parent a64f187844
commit 41804c99da
4 changed files with 8 additions and 0 deletions

View File

@@ -120,6 +120,7 @@
# ifdef __CYGWIN__
# include <unistd.h>
# endif
# define WIN32_LEAN_AND_MEAN
# define _WINSOCKAPI_
# include <windows.h>
# ifdef _MSC_VER

View File

@@ -23,8 +23,13 @@
#define STK_HOST_HPP
#include "network/types.hpp"
#include "network/network_string.hpp"
// enet.h includes win32.h, which without lean_and_mean includes
// winspool.h, which defines MAX_PRIORITY as a macro, which then
// results in http_manager.hpp not being compilable.
#define WIN32_LEAN_AND_MEAN
#include <enet/enet.h>
#include <pthread.h>

View File

@@ -30,6 +30,7 @@
#include <string>
#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <winsock2.h>
#endif

View File

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