diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2011-10-21 09:38:50 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2011-10-21 09:38:50 +0000 |
commit | cda065df614dbf7ca0f6a169e9536d2241539b75 (patch) | |
tree | 8dd17be847417f874ccb9022fba2042fb24df9d5 /lib/Support/Windows/Signals.inc | |
parent | 4a85cc982a977ddeb0249eb9304326deabe3a7a5 (diff) |
Fix build on mingw-w64.
Patch by Ruben Van Boxem!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142646 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Windows/Signals.inc')
-rw-r--r-- | lib/Support/Windows/Signals.inc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Support/Windows/Signals.inc b/lib/Support/Windows/Signals.inc index 473168edfc..0d4b8a26b0 100644 --- a/lib/Support/Windows/Signals.inc +++ b/lib/Support/Windows/Signals.inc @@ -41,10 +41,11 @@ #pragma GCC diagnostic ignored "-Wformat" #pragma GCC diagnostic ignored "-Wformat-extra-args" - // MinGW does not have updated support for the 64-bit versions of the DebugHlp - // APIs. So we will have to load them manually. The structures and method - // signatures were pulled from DbgHelp.h in the Windows Platform SDK, and - // adjusted for brevity. + #if !defined(__MINGW64_VERSION_MAJOR) + // MinGW.org does not have updated support for the 64-bit versions of the + // DebugHlp APIs. So we will have to load them manually. The structures and + // method signatures were pulled from DbgHelp.h in the Windows Platform SDK, + // and adjusted for brevity. typedef struct _IMAGEHLP_LINE64 { DWORD SizeOfStruct; PVOID Key; @@ -147,6 +148,7 @@ static bool load64BitDebugHelp(void) { } return StackWalk64 != NULL; } + #endif // !defined(__MINGW64_VERSION_MAJOR) #endif // __MINGW32__ // Forward declare. @@ -207,8 +209,8 @@ static int CRTReportHook(int ReportType, char *Message, int *Return) { #endif static void RegisterHandler() { -#if __MINGW32__ - // On MinGW, we need to load up the symbols explicitly, because the +#if __MINGW32__ && !defined(__MINGW64_VERSION_MAJOR) + // On MinGW.org, we need to load up the symbols explicitly, because the // Win32 framework they include does not have support for the 64-bit // versions of the APIs we need. If we cannot load up the APIs (which // would be unexpected as they should exist on every version of Windows |