Closed Bug 271174 Opened 21 years ago Closed 21 years ago

Build failed on solaris 8

Categories

(Core :: SVG, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: leon.sha, Assigned: tor)

Details

Attachments

(1 file)

When I try to build msvg+mozilla on solaris 8, I got following errors. nsSVGLibartGlyphMetricsFT.cpp: In function `void NS_InitSVGLibartGlyphMetricsFTGlobals()': nsSVGLibartGlyphMetricsFT.cpp:162: no matching function for call to `nsDataHashtable<nsStringHashKey,nsDependentString *>::Put (const nsString &, NS_ConvertASCIItoUTF16 *)' ../../../../../dist/include/xpcom/nsBaseHashtable.h:145: candidates are: PRBool nsBaseHashtable<nsStringHashKey,nsDependentString *,nsDependentString *>::Put(const nsAString &, nsDependentString *) nsSVGLibartGlyphMetricsFT.cpp:166: no matching function for call to `nsDataHashtable<nsStringHashKey,nsDependentString *>::Put (const nsString &, NS_ConvertASCIItoUTF16 *)' ../../../../../dist/include/xpcom/nsBaseHashtable.h:145: candidates are: PRBool nsBaseHashtable<nsStringHashKey,nsDependentString *,nsDependentString *>::Put(const nsAString &, nsDependentString *) nsSVGLibartGlyphMetricsFT.cpp:170: no matching function for call to `nsDataHashtable<nsStringHashKey,nsDependentString *>::Put (const nsString &, NS_ConvertASCIItoUTF16 *)' ../../../../../dist/include/xpcom/nsBaseHashtable.h:145: candidates are: PRBool nsBaseHashtable<nsStringHashKey,nsDependentString *,nsDependentString *>::Put(const nsAString &, nsDependentString *)
tor: it looks like this SVG code is erroneously assuming that NS_LITERAL_STRING is of type nsDependentString. that's not the case on many UNIX variants. the SVG code should probably be changed to not use nsDependentString in the hash table, but to use nsString instead (since the type of NS_LITERAL_STRING "is a" nsString).
Can't test with libart because the FC3 freetype is incompatible with the tree, but the changes seem to work fine on windows/gdi+.
Assignee: general → tor
Status: NEW → ASSIGNED
Attachment #166798 - Flags: review?(darin)
It works. Thanks a lot.
Comment on attachment 166798 [details] [diff] [review] nsDependentString -> nsString >+ const nsString *alias = nsnull; > nsSVGLibartGlyphMetricsFT::sFontAliases.Get(NS_ConvertUTF8toUCS2(family_name), > &alias); > if (alias) { > // XXX this might cause a stack-overflow if there are cyclic > // aliases in sFontAliases > retval = FindFont(nsString(*alias), PR_FALSE, aData); This nsString(*alias) business looks gratuitous to me. Or, does FindFont really need a non-const nsString reference? r=darin
Attachment #166798 - Flags: review?(darin) → review+
Checked in with cast removed.
Status: ASSIGNED → RESOLVED
Closed: 21 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: