Closed Bug 569581 Opened 12 years ago Closed 11 years ago
Wrong __stdcall check on win64
I get following error when compiline on mingw-w64: In file included from /home/jacek/mozilla-build/mozilla-central64/xpcom/glue/nsThreadUtils.cpp:39:0: /home/jacek/mozilla-build/mozilla-central64/xpcom/glue/nsThreadUtils.h:323:8: error: redefinition of 'struct nsRunnableMethodTraits<R (C::*)(), Owning>' /home/jacek/mozilla-build/mozilla-central64/xpcom/glue/nsThreadUtils.h:315:51: error: previous definition of 'struct nsRunnableMethodTraits<R (C::*)(), Owning>' win64 ABI doesn't support stdcall and ignores __stdcall attributes, so it's a real redefinition. The definition is protected by #ifdef HAVE_STDCALL (and it's the only user of HAVE_STDCALL). The check in configure.in for stdcall wrongly successes on win64 (because the attribute is ignored): void foo(); void __stdcall foo(); My proposed fix is inspired by the failure and checks for true __stdcall support using templates.
Comment on attachment 448748 [details] [diff] [review] fix v1.0 I don't have mingw handy to test with, but interestingly, VC++ (where we don't run these tests anyway), fails the old configure test with the 32-bit or 64-bit compiler, but passes your new test on 32-bit.
Attachment #448748 - Flags: review?(ted.mielczarek) → review+
Thanks for quick review.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a6
Very cool, Jacek. Thanks for doing this the right way.
You need to log in before you can comment on or make changes to this bug.