diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-23 11:26:22 +0200 |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-09-04 12:41:00 +0200 |
commit | ec0ce28dd0a0a6c67ffd5ef166978f0ec0f95894 (patch) | |
tree | da89a6fc51810a46b54a1612ecd4430282ecd5db /src/3rdparty/webkit/WebCore/plugins | |
parent | fd348f0cc28db4a20b06102b419139c0f1473aec (diff) |
Fix linking with Sun CC 5.9: function pointers for extern "C" are treated differently
The Sun CC compiler treats C functions and C++ functions differently,
as if they had a different calling sequence (they don't, but they
could). So if you declare a function in C++ having a function pointer
as a parameter, it's understood to be C++ even if it had previously
been declared as extern "C".
This could be a compiler error, though. In any case, the end result is
that WebKit fails to link because of an undefined reference to
NPN_PluginThreadAsyncCall.
"plugins/npapi.cpp", line 177: Warning (Anachronism): Formal argument 2 of type void(*)(void*) in call to WebCore::PluginMainThreadScheduler::scheduleCall(_NPP*, void(*)(void*), void*) is being passed extern "C" void(*)(void*).
There are more of these errors left in WebKit, but they are not
causing problems right now.
Diffstat (limited to 'src/3rdparty/webkit/WebCore/plugins')
-rw-r--r-- | src/3rdparty/webkit/WebCore/plugins/npapi.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/plugins/npapi.cpp b/src/3rdparty/webkit/WebCore/plugins/npapi.cpp index 4135b64203..d275a392b2 100644 --- a/src/3rdparty/webkit/WebCore/plugins/npapi.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/npapi.cpp @@ -171,7 +171,9 @@ void NPN_PopPopupsEnabledState(NPP instance) pluginViewForInstance(instance)->popPopupsEnabledState(); } +extern "C" { void NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userData) { PluginMainThreadScheduler::scheduler().scheduleCall(instance, func, userData); } +} |