Fix compilation of NLNET under MinGW

This commit is contained in:
kaetemi 2014-06-17 21:56:53 +02:00
parent 5b47ca4709
commit 5a48e60763
11 changed files with 33 additions and 11 deletions

View file

@ -63,6 +63,8 @@
#include "nel/misc/file.h" #include "nel/misc/file.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW
#define NOMINMAX #define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
#endif #endif

View file

@ -25,7 +25,9 @@
#include "nel/misc/o_xml.h" #include "nel/misc/o_xml.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW
#define NOMINMAX #define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -24,7 +24,9 @@
#include "nel/net/net_log.h" #include "nel/net/net_log.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#elif defined NL_OS_UNIX #elif defined NL_OS_UNIX
# include <netinet/in.h> # include <netinet/in.h>

View file

@ -22,7 +22,9 @@
#include "nel/net/net_log.h" #include "nel/net/net_log.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#elif defined NL_OS_UNIX #elif defined NL_OS_UNIX
# include <unistd.h> # include <unistd.h>

View file

@ -25,7 +25,9 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#elif defined NL_OS_UNIX #elif defined NL_OS_UNIX
# include <netinet/in.h> # include <netinet/in.h>

View file

@ -22,7 +22,9 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
typedef sint socklen_t; typedef sint socklen_t;

View file

@ -24,8 +24,10 @@
// these defines is for IsDebuggerPresent(). it'll not compile on windows 95 // these defines is for IsDebuggerPresent(). it'll not compile on windows 95
// just comment this and the IsDebuggerPresent to compile on windows 95 // just comment this and the IsDebuggerPresent to compile on windows 95
# define _WIN32_WINDOWS 0x0410 # define _WIN32_WINDOWS 0x0410
# ifndef NL_COMP_MINGW
# define WINVER 0x0400 # define WINVER 0x0400
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
# include <direct.h> # include <direct.h>
#elif defined NL_OS_UNIX #elif defined NL_OS_UNIX

View file

@ -22,7 +22,9 @@
#include "nel/misc/hierarchical_timer.h" #include "nel/misc/hierarchical_timer.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <winsock2.h> # include <winsock2.h>
# include <windows.h> # include <windows.h>
# define socklen_t int # define socklen_t int

View file

@ -17,7 +17,9 @@
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <winsock2.h> # include <winsock2.h>
# include <windows.h> # include <windows.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -21,7 +21,9 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# include <winsock2.h> # include <winsock2.h>
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
# define socklen_t int # define socklen_t int
# define ERROR_NUM WSAGetLastError() # define ERROR_NUM WSAGetLastError()

View file

@ -21,7 +21,9 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# include <winsock2.h> # include <winsock2.h>
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
# define socklen_t int # define socklen_t int
# define ERROR_NUM WSAGetLastError() # define ERROR_NUM WSAGetLastError()