This patch from Andrew Haley allows gcjwebplugin to build against the latest XULRunner, 1.9.1. The plugin still builds and runs with XULRunner 1.9.0.
ChangeLog: 2009-02-05 Andrew Haley <a...@redhat.com> PR libgcj/38861 * 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. -- Andrew :) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
Index: native/plugin/gcjwebplugin.cc =================================================================== RCS file: /sources/classpath/classpath/native/plugin/gcjwebplugin.cc,v retrieving revision 1.13 diff -u -u -r1.13 gcjwebplugin.cc --- native/plugin/gcjwebplugin.cc 31 Oct 2006 21:51:21 -0000 1.13 +++ native/plugin/gcjwebplugin.cc 5 Feb 2009 22:35:39 -0000 @@ -45,7 +45,11 @@ // 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 @@ 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 @@ // 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 @@ 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;