diff options
author | Andrew Haley <aph@redhat.com> | 2009-02-16 15:33:46 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2009-02-16 15:33:46 +0000 |
commit | 7f720bdbd413a22e20c2f4616d364ae101c63463 (patch) | |
tree | 27c2fd62ceac611c7aadf45475b2712504af0455 /libjava/classpath/native | |
parent | 68e53db04b301d894017b85a3a34d80e87bec66e (diff) | |
download | gcc-7f720bdbd413a22e20c2f4616d364ae101c63463.zip gcc-7f720bdbd413a22e20c2f4616d364ae101c63463.tar.gz gcc-7f720bdbd413a22e20c2f4616d364ae101c63463.tar.bz2 |
gcjwebplugin.cc: Cope with the changed header file format.
2009-02-05 Andrew Haley <aph@redhat.com>
* native/plugin/gcjwebplugin.cc: Cope with the changed header file
format. https://bugzilla.mozilla.org/show_bug.cgi?id=455458
(GCJ_GetJavaClass): Likewise.
(NP_Initialize): Likewise.
From-SVN: r144203
Diffstat (limited to 'libjava/classpath/native')
-rw-r--r-- | libjava/classpath/native/plugin/gcjwebplugin.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libjava/classpath/native/plugin/gcjwebplugin.cc b/libjava/classpath/native/plugin/gcjwebplugin.cc index bb2bfa2..71cffcc 100644 --- a/libjava/classpath/native/plugin/gcjwebplugin.cc +++ b/libjava/classpath/native/plugin/gcjwebplugin.cc @@ -45,7 +45,11 @@ exception statement from your version. */ // Netscape plugin API includes. #include <npapi.h> +#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) #include <npupp.h> +#else +#include <npfunctions.h> +#endif // GLib includes. #include <glib.h> @@ -827,7 +831,11 @@ GCJ_URLNotify (NPP instance, const char* url, NPReason reason, PLUGIN_DEBUG ("GCJ_URLNotify return"); } +#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) jref +#else +void* +#endif GCJ_GetJavaClass (void) { PLUGIN_DEBUG ("GCJ_GetJavaClass"); @@ -1669,6 +1677,7 @@ NP_Initialize (NPNetscapeFuncs* browserTable, NPPluginFuncs* pluginTable) // Return to the browser the plugin functions that we implement. pluginTable->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; pluginTable->size = sizeof (NPPluginFuncs); +#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) pluginTable->newp = NewNPP_NewProc (GCJ_New); pluginTable->destroy = NewNPP_DestroyProc (GCJ_Destroy); pluginTable->setwindow = NewNPP_SetWindowProc (GCJ_SetWindow); @@ -1680,6 +1689,19 @@ NP_Initialize (NPNetscapeFuncs* browserTable, NPPluginFuncs* pluginTable) pluginTable->print = NewNPP_PrintProc (GCJ_Print); pluginTable->urlnotify = NewNPP_URLNotifyProc (GCJ_URLNotify); pluginTable->getvalue = NewNPP_GetValueProc (GCJ_GetValue); +#else + pluginTable->newp = (NPP_NewProcPtr) (GCJ_New); + pluginTable->destroy = (NPP_DestroyProcPtr) (GCJ_Destroy); + pluginTable->setwindow = (NPP_SetWindowProcPtr) (GCJ_SetWindow); + pluginTable->newstream = (NPP_NewStreamProcPtr) (GCJ_NewStream); + pluginTable->destroystream = (NPP_DestroyStreamProcPtr) (GCJ_DestroyStream); + pluginTable->asfile = (NPP_StreamAsFileProcPtr) (GCJ_StreamAsFile); + pluginTable->writeready = (NPP_WriteReadyProcPtr) (GCJ_WriteReady); + pluginTable->write = (NPP_WriteProcPtr) (GCJ_Write); + pluginTable->print = (NPP_PrintProcPtr) (GCJ_Print); + pluginTable->urlnotify = (NPP_URLNotifyProcPtr) (GCJ_URLNotify); + pluginTable->getvalue = (NPP_GetValueProcPtr) (GCJ_GetValue); +#endif initialized = true; |