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  | 24192| 59|FUNC |GLOB |2 |38 |unsigned _scheduletimer(_NPP*,unsigned,unsigned char,void(*)(_NPP*,unsigned))  | 0| 0|FUNC |GLOB |0 |UNDEF |_scheduletimer
Created attachment 386460 [details] [diff] [review] patch
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?(jst) → superreview+
Status: ASSIGNED → RESOLVED
Last Resolved: 9 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.
You need to log in before you can comment on or make changes to this bug.