Fixed: Some Windows.h inclusions

This commit is contained in:
kervala 2012-05-21 10:03:08 +02:00
parent 6e1400091e
commit 4c0d138212
5 changed files with 24 additions and 2 deletions

View file

@ -22,8 +22,9 @@
#include <vector> #include <vector>
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# define NOMINMAX struct HINSTANCE__;
# include <windows.h> typedef struct HINSTANCE__ *HINSTANCE;
typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */
#else #else
# include <dlfcn.h> # include <dlfcn.h>
#endif #endif

View file

@ -42,6 +42,20 @@ namespace NLMISC
class CWindowDisplayer; class CWindowDisplayer;
} }
#if defined(NL_OS_WINDOWS) && defined(_WINDOWS)
#ifndef WINAPI
#define WINAPI __stdcall
#endif
#ifndef APIENTRY
#define APIENTRY WINAPI
#endif
struct HINSTANCE__;
typedef struct HINSTANCE__ *HINSTANCE;
typedef char CHAR;
typedef CHAR *LPSTR;
#endif
namespace NLNET namespace NLNET
{ {

View file

@ -55,6 +55,7 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#define NOMINMAX #define NOMINMAX
#include <WinSock2.h>
#include <windows.h> #include <windows.h>
#endif #endif

View file

@ -22,6 +22,10 @@
#include "source_fmod.h" #include "source_fmod.h"
#include "buffer_fmod.h" #include "buffer_fmod.h"
#ifdef NL_OS_WINDOWS
#include <Windows.h>
#endif
using namespace std; using namespace std;
using namespace NLMISC; using namespace NLMISC;

View file

@ -34,6 +34,8 @@ using namespace std;
#ifdef _MSC_VER #ifdef _MSC_VER
#include <Windows.h>
/** A special stream buffer that output in the 'output debug string' feature of windows. /** A special stream buffer that output in the 'output debug string' feature of windows.
*/ */
class CDebugOutput : public streambuf class CDebugOutput : public streambuf