Remove redundant windows.h includes in NLMISC

--HG--
branch : develop
This commit is contained in:
kaetemi 2015-02-24 12:47:54 +01:00
parent e2dcc3b035
commit e201c90937
17 changed files with 38 additions and 67 deletions

View file

@ -22,6 +22,18 @@
#ifdef NL_OS_WINDOWS // for win32 os only
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#ifndef _WIN32_WINDOWS
# define _WIN32_WINDOWS 0x0410
#endif
#ifndef WINVER
# define WINVER 0x0400
#endif
#ifndef NOMINMAX
# define NOMINMAX
#endif
#include <windows.h>

View file

@ -27,6 +27,18 @@
#include "nel/misc/mem_stream.h"
#include "nel/misc/dummy_window.h"
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#ifndef _WIN32_WINDOWS
# define _WIN32_WINDOWS 0x0410
#endif
#ifndef WINVER
# define WINVER 0x0400
#endif
#ifndef NOMINMAX
# define NOMINMAX
#endif
#include <windows.h>
namespace NLMISC

View file

@ -21,8 +21,16 @@
#ifdef NL_OS_WINDOWS
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#ifndef NL_COMP_MINGW
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#ifndef _WIN32_WINDOWS
# define _WIN32_WINDOWS 0x0410
#endif
#ifndef WINVER
# define WINVER 0x0400
#endif
#ifndef NOMINMAX
# define NOMINMAX
#endif
#include <windows.h>

View file

@ -43,20 +43,7 @@
#else //NL_USE_THREAD_COTASK
// some platform specifics
#if defined (NL_OS_WINDOWS)
//# define _WIN32_WINNT 0x0500
# define NL_WIN_CALLBACK CALLBACK
// Visual .NET won't allow Fibers for a Windows version older than 2000. However the basic features are sufficient for us, we want to compile them for all Windows >= 95
# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0400)
# ifdef _WIN32_WINNT
# undef _WIN32_WINNT
# endif
# define _WIN32_WINNT 0x0400
# endif
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
# define NL_WIN_CALLBACK CALLBACK
#elif defined (NL_OS_UNIX)
# define NL_WIN_CALLBACK
# include <ucontext.h>

View file

@ -20,10 +20,6 @@
#include "nel/misc/common.h"
#ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
# include <io.h>
# include <tchar.h>
#elif defined NL_OS_UNIX

View file

@ -19,11 +19,7 @@
#include "nel/misc/log.h"
#ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <process.h>
# include <windows.h>
#else
# include <unistd.h>
#endif

View file

@ -24,10 +24,6 @@
#include "nel/misc/debug.h"
#ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
# include <imagehlp.h>
# pragma comment(lib, "imagehlp.lib")
# ifdef NL_OS_WIN64

View file

@ -25,10 +25,6 @@
#include "nel/misc/xml_pack.h"
#ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
# include <sys/types.h>
# include <sys/stat.h>
# include <direct.h>

View file

@ -23,10 +23,6 @@
#include "nel/misc/path.h"
#ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
# include <windowsx.h>
# include <winuser.h>
#endif // NL_OS_WINDOWS

View file

@ -19,12 +19,7 @@
#include "nel/misc/shared_memory.h"
#include "nel/misc/debug.h"
#ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
#else
#ifndef NL_OS_WINDOWS
# include <sys/types.h>
# include <sys/ipc.h>
# include <sys/shm.h>

View file

@ -43,6 +43,7 @@
#include <vector>
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
# define _WIN32_WINDOWS 0x0410
# ifndef NL_COMP_MINGW
# define WINVER 0x0400

View file

@ -19,10 +19,6 @@
#include "nel/misc/system_info.h"
#ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
# include <WinNT.h>
# include <tchar.h>
# include <intrin.h>

View file

@ -18,11 +18,6 @@
#include "nel/misc/system_utils.h"
#ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW
#define NOMINMAX
#endif
#include <windows.h>
#ifdef _WIN32_WINNT_WIN7
// only supported by Windows 7 Platform SDK
#include <ShObjIdl.h>

View file

@ -20,12 +20,7 @@
#include "nel/misc/sstring.h"
#include "nel/misc/thread.h"
#ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
#elif defined (NL_OS_UNIX)
#if defined (NL_OS_UNIX)
# include <sys/time.h>
# include <unistd.h>
#endif

View file

@ -20,8 +20,6 @@
#ifdef NL_OS_WINDOWS
#include <windows.h>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif

View file

@ -18,10 +18,6 @@
#include "nel/misc/win_displayer.h"
#ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW
# define NOMINMAX
#endif
#include <windows.h>
#include <windowsx.h>
#include <winuser.h>
#include <cstring>

View file

@ -22,10 +22,6 @@
#include "nel/misc/event_server.h"
#ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW
#define NOMINMAX
#endif
#include <windows.h>
#include <windowsx.h>
/**