Closed
Bug 37025
Opened 24 years ago
Closed 24 years ago
nsPluginsDirUNIX.cpp does not build due to dlopen() flags.
Categories
(Core Graveyard :: Plug-ins, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jim_nance, Assigned: hoa.nguyen)
References
()
Details
Attachments
(2 files)
1.60 KB,
patch
|
Details | Diff | Splinter Review | |
1.96 KB,
patch
|
Details | Diff | Splinter Review |
nsPluginsDirUNIX.cpp does not build under Tru64 Unix because the RTLD_GLOBAL flag that it passes do dlopen() is not defined on that platform. We really should be using PL_LoadLibrary() instead of dlopen() if that is possible. I have a temp fix for the alpha that defines RTLD_GLOBAL as 0 if its not defined. I am going to check that in, but we really should fix this properly. I did not want to remove the dlopen() calls myself since there may be a reason they need to be there and I do not know how to test it.
Comment 1•24 years ago
|
||
I added explicit dlopens for libXt.so and libXext.so since the main Mozilla source doesn't normally link to these librarys, and the dlopen on a legacy plug-in will fail if these symbols are not present. I found that just linking to the librarys didn't do the trick if none of the Mozilla code every attempts to use any of the Xt calls, but explicitly dlopen'ing the library (and specifying that the library symbols should be made global) work fine. Calling dlopen instead of the NSPR wrapped dlopen was just an oversite.
Comment 2•24 years ago
|
||
Comment 3•24 years ago
|
||
The above patch uses the NSPR functions to open a shared library and globaly share it's symbols. I'm sure it's safe, but I would like someone with a Tru64 Unix system to try it out.
I tried it on a Tru64 system, and it does not compile. Its looks like a const problem: nsPluginsDirUNIX.cpp cxx: Error: /scratch/jlnance/mozilla/modules/plugin/nglsrc/nsPluginsDirUNIX.cpp, line 153: argument of type "const char *" is incompatible with parameter of type "void *" PR_FREEIF(tempSpec.value.pathname); ----^ cxx: Error: /scratch/jlnance/mozilla/modules/plugin/nglsrc/nsPluginsDirUNIX.cpp, line 158: argument of type "const char *" is incompatible with parameter of type "void *" PR_FREEIF(tempSpec.value.pathname); ----^ cxx: Info: 2 errors detected in the compilation of "/scratch/jlnance/mozilla/mod
Comment 5•24 years ago
|
||
Jim, can you fix up a patch that does work? I think that you have access to at least digital unix and linux systems to test on.
Sure, I will be glad to put something together based on rusty's patch
Bet yall thought I would never get this done :-) Here it is. Its basically rusty's patch, but I realized that we dont really need to allocate memory for the strings, which is what was leading to the compile problem in in the first place. Can someone review this for me?
Comment 9•24 years ago
|
||
the patch works for me. What do you think, Chris? Can I check it in?
Comment 10•24 years ago
|
||
Yep, looks good to me.
Reporter | ||
Comment 11•24 years ago
|
||
I will let rusty check this in then unless he wants me to do it.
Reporter | ||
Comment 12•24 years ago
|
||
I went ahead and checked it in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 13•24 years ago
|
||
*** Bug 41112 has been marked as a duplicate of this bug. ***
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•