Closed
Bug 306274
Opened 19 years ago
Closed 18 years ago
Nullplugin doesn't work when symbols are hidden by default
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 380984
People
(Reporter: Biesinger, Unassigned)
Details
Attachments
(2 files, 1 obsolete file)
935 bytes,
patch
|
benjamin
:
review-
|
Details | Diff | Splinter Review |
13.98 KB,
patch
|
Details | Diff | Splinter Review |
When gcc supports hiding all symbols by default, the null plugin and probably
all other in-tree plugins are broken, because they don't explicitly mark any
symbols as exported. Consequently, the plugin loading code does not find the
symbols it needs (NP_GetMimeDescription et al).
Comment 1•19 years ago
|
||
I've encountered this problem as well, and the attached patch fixes it for me on Fedora Core 4
Comment 2•19 years ago
|
||
Comment on attachment 206731 [details] [diff] [review]
Patch to make the missing NP_* symbols visible
It's not a good idea to mix the NSPR macros in with mozilla code: I suggest using NS_EXPORT_(type) here.
Attachment #206731 -
Flags: review-
Reporter | ||
Comment 3•19 years ago
|
||
bsmedberg: this file is part of the plugin SDK, is it not?
Comment 4•19 years ago
|
||
Does the plugin SDK depend on NSPR but not mozilla?
Reporter | ||
Comment 5•19 years ago
|
||
does it depend on NSPR?
Comment 6•19 years ago
|
||
PR_VISIBILITY_DEFAULT sure does...
Reporter | ||
Comment 7•19 years ago
|
||
yeah, I think this patch is not good because of that
Comment 8•19 years ago
|
||
What about using NS_VISIBILITY_DEFAULT and then including "nscore.h" inside npupp.h? Would that work?
Reporter | ||
Comment 9•19 years ago
|
||
The question is, is the plugin SDK allowed to depend on NSPR and/or XPCOM?
Reporter | ||
Comment 10•19 years ago
|
||
ok, so, npapi.h already includes prtypes.h, so clearly the NSPR dependency is ok. please ignore my comments.
Comment 11•19 years ago
|
||
Compiled this on Unix / Windows / Mac (ppc/x86).
Reporter | ||
Comment 12•19 years ago
|
||
the comment is wrong... it's not the compiler that has the default visibility, it's mozilla's build system which uses a default visibility of hidden on certain compilers.
Updated•19 years ago
|
Attachment #218752 -
Attachment is obsolete: true
Comment 13•19 years ago
|
||
The previous patch did not really work well, so I've changed from using:
#undef IMETHOD_VISIBILITY
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
...
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
to use:
NS_VISIBILITY_DEFAULT for each function that needs to be exposed.
Reporter | ||
Comment 14•18 years ago
|
||
this got fixed in bug 380984
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•