Closed Bug 501889 Opened 15 years ago Closed 15 years ago

_scheduletimer symbol not found on Solaris

Categories

(Core Graveyard :: Plug-ins, defect)

x86
OpenSolaris
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)

References

Details

Attachments

(1 file)

2494 uint32_t NP_CALLBACK
2495 _scheduletimer(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID))

It doesn't match the header. We need to use extern "C" for the function pointer.

The compiler gives a warning.
"../../../../../modules/plugin/base/src/nsNPAPIPlugin.cpp", line 2497: Warning: function unsigned(_NPP*,unsigned,unsigned char,void(*)(_NPP*,unsigned)) overloads extern "C" unsigned(_NPP*,unsigned,unsigned char,extern "C" void(*)(_NPP*,unsigned)) because of different language linkages.
1 Warning(s) detected.

And
nm nsNPAPIPlugin.o | grep _scheduletimer | c++filt 
[252]   |     24192|        59|FUNC |GLOB |2    |38     |unsigned _scheduletimer(_NPP*,unsigned,unsigned char,void(*)(_NPP*,unsigned))
[126]   |         0|         0|FUNC |GLOB |0    |UNDEF  |_scheduletimer
Attached patch patchSplinter Review
Assignee: nobody → ginn.chen
Status: NEW → ASSIGNED
Attachment #386460 - Flags: review?(jst)
So this needs to be extern c because it has a function pointer as an argument? Whatever the reason, can you document it in the patch?
Yes, I will do that.
Comment on attachment 386460 [details] [diff] [review]
patch

Josh, can you review the patch?

We need to get tinderbox and nightly builds back ASAP.
Attachment #386460 - Flags: review?(joshmoz)
Attachment #386460 - Flags: review?(joshmoz) → review+
Attachment #386460 - Flags: review?(jst) → superreview+
http://hg.mozilla.org/mozilla-central/rev/a5d066920368
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
In the electrolysis branch I removed the extern "C" block as part of bug 532605, followup to bug 526401: now none of the declarations or definitions are extern-C, and are contained in a c++ namespace for unambiguous mangling.
electrolysis builds fine on Solaris with --enable-libxul --disable-ipc, except content/base/src/nsFrameLoader.cpp includes "mozcontainer.h" <gdk/gdkx.h> <gtk/gtk.h>, but hasn't proper -I in Makefile.
I deleted these #include lines and it worked.

However, it seems it's not easy to port electrolysis to Solaris and Sun Studio compiler.
I meant a lot of problems with STL.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: