_scheduletimer symbol not found on Solaris

RESOLVED FIXED

Status

()

Core
Plug-ins
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Ginn Chen, Assigned: Ginn Chen)

Tracking

Trunk
x86
OpenSolaris
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
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
(Assignee)

Comment 1

9 years ago
Created attachment 386460 [details] [diff] [review]
patch
Assignee: nobody → ginn.chen
Status: NEW → ASSIGNED
Attachment #386460 - Flags: review?(jst)

Comment 2

9 years ago
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?
(Assignee)

Comment 3

9 years ago
Yes, I will do that.
(Assignee)

Comment 4

9 years ago
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)

Updated

9 years ago
Attachment #386460 - Flags: review?(joshmoz) → review+

Updated

9 years ago
Attachment #386460 - Flags: review?(jst) → superreview+
(Assignee)

Comment 5

9 years ago
http://hg.mozilla.org/mozilla-central/rev/a5d066920368
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED

Comment 6

9 years ago
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.
(Assignee)

Comment 7

9 years ago
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.
You need to log in before you can comment on or make changes to this bug.