Closed Bug 537900 Opened 16 years ago Closed 15 years ago

attachment code for apple encode isn't 64-bit compatible

Categories

(MailNews Core :: Attachments, defect)

x86_64
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.3a1

People

(Reporter: m_kato, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

In mailnews/compose/src, nsApple*.* code uses old-style APIs to access resource fork. So it isn't 64-bit compatible.
/* This function is deprecated in Mac OS X 10.4. Use FSGetCatalogInfo instead.*/ /* * FSpGetFInfo() *** DEPRECATED *** * * Mac OS X threading: * Thread safe since version 10.0 * * Availability: * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4 * CarbonLib: in CarbonLib 1.0 and later * Non-Carbon CFM: in InterfaceLib 7.1 and later */ extern OSErr FSpGetFInfo( const FSSpec * spec, FInfo * fndrInfo) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; g++-4.2 -o nsMsgAppleDoubleEncode.o -c -fvisibility=hidden -DMOZILLA_INTERNAL_API -DMOZ_THUNDERBIRD=1 -DOSTYPE=\"Darwin10.4.0\" -DOSARCH=Darwin -I/Users/timeless/devel/mozilla.org/comm-central/mailnews/compose/src -I. -I../../../mozilla/dist/include -I../../../mozilla/dist/include/nsprpub `/Users/timeless/devel/mozilla.org/dbg-thunderbird-x86_64-apple-darwin10.4.0/mozilla/dist/bin/nspr-config --prefix=/Users/timeless/devel/mozilla.org/dbg-thunderbird-x86_64-apple-darwin10.4.0/mozilla/dist --includedir=/Users/timeless/devel/mozilla.org/dbg-thunderbird-x86_64-apple-darwin10.4.0/mozilla/dist/include/nspr --cflags` -I/Users/timeless/devel/mozilla.org/dbg-thunderbird-x86_64-apple-darwin10.4.0/mozilla/dist/include/nss -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -fno-strict-aliasing -fpascal-strings -fno-common -fshort-wchar -pthread -DNO_X11 -pipe -DDEBUG -D_DEBUG -DTRACING -g -DMOZILLA_CLIENT -include ../../../comm-config.h -Wp,-MD,.deps/nsMsgAppleDoubleEncode.pp /Users/timeless/devel/mozilla.org/comm-central/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp .../mailnews/compose/src/nsMsgAppleDoubleEncode.cpp: 132: warning: ignoring #pragma cplusplus reset In file included from .../mailnews/compose/src/nsMsgAppleDoubleEncode.cpp:53: .../mailnews/compose/src/nsMsgAppleCodes.h: 56: warning: mac68k alignment pragma is deprecated for 64-bit Darwin .../mailnews/compose/src/nsMsgAppleDoubleEncode.cpp: In function ‘void MacGetFileType(nsILocalFile*, PRBool*, char**, char**)’: 102: error: ‘FSpGetFInfo’ was not declared in this scope In function ‘int ap_encode_init(appledouble_encode_object*, const char*, char*)’: 159: error: ‘struct FSSpec’ has no member named ‘name’ 159: error: ‘struct FSSpec’ has no member named ‘name’ 160: error: ‘struct FSSpec’ has no member named ‘name’ 161: error: ‘struct FSSpec’ has no member named ‘vRefNum’ 162: error: ‘struct FSSpec’ has no member named ‘parID’ In function ‘int ap_encode_end(appledouble_encode_object*, PRBool)’: 311: error: ‘FSClose’ was not declared in this scope
Apart from Eudora, I get errors for three files, nsMsgAppleDoubleEncode.cpp, nsMsgAppleEncode.cpp and nsMsgAttachmentHandler.cpp So only three files are missing to make comm-central 64bit-ready, should be doable. /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:152: error: ‘CInfoPBRec’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:152: error: expected `;' before ‘cipbr’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:153: error: ‘HFileInfo’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:153: error: ‘fpb’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:153: error: expected primary-expression before ‘)’ token /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:153: error: ‘cipbr’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:172: error: ‘PBGetCatInfoSync’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:272: error: ‘GetTime’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:273: error: ‘DateToSeconds’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp: In function ‘int ap_encode_header(appledouble_encode_object*, PRBool)’: /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:339: error: ‘HOpenRF’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:352: error: ‘FSRead’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:365: error: ‘FSClose’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp: At global scope: /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:408: warning: deprecated conversion from string constant to ‘char*’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:408: warning: deprecated conversion from string constant to ‘char*’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:408: warning: deprecated conversion from string constant to ‘char*’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:408: warning: deprecated conversion from string constant to ‘char*’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:408: warning: deprecated conversion from string constant to ‘char*’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:408: warning: deprecated conversion from string constant to ‘char*’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:408: warning: deprecated conversion from string constant to ‘char*’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:408: warning: deprecated conversion from string constant to ‘char*’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:411: warning: deprecated conversion from string constant to ‘char*’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:412: warning: deprecated conversion from string constant to ‘char*’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp: In function ‘int ap_encode_data(appledouble_encode_object*, PRBool)’: /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:477: error: ‘HOpen’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:490: error: ‘FSRead’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:494: error: ‘SetFPos’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:528: error: ‘FSRead’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleEncode.cpp:543: error: ‘FSClose’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp:102: error: ‘FSpGetFInfo’ was not declared in this scope /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp: In function ‘int ap_encode_init(appledouble_encode_object*, const char*, char*)’: /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp:159: error: ‘struct FSSpec’ has no member named ‘name’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp:159: error: ‘struct FSSpec’ has no member named ‘name’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp:160: error: ‘struct FSSpec’ has no member named ‘name’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp:161: error: ‘struct FSSpec’ has no member named ‘vRefNum’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp:162: error: ‘struct FSSpec’ has no member named ‘parID’ /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp: In function ‘int ap_encode_end(appledouble_encode_object*, PRBool)’: /Volumes/Developer/temp/src/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp:311: error: ‘FSClose’ was not declared in this scope
Assignee: nobody → m_kato
Makoto, will you be working on this soon? We are currently looking at getting Mac 64 bit builders onto trunk.
Yes, I have a WIP fix. I will send a review next week (I am busy at this week)
Attached patch WIP v0.5 (obsolete) — Splinter Review
Attached patch patch v1Splinter Review
Attachment #484639 - Attachment is obsolete: true
Attachment #484999 - Flags: review?(bugzilla)
Comment on attachment 484999 [details] [diff] [review] patch v1 This looks good, I've been able to test it on 32 bit as well, and it seems to work fine. Thanks. (I'll also raise a bug soon about getting a test-case written for this).
Attachment #484999 - Flags: review?(bugzilla) → review+
I took the decision to land this on the closed trunk as it'll help our efforts to move to 64-bit and it is unlikely to affect unit tests as we're not testing this code currently. http://hg.mozilla.org/comm-central/rev/7469f21530dd
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.3a1
Blocks: 606946
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: