mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Fix choice of version of Windows callback to use to consider not only the Visual Studio version, but also the Windows SDK version.
Patch by Tareq Siraj. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70299 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
08e791fdb3
commit
5a4e11dd3f
@ -19,6 +19,10 @@
|
|||||||
#include <dbghelp.h>
|
#include <dbghelp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include <ntverp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
#if (HAVE_LIBIMAGEHLP != 1)
|
#if (HAVE_LIBIMAGEHLP != 1)
|
||||||
#error "libimagehlp.a should be present"
|
#error "libimagehlp.a should be present"
|
||||||
@ -44,7 +48,14 @@ static std::vector<HMODULE> OpenedHandles;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#if !defined(_MSC_VER) || _MSC_VER < 1500
|
// Use old callback if:
|
||||||
|
// - Not using Visual Studio
|
||||||
|
// - Visual Studio 2005 or earlier but only if we are not using the Windows SDK
|
||||||
|
// or Windows SDK version is older than 6.0
|
||||||
|
// Use new callback if:
|
||||||
|
// - Newer Visual Studio (comes with newer SDK).
|
||||||
|
// - Visual Studio 2005 with Windows SDK 6.0+
|
||||||
|
#if !defined(_MSC_VER) || _MSC_VER < 1500 && (!defined(VER_PRODUCTBUILD) || VER_PRODUCTBUILD < 6000)
|
||||||
static BOOL CALLBACK ELM_Callback(PSTR ModuleName,
|
static BOOL CALLBACK ELM_Callback(PSTR ModuleName,
|
||||||
ModuleBaseType ModuleBase,
|
ModuleBaseType ModuleBase,
|
||||||
ULONG ModuleSize,
|
ULONG ModuleSize,
|
||||||
|
Loading…
Reference in New Issue
Block a user