Remove redundant windows.h includes in NLMISC
This commit is contained in:
parent
946d80ae18
commit
edd1597b07
17 changed files with 38 additions and 67 deletions
|
@ -22,6 +22,18 @@
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS // for win32 os only
|
#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>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,18 @@
|
||||||
#include "nel/misc/mem_stream.h"
|
#include "nel/misc/mem_stream.h"
|
||||||
#include "nel/misc/dummy_window.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>
|
#include <windows.h>
|
||||||
|
|
||||||
namespace NLMISC
|
namespace NLMISC
|
||||||
|
|
|
@ -21,8 +21,16 @@
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#ifndef NL_COMP_MINGW
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#ifndef _WIN32_WINDOWS
|
||||||
|
# define _WIN32_WINDOWS 0x0410
|
||||||
|
#endif
|
||||||
|
#ifndef WINVER
|
||||||
|
# define WINVER 0x0400
|
||||||
|
#endif
|
||||||
|
#ifndef NOMINMAX
|
||||||
# define NOMINMAX
|
# define NOMINMAX
|
||||||
#endif
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
|
@ -43,20 +43,7 @@
|
||||||
#else //NL_USE_THREAD_COTASK
|
#else //NL_USE_THREAD_COTASK
|
||||||
// some platform specifics
|
// some platform specifics
|
||||||
#if defined (NL_OS_WINDOWS)
|
#if defined (NL_OS_WINDOWS)
|
||||||
//# define _WIN32_WINNT 0x0500
|
# define NL_WIN_CALLBACK CALLBACK
|
||||||
# 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>
|
|
||||||
#elif defined (NL_OS_UNIX)
|
#elif defined (NL_OS_UNIX)
|
||||||
# define NL_WIN_CALLBACK
|
# define NL_WIN_CALLBACK
|
||||||
# include <ucontext.h>
|
# include <ucontext.h>
|
||||||
|
|
|
@ -20,10 +20,6 @@
|
||||||
#include "nel/misc/common.h"
|
#include "nel/misc/common.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
# ifndef NL_COMP_MINGW
|
|
||||||
# define NOMINMAX
|
|
||||||
# endif
|
|
||||||
# include <windows.h>
|
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# include <tchar.h>
|
# include <tchar.h>
|
||||||
#elif defined NL_OS_UNIX
|
#elif defined NL_OS_UNIX
|
||||||
|
|
|
@ -19,11 +19,7 @@
|
||||||
#include "nel/misc/log.h"
|
#include "nel/misc/log.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
# ifndef NL_COMP_MINGW
|
|
||||||
# define NOMINMAX
|
|
||||||
# endif
|
|
||||||
# include <process.h>
|
# include <process.h>
|
||||||
# include <windows.h>
|
|
||||||
#else
|
#else
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,10 +24,6 @@
|
||||||
#include "nel/misc/debug.h"
|
#include "nel/misc/debug.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
# ifndef NL_COMP_MINGW
|
|
||||||
# define NOMINMAX
|
|
||||||
# endif
|
|
||||||
# include <windows.h>
|
|
||||||
# include <imagehlp.h>
|
# include <imagehlp.h>
|
||||||
# pragma comment(lib, "imagehlp.lib")
|
# pragma comment(lib, "imagehlp.lib")
|
||||||
# ifdef NL_OS_WIN64
|
# ifdef NL_OS_WIN64
|
||||||
|
|
|
@ -25,10 +25,6 @@
|
||||||
#include "nel/misc/xml_pack.h"
|
#include "nel/misc/xml_pack.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
# ifndef NL_COMP_MINGW
|
|
||||||
# define NOMINMAX
|
|
||||||
# endif
|
|
||||||
# include <windows.h>
|
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
|
|
|
@ -23,10 +23,6 @@
|
||||||
#include "nel/misc/path.h"
|
#include "nel/misc/path.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
# ifndef NL_COMP_MINGW
|
|
||||||
# define NOMINMAX
|
|
||||||
# endif
|
|
||||||
# include <windows.h>
|
|
||||||
# include <windowsx.h>
|
# include <windowsx.h>
|
||||||
# include <winuser.h>
|
# include <winuser.h>
|
||||||
#endif // NL_OS_WINDOWS
|
#endif // NL_OS_WINDOWS
|
||||||
|
|
|
@ -19,12 +19,7 @@
|
||||||
#include "nel/misc/shared_memory.h"
|
#include "nel/misc/shared_memory.h"
|
||||||
#include "nel/misc/debug.h"
|
#include "nel/misc/debug.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifndef NL_OS_WINDOWS
|
||||||
# ifndef NL_COMP_MINGW
|
|
||||||
# define NOMINMAX
|
|
||||||
# endif
|
|
||||||
# include <windows.h>
|
|
||||||
#else
|
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <sys/ipc.h>
|
# include <sys/ipc.h>
|
||||||
# include <sys/shm.h>
|
# include <sys/shm.h>
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# define _WIN32_WINDOWS 0x0410
|
# define _WIN32_WINDOWS 0x0410
|
||||||
# ifndef NL_COMP_MINGW
|
# ifndef NL_COMP_MINGW
|
||||||
# define WINVER 0x0400
|
# define WINVER 0x0400
|
||||||
|
|
|
@ -19,10 +19,6 @@
|
||||||
#include "nel/misc/system_info.h"
|
#include "nel/misc/system_info.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
# ifndef NL_COMP_MINGW
|
|
||||||
# define NOMINMAX
|
|
||||||
# endif
|
|
||||||
# include <windows.h>
|
|
||||||
# include <WinNT.h>
|
# include <WinNT.h>
|
||||||
# include <tchar.h>
|
# include <tchar.h>
|
||||||
# include <intrin.h>
|
# include <intrin.h>
|
||||||
|
|
|
@ -18,11 +18,6 @@
|
||||||
#include "nel/misc/system_utils.h"
|
#include "nel/misc/system_utils.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
#ifndef NL_COMP_MINGW
|
|
||||||
#define NOMINMAX
|
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
#ifdef _WIN32_WINNT_WIN7
|
#ifdef _WIN32_WINNT_WIN7
|
||||||
// only supported by Windows 7 Platform SDK
|
// only supported by Windows 7 Platform SDK
|
||||||
#include <ShObjIdl.h>
|
#include <ShObjIdl.h>
|
||||||
|
|
|
@ -20,12 +20,7 @@
|
||||||
#include "nel/misc/sstring.h"
|
#include "nel/misc/sstring.h"
|
||||||
#include "nel/misc/thread.h"
|
#include "nel/misc/thread.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#if defined (NL_OS_UNIX)
|
||||||
# ifndef NL_COMP_MINGW
|
|
||||||
# define NOMINMAX
|
|
||||||
# endif
|
|
||||||
# include <windows.h>
|
|
||||||
#elif defined (NL_OS_UNIX)
|
|
||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
#ifdef DEBUG_NEW
|
#ifdef DEBUG_NEW
|
||||||
#define new DEBUG_NEW
|
#define new DEBUG_NEW
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,10 +18,6 @@
|
||||||
#include "nel/misc/win_displayer.h"
|
#include "nel/misc/win_displayer.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
#ifndef NL_COMP_MINGW
|
|
||||||
# define NOMINMAX
|
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
|
||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
#include <winuser.h>
|
#include <winuser.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
|
@ -22,10 +22,6 @@
|
||||||
#include "nel/misc/event_server.h"
|
#include "nel/misc/event_server.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
#ifndef NL_COMP_MINGW
|
|
||||||
#define NOMINMAX
|
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
|
||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue