Merge pull request #1887 from bradhugh/min_max_v2

Move special windows.h include directives to build defines (nw)
This commit is contained in:
Vas Crabb 2016-12-29 11:48:32 +11:00 committed by GitHub
commit aab749f5e5
55 changed files with 52 additions and 97 deletions

View File

@ -109,6 +109,8 @@ if _OPTIONS["targetos"]=="windows" then
"_UNICODE",
"main=utf8_main",
"_WIN32_WINNT=0x0501",
"WIN32_LEAN_AND_MEAN",
"NOMINMAX",
}
configuration { }

View File

@ -11,6 +11,8 @@ defines {
"_WIN32_WINNT=0x0603",
"NTDDI_VERSION=0x06030000",
"MODERN_WIN_API",
"WIN32_LEAN_AND_MEAN",
"NOMINMAX",
}
flags {

View File

@ -3,6 +3,8 @@
defines {
"OSD_WINDOWS",
"WIN32_LEAN_AND_MEAN",
"NOMINMAX",
}
configuration { "mingw* or vs*" }

View File

@ -10,7 +10,6 @@
#define __DEBUG_WIN_DEBUG_WIN_H__
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
#include <tchar.h>

View File

@ -11,7 +11,6 @@
#if defined(OSD_WINDOWS) || defined(SDLMAME_WIN32)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
@ -22,8 +21,6 @@
#include <memory>
#include <vector>
#undef min
#undef max
#include <utility>
#include "modules/lib/osdlib.h"

View File

@ -7,7 +7,6 @@
//============================================================
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shlwapi.h>
#include <tchar.h>

View File

@ -6,7 +6,6 @@
//
//============================================================
#define WIN32_LEAN_AND_MEAN
#include "winfile.h"

View File

@ -1,7 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Aaron Giles, Vas Crabb
#define WIN32_LEAN_AND_MEAN
#include "winfile.h"

View File

@ -7,7 +7,6 @@
//============================================================
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shlwapi.h>
#include <tchar.h>

View File

@ -6,7 +6,6 @@
//
//============================================================
#define WIN32_LEAN_AND_MEAN
#include "winfile.h"

View File

@ -1,7 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Aaron Giles, Vas Crabb
#define WIN32_LEAN_AND_MEAN
#include "winrtfile.h"

View File

@ -6,7 +6,6 @@
//
//============================================================
#define WIN32_LEAN_AND_MEAN
#include "winfile.h"

View File

@ -6,7 +6,6 @@
//
//============================================================
#define WIN32_LEAN_AND_MEAN
#include "winfile.h"

View File

@ -11,7 +11,6 @@
#if defined(OSD_WINDOWS) || defined(OSD_UWP)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <memory>

View File

@ -5,7 +5,6 @@
*
*/
#define WIN32_LEAN_AND_MEAN
#include "font_module.h"
#include "modules/osdmodule.h"

View File

@ -21,8 +21,6 @@
#include <queue>
#include <algorithm>
#include <functional>
#undef min
#undef max
//============================================================

View File

@ -12,7 +12,6 @@
#if defined(OSD_WINDOWS)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <initguid.h>
#include <tchar.h>
@ -22,8 +21,6 @@
#undef WINNT
#include <dinput.h>
#undef interface
#undef min
#undef max
#include <mutex>

View File

@ -12,12 +12,9 @@
#if defined(OSD_WINDOWS)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#undef interface
#undef min
#undef max
#include <mutex>
#include <functional>

View File

@ -14,8 +14,6 @@
#include <agile.h>
#include <ppltasks.h>
#include <collection.h>
#undef min
#undef max
#undef interface
// MAME headers

View File

@ -12,12 +12,9 @@
#if defined(OSD_WINDOWS)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#undef interface
#undef min
#undef max
// MAME headers
#include "emu.h"

View File

@ -10,7 +10,6 @@
#define INPUT_WIN_H_
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef interface

View File

@ -11,22 +11,19 @@
#if defined(OSD_WINDOWS)
#include <wbemcli.h>
#include <list>
#include <vector>
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <wrl/client.h>
#include <wbemcli.h>
// XInput/DirectInput
#include <xinput.h>
#include <dinput.h>
#undef interface
#undef min
#undef max
// MAME headers
#include "emu.h"

View File

@ -12,15 +12,12 @@
#if defined(OSD_WINDOWS)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// XInput header
#include <xinput.h>
#undef interface
#undef min
#undef max
// MAME headers
#include "emu.h"

View File

@ -8,7 +8,6 @@
//
//============================================================
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>

View File

@ -8,7 +8,6 @@
//
//============================================================
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>

View File

@ -11,13 +11,10 @@
#if defined(OSD_WINDOWS) || defined(OSD_UWP)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <dxgi1_2.h>
#include <wrl/client.h>
#undef interface
#undef min
#undef max
#include "strconv.h"
#include "modules/lib/osdlib.h"

View File

@ -11,11 +11,8 @@
#if defined(OSD_WINDOWS)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef interface
#undef min
#undef max
#include "strconv.h"
#include "windows/video.h"

View File

@ -10,7 +10,6 @@
#include "modules/lib/osdlib.h"
#if defined(SDLMAME_WIN32) || defined(OSD_WINDOWS)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef interface
#define LIB_NAME "wpcap.dll"

View File

@ -16,7 +16,6 @@
// standard windows headers
#ifdef OSD_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
#include <mmsystem.h>
@ -26,8 +25,6 @@
// forward declaration
struct SDL_Window;
#endif
#undef min
#undef max
//============================================================
// TYPE DEFINITIONS

View File

@ -13,7 +13,6 @@
#if defined(OSD_WINDOWS)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// MAME headers

View File

@ -20,8 +20,6 @@
#include <bx/readerwriter.h>
#include <bx/crtimpl.h>
#undef min
#undef max
#include "bgfxutil.h"
#include "chainmanager.h"

View File

@ -7,7 +7,6 @@
//============================================================
#if defined(SDLMAME_WIN32) || defined(OSD_WINDOWS) || defined(OSD_UWP)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if defined(SDLMAME_WIN32)
#include <SDL2/SDL_syswm.h>

View File

@ -13,7 +13,6 @@
#ifdef OSD_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <mmsystem.h>

View File

@ -12,7 +12,6 @@
#define __DRAWGDI__
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// MAME headers

View File

@ -7,7 +7,6 @@
//============================================================
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// MAME headers

View File

@ -12,7 +12,6 @@
#if defined(OSD_WINDOWS) || defined(SDLMAME_WIN32)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>
@ -20,8 +19,6 @@
#undef WINNT
#include <dsound.h>
#undef interface
#undef min
#undef max
// MAME headers
#include "emu.h"

View File

@ -12,7 +12,6 @@
#if defined(OSD_WINDOWS) || defined(OSD_UWP)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <wrl/client.h>
@ -21,8 +20,6 @@
#include <xaudio2.h>
#undef interface
#undef min
#undef max
// stdlib includes
#include <mutex>

View File

@ -7,7 +7,6 @@
//============================================================
#if defined(OSD_WINDOWS) || defined(SDLMAME_WIN32)
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <process.h>
#include <tchar.h>
@ -21,8 +20,6 @@
#include <atomic>
#include <thread>
#include <vector>
#undef min
#undef max
#include <algorithm>
// MAME headers
#include "osdcore.h"

View File

@ -29,7 +29,6 @@
// only for strconv.h
#if defined(SDLMAME_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif

View File

@ -9,7 +9,6 @@
//============================================================
#ifdef SDLMAME_WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif

View File

@ -6,11 +6,8 @@
//
//============================================================
#if defined(SDLMAME_WIN32) || defined(OSD_WINDOWS) || defined(OSD_UWP)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#undef min
#undef max
#include <algorithm>
#include <assert.h>
// MAMEOS headers

View File

@ -19,10 +19,6 @@
#if defined(WIN32)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
namespace osd

View File

@ -8,9 +8,9 @@
#include "uwpcompat.h"
#include <errno.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <errno.h>
#undef interface
#include "emu.h"

View File

@ -13,7 +13,9 @@
extern "C" {
#endif
#define WIN32_LEAN_AND_MEAN
#ifndef NOGDI
#define NOGDI
#endif
#include <windows.h>
#include <stdio.h>
@ -65,6 +67,38 @@ FILE *_popen(
int _pclose(
FILE *stream);
_Ret_maybenull_
HMODULE WINAPI LoadLibraryA(
_In_ LPCSTR lpFileName
);
_Ret_maybenull_
HMODULE WINAPI LoadLibraryW(
_In_ LPCWSTR lpFileName
);
#ifdef UNICODE
#define LoadLibrary LoadLibraryW
#else
#define LoadLibrary LoadLibraryA
#endif // !UNICODE
_Ret_maybenull_
HMODULE WINAPI GetModuleHandleA(
_In_ LPCSTR lpModuleName
);
_Ret_maybenull_
HMODULE WINAPI GetModuleHandleW(
_In_ LPCWSTR lpModuleName
);
#ifdef UNICODE
#define GetModuleHandle GetModuleHandleW
#else
#define GetModuleHandle GetModuleHandleA
#endif // !UNICODE
_Ret_maybenull_
HMODULE
WINAPI
@ -83,6 +117,12 @@ LoadLibraryExW(
_In_ DWORD dwFlags
);
#ifdef UNICODE
#define LoadLibraryEx LoadLibraryExW
#else
#define LoadLibraryEx LoadLibraryExA
#endif // !UNICODE
DWORD
WINAPI
GetFileSize(
@ -90,12 +130,6 @@ GetFileSize(
_Out_opt_ LPDWORD lpFileSizeHigh
);
#ifdef UNICODE
#define LoadLibraryEx LoadLibraryExW
#else
#define LoadLibraryEx LoadLibraryExA
#endif // !UNICODE
#ifdef __cplusplus
}
#endif

View File

@ -6,9 +6,9 @@
//
//============================================================
// standard windows headers
#include <exception>
#define WIN32_LEAN_AND_MEAN
// standard windows headers
#include <windows.h>
#include <dxgi1_2.h>
#include <wrl\client.h>

View File

@ -46,9 +46,6 @@ using namespace Windows::UI::Core;
#define MAKE_DI_SCAN(scan, isextended) (scan & 0x7f) | (isextended ? 0x80 : 0x00)
#define WINOSD(machine) downcast<windows_osd_interface*>(&machine.osd())
#undef min
#undef max
//============================================================
// PARAMETERS
//============================================================

View File

@ -10,14 +10,11 @@
#define __UWP_WINDOW__
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
#include <mmsystem.h>
#include <inspectable.h>
#include <agile.h>
#undef min
#undef max
#include <chrono>
#include <mutex>

View File

@ -29,7 +29,6 @@
//============================================================
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winioctl.h>

View File

@ -10,7 +10,6 @@
#ifdef OSD_SDL
#define _WIN32_WINNT 0x0501
#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <stdlib.h>

View File

@ -7,7 +7,6 @@
//============================================================
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// MAME headers

View File

@ -10,7 +10,6 @@
#define __WIN_WINDOW__
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
#include <mmsystem.h>

View File

@ -10,7 +10,6 @@
#include <functional>
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <commctrl.h>
#include <mmsystem.h>

View File

@ -7,7 +7,6 @@
//============================================================
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "emu.h"

View File

@ -7,7 +7,6 @@
//============================================================
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shellapi.h>
#include <stdlib.h>

View File

@ -7,7 +7,6 @@
//============================================================
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <direct.h>