Closed Bug 297619 Opened 20 years ago Closed 20 years ago

Build Thunderbird with gcc 4.0 on Mac

Categories

(Thunderbird :: Build Config, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mark, Assigned: mscott)

References

Details

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050613 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050613 Firefox/1.0+

We need to be able to compile Thunderbird using gcc 4.0 on the Mac.  gcc 4.0 is
the default compiler in Xcode 2 shipping with Mac OS X 10.4.  This is the first
Thunderbird-specific step needed for MacOSX86 support.

Official Mozilla builds must continue using gcc 3.3.

Reproducible: Always

Steps to Reproduce:
While compiling nsMsgAttachmentHandler.cpp with gcc 4.0/5026 from Xcode 2.1:
.../nsMsgAttachmentHandler.cpp: In member function 'nsresult
nsMsgAttachmentHandler::SnarfAttachment(nsMsgCompFields*)':
.../nsMsgAttachmentHandler.cpp:864: error: invalid conversion from 'const
char*' to 'char*'
.../nsMsgAttachmentHandler.cpp:864: error:   initializing argument 2 of 'int
ap_encode_init(appledouble_encode_object*, char*, char*)'

gcc 4.0 is more strict about type checking than its predecessors.  This patch
adds a (char *) cast.  The code in question is used for AppleDouble support and
is only built on Macs.

This is the only Thunderbird-specific change needed.
Attachment #186181 - Flags: superreview?(mscott)
Attachment #186181 - Flags: review?(joshmoz)
Attachment #186181 - Flags: approval-aviary1.1a2?
Depends on: 294244
Wouldn't it be nicer to make ap_encode_init take a |const char*| ?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #186181 - Flags: superreview?(mscott)
Attachment #186181 - Flags: review?(joshmoz)
Attachment #186181 - Flags: approval-aviary1.1a2?
peterv, you're right.  This is better, especially since ap_encode_init is only
ever called from nsMsgAttachmentHandler.cpp.
Attachment #186181 - Attachment is obsolete: true
Attachment #186238 - Flags: superreview?(mscott)
Attachment #186238 - Flags: review?(joshmoz)
Attachment #186238 - Flags: approval-aviary1.1a2?
Attachment #186238 - Flags: superreview?(mscott)
Attachment #186238 - Flags: review?(joshmoz)
Attachment #186238 - Flags: approval-aviary1.1a2?
Attachment #186238 - Attachment is obsolete: true
Attachment #186260 - Flags: review?(peterv)
Comment on attachment 186260 [details] [diff] [review]
Retain const when calling into MoreFilesX

>Index: mozilla/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp
>===================================================================

> int ap_encode_init( appledouble_encode_object *p_ap_encode_obj, 
>-	                  char                      *fname,
>+	            const char                *fname,

Remove the tab and line const up with appledouble.
Attachment #186260 - Flags: superreview+
Attachment #186260 - Flags: review?(peterv)
Attachment #186260 - Flags: review+
Attachment #186260 - Flags: approval-aviary1.1a2?
Attachment #186260 - Flags: approval-aviary1.1a2?
Attached patch BeautificationSplinter Review
That pesky tab didn't show up in vi.
Attachment #186260 - Attachment is obsolete: true
Attachment #186261 - Flags: approval-aviary1.1a2?
Attachment #186261 - Flags: approval-aviary1.1a2? → approval-aviary1.1a2+
Checked in 21:01 PDT
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: