[LLVMbugs] [Bug 8848] Problem with lib/Support/Windows/DynamicLibrary.inc and mingw-w64
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 9 00:16:03 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=8848
Dongsheng Song <dongsheng.song at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #5 from Dongsheng Song <dongsheng.song at gmail.com> 2011-03-09 02:16:02 CST ---
Here is the code snip:
#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
The above code depend on __MINGW64__ defined on mingw64-gcc.
But this is not true, mingw64-gcc did not define __MINGW64__.
1) If you want distinguish mingw32 and mingw-w64, please refer the following
mail
thread:
> Is there are ways to distinguish mingw32 and mingw-w64 (32bit) compiler?
> http://www.mail-archive.com/mingw-w64-public@lists.sourceforge.net/msg02056.html
2) Or you can just check if API_VERSION_NUMBER>=11, as sezero preferred:
> http://www.mail-archive.com/mingw-w64-public@lists.sourceforge.net/msg02046.html
#if !defined(API_VERSION_NUMBER) || API_VERSION_NUMBER < 11
#define OLD_ELM_CALLBACK_DECL 1
#endif
3) Or you can use EnumerateLoadedModules64 instead of EnumerateLoadedModules,
as
Microsoft preferred:
> http://msdn.microsoft.com/en-us/library/ms679316%28VS.85%29.aspx
> This function supersedes the EnumerateLoadedModules function.
> For more information, see Updated Platform Support.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list