Closed Bug 569581 Opened 11 years ago Closed 11 years ago

Wrong __stdcall check on win64.

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla2.0b1

People

(Reporter: jacek, Assigned: jacek)

References

Details

Attachments

(1 file)

Attached patch fix v1.0Splinter Review
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.
Attachment #448748 - Attachment is patch: true
Attachment #448748 - Flags: review?(ted.mielczarek)
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+
Assignee: nobody → jacek
Thanks for quick review.
Keywords: checkin-needed
Blocks: 570342
http://hg.mozilla.org/mozilla-central/rev/745ba13c5268
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a6
Very cool, Jacek.  Thanks for doing this the right way.
Blocks: 803855
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.