Closed Bug 83544 Opened 23 years ago Closed 23 years ago

redundant global functions in smime & vcard

Categories

(MailNews Core :: MIME, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: cls, Assigned: netscape)

References

Details

(Whiteboard: have fix)

Attachments

(6 files, 3 obsolete files)

In attempting to link all of the mail components into a meta component (bug
46775), I ran across a problem with the same functions being defined/declared
extern "C" in both vcard & smime. Similar to bug 76788 I think.

../../dist/lib/components/libsmime.a(mimexpcom.o): In function
`COM_GetmimeInlineTextClass':
mimexpcom.o(.text+0x0): multiple definition of `COM_GetmimeInlineTextClass'
../../dist/lib/components/libvcard.a(mimexpcom.o)(.text+0x0): first defined here


../../dist/lib/components/libsmime.a(nsSMIMEStub.o): In function
`MIME_GetContentType':
nsSMIMEStub.o(.text+0x0): multiple definition of `MIME_GetContentType'
../../dist/lib/components/libvcard.a(mimevcrd.o)(.text+0x0): first defined here

etc
Blocks: 46775
QA Contact: esther → stephend
This was fixed when we landed the STATIC_BUILD_20010612_BRANCH, no? (If not
before?) cls, re-open the bug if I'm wrong...
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
This was never fixed on the branch.   All I did was reomve smime from the list
of components to be included in the mail meta-component.   I'm guessing the
reason that we're not seeing this problem in the completely static build is that
those functions in smime and/or vcard are never directly referenced so they are
stripped out in the final link.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Ok, sorry for jumping the gun.
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla0.9.6
How is this a perf issue - symbol fixup when loading ?
I think this was blocking the static build at one point.
Every mime cthandlers (calendar, cvard, smime) include a file name
mimexpcom.cpp. They are all the same therefore, in the static build you need to
make sure you include only one of them!


Attached patch proposed fix, v1 (obsolete) — Splinter Review
Whiteboard: have fix
Comment on attachment 54922 [details] [diff] [review]
proposed fix, v1

It didn't quite work as the nsMimeContentTypeHandler.* files are duplicated as well.
Attachment #54922 - Attachment is obsolete: true
With cthandlers/*/mimexpcom.* & cthandlers/*/nsMimeContentTypeHandler.* being
exact duplicates, I decided to fork them off into a static glue lib that would
be linked into each of the handlers in a dynamic build but only into the final
link of a static build.  I ran into a slight problem because each of the 3
cthandlers uses the single nsMimeContentTypeHandler class as their registered
module.  So I had to hack the factories & nsMimeContentTypeHandler to allow the
factories to pass in mimetypes & a callback function to distinguish between the
cthandlers.  Surprisingly, it even worked.

Here's a patch against cthandlers/ , a separate patch of the changes made to
nsMimeContentTypeHandler and a zip of cthandlers/glue .

Attached file zip of glue/ (obsolete) —
Attachment #55216 - Attachment is obsolete: true
Attachment #55213 - Attachment is obsolete: true
Christopher, can I reassign this bug to you as you do all the work?
Sure, I'll take it.  But I still need a review / verification of the patches
since this isn't exactly my area of expertise. :)
Assignee: ducarroz → seawood
Status: ASSIGNED → NEW
Comment on attachment 56288 [details] [diff] [review]
Updated with win32 changes

R=ducarroz
Attachment #56288 - Flags: review+
Comment on attachment 55214 [details] [diff] [review]
Changes to nsMimeContentHandlerType class (files are actually in glue/ now)

R=ducarroz
Attachment #55214 - Flags: review+
Comment on attachment 56292 [details]
vcard.mcp

R=ducarroz
Attachment #56292 - Flags: review+
Comment on attachment 56291 [details]
smime.mcp

R=ducarroz
Attachment #56291 - Flags: review+
Comment on attachment 56290 [details]
calendar.mcp

R=ducarroz
Attachment #56290 - Flags: review+
Comment on attachment 56289 [details]
Updated glue.zip with mac+win32 changes

R=ducarroz
Attachment #56289 - Flags: review+
rs=waterson
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
By verifying this, I'm assuming that if you can build successfully (which I
have) then it's just something to verify via code inspection (using LXR/tree).

If I'm wrong, please re-open and correct me.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: