diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-05-01 13:29:49 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-05-01 13:29:49 +0000 |
commit | 6073a0524023454324d2575e8667c72666597bfe (patch) | |
tree | 9a1db55ba2885315c3a83ca48b42a8ddfd3cca21 /lib/Support | |
parent | 9bc15374884b1b3f91573f32134d9b12dd824dde (diff) | |
download | external_llvm-6073a0524023454324d2575e8667c72666597bfe.zip external_llvm-6073a0524023454324d2575e8667c72666597bfe.tar.gz external_llvm-6073a0524023454324d2575e8667c72666597bfe.tar.bz2 |
Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries.
autoconf: Add checking ELM_Callback decl for mingw32 and mingw-w64.
cmake/config-ix.cmake: Add checking ELM_Callback decl for win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130657 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/Windows/DynamicLibrary.inc | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/lib/Support/Windows/DynamicLibrary.inc b/lib/Support/Windows/DynamicLibrary.inc index 2c14366..4227844 100644 --- a/lib/Support/Windows/DynamicLibrary.inc +++ b/lib/Support/Windows/DynamicLibrary.inc @@ -41,41 +41,12 @@ using namespace sys; static std::vector<HMODULE> OpenedHandles; -#ifdef _WIN64 - typedef DWORD64 ModuleBaseType; -#else - typedef ULONG ModuleBaseType; -#endif - extern "C" { -// 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) - #if _MSC_VER < 1500 && (!defined(VER_PRODUCTBUILD) || VER_PRODUCTBUILD < 6000) - #define OLD_ELM_CALLBACK_DECL 1 - #endif -#elif defined(__MINGW64__) - // Use new callback. -#elif defined(__MINGW32__) - #define OLD_ELM_CALLBACK_DECL 1 -#endif -#ifdef OLD_ELM_CALLBACK_DECL - static BOOL CALLBACK ELM_Callback(PSTR ModuleName, - ModuleBaseType ModuleBase, + static BOOL CALLBACK ELM_Callback(WIN32_ELMCB_PCSTR ModuleName, + ULONG_PTR ModuleBase, ULONG ModuleSize, PVOID UserContext) -#else - static BOOL CALLBACK ELM_Callback(PCSTR ModuleName, - ModuleBaseType ModuleBase, - ULONG ModuleSize, - PVOID UserContext) -#endif { // Ignore VC++ runtimes prior to 7.1. Somehow some of them get loaded // into the process. |