Closed Bug 384346 Opened 17 years ago Closed 17 years ago

nsRDFResource.h does not use frozen linkage

Categories

(MailNews Core :: Backend, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mscott, Assigned: mscott)

References

Details

Attachments

(1 file, 1 obsolete file)

Now that we've got most of the string cleanup out of the way (see Bug #379070) I'm now actually starting to compile without MOZ_INTERNAL_API in mailnews\base.

The first non string error I ran into involved nsRDFResource.h

Mailnews includes nsRDFResource.h (http://mxr.mozilla.org/mozilla/source/rdf/util/public/nsRDFResource.h)
which does not support frozen linkage.

cc'ing Benjamin so I can better understand the best way for us to proceed.

As I see it we could:

1) Port rdf\util (which is just nsRDFResource.h/.cpp) to frozen linkage. But this gets linked in by rdf\base so this effectively means convert RDF to use frozen linkage.

2) Fork nsRDFResource.h/.cpp into mailnews\base\util and convert that implementation to use frozen linkage.
This doesn't actually do anything of course because rdf\util gets linked in by rdf\base\src...

just saving off for safe keeping.
You're probably best-off ompiling two versions of rdfutil, one with internal linkage and one with external. You should be able to use the same sources, as long as you use nsStringGlue.h

See for example intl/unicharutil/util/internal/Makefile.in which builds an internal version of unicharutils from the same sources as intl/unicharutil/util/Makefile.in
OS: Windows Vista → All
Attached patch first attemptSplinter Review
Thanks for the suggestion Benjamin.

This is my first attempts at implementing this idea. Still testing it out.
Assignee: nobody → mscott
Attachment #268274 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Comment on attachment 268438 [details] [diff] [review]
first attempt

Benjamin, would it be better to export the library like unicharutil_s/unicharutil_external_s  instead of linking against the library from /rdf/util/src/internal ?
Attachment #268438 - Flags: superreview?(benjamin)
You're going to need to export the external-linkage version in order to get tbird+XR working, but you shouldn't export the internal-linkage version (just link directly from rdf/util/src/internal)
Comment on attachment 268438 [details] [diff] [review]
first attempt

>Index: rdf/util/src/Makefile.in

> EXTRA_DEPS += $(srcdir)/objs.mk
> 
> MODULE		= rdfutil
>-LIBRARY_NAME	= rdfutil_s
>-MOZILLA_INTERNAL_API = 1
>+LIBRARY_NAME	= rdfutil_external_s

Add DIST_INSTALL = 1 to this makefile.
Attachment #268438 - Flags: superreview?(benjamin) → superreview+
fixed. Thanks for the pointers Benjamin.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.