Closed Bug 519021 Opened 11 years ago Closed 10 years ago

nsMessenger.cpp isn't 64-bit compatible

Categories

(MailNews Core :: Build Config, defect)

x86_64
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Nomis101, Unassigned)

References

Details

(Keywords: 64bit)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_1; de-de) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9
Build Identifier: 

nsMessenger.cpp isn't 64bit compatible, if you try to build in x86_64, you will get:

from /temp/src/mailnews/base/src/nsMsgAccountManager.cpp:64:
../../../mozilla/dist/include/msgbase/msgCore.h:221:1: warning: this is the location of the previous definition
/temp/src/mailnews/base/src/nsMessenger.cpp: In member function ‘nsresult nsSaveMsgListener::InitializeDownload(nsIRequest*, PRUint32)’:
/temp/src/mailnews/base/src/nsMessenger.cpp:1645: error: ‘nsIAppleFileDecoder’ was not declared in this scope
/temp/src/mailnews/base/src/nsMessenger.cpp:1645: error: template argument 1 is invalid
/temp/src/mailnews/base/src/nsMessenger.cpp:1645: error: invalid type in declaration before ‘=’ token
/temp/src/mailnews/base/src/nsMessenger.cpp:1645: error: ‘NS_IAPPLEFILEDECODER_CONTRACTID’ was not declared in this scope
/temp/src/mailnews/base/src/nsMessenger.cpp:1648: error: base operand of ‘->’ is not a pointer
/temp/src/mailnews/base/src/nsMessenger.cpp:1650: error: invalid conversion from ‘int’ to ‘nsISupports*’
/temp/src/mailnews/base/src/nsMessenger.cpp:1650: error: initializing argument 1 of ‘nsQueryInterfaceWithError do_QueryInterface(nsISupports*, nsresult*)’
nsMsgAccount.cpp



But this is very easy to fix, you only have to change in nsMessenger.cpp all lines
> #ifdef XP_MACOSX
into
> #if defined(XP_MACOSX) && !defined(__LP64__)

After that it builds just fine in x86_64

Reproducible: Always




Mac OS X 10.6.1, gcc-4.2
Product: Thunderbird → MailNews Core
QA Contact: build-config → build-config
Keywords: 64bit
Attached patch proposed fixSplinter Review
This fixed it for me.
Depends on: 489280
Attachment #405659 - Flags: review?(bugzilla)
Blocks: 537496
Attachment #405659 - Flags: superreview+
Attachment #405659 - Flags: review?(bugzilla)
Attachment #405659 - Flags: review+
landed
http://hg.mozilla.org/comm-central/rev/0901c40a4770
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.