dc7ea657e4
Copy from GNOME:Factory/librsvg based on submit request 19760 from user vuntz OBS-URL: https://build.opensuse.org/request/show/19760 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/librsvg?expand=0&rev=23
46 lines
2.1 KiB
Diff
46 lines
2.1 KiB
Diff
diff -aurpN librsvg-2.26.0/moz-plugin/moz-plugin.c librsvg-2.26.0.patched/moz-plugin/moz-plugin.c
|
|
--- librsvg-2.26.0/moz-plugin/moz-plugin.c 2008-08-20 14:41:00.000000000 +0200
|
|
+++ librsvg-2.26.0.patched/moz-plugin/moz-plugin.c 2009-09-02 22:00:21.000000000 +0200
|
|
@@ -39,7 +39,11 @@
|
|
#define XP_UNIX 1
|
|
#define MOZ_X11 1
|
|
#include "npapi.h"
|
|
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
|
#include "npupp.h"
|
|
+#else
|
|
+#include "npfunctions.h"
|
|
+#endif
|
|
|
|
#define DEBUG(x) _svg_plugin_debug x
|
|
|
|
@@ -561,9 +565,10 @@ NP_Initialize (NPNetscapeFuncs * moz_fun
|
|
return NPERR_INVALID_FUNCTABLE_ERROR;
|
|
|
|
memcpy (&mozilla_funcs, moz_funcs, sizeof (NPNetscapeFuncs));
|
|
-
|
|
+
|
|
plugin_funcs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
|
|
plugin_funcs->size = sizeof (NPPluginFuncs);
|
|
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
|
|
plugin_funcs->newp = NewNPP_NewProc (svg_plugin_newp);
|
|
plugin_funcs->destroy = NewNPP_DestroyProc (svg_plugin_destroy);
|
|
plugin_funcs->setwindow = NewNPP_SetWindowProc (svg_plugin_set_window);
|
|
@@ -574,6 +579,17 @@ NP_Initialize (NPNetscapeFuncs * moz_fun
|
|
plugin_funcs->asfile = NewNPP_StreamAsFileProc (svg_plugin_stream_as_file);
|
|
plugin_funcs->write = NewNPP_WriteProc (svg_plugin_write);
|
|
plugin_funcs->print = NewNPP_PrintProc (svg_plugin_print);
|
|
+#else
|
|
+ plugin_funcs->newp = (NPP_NewProcPtr)(svg_plugin_newp);
|
|
+ plugin_funcs->destroy = (NPP_DestroyProcPtr)(svg_plugin_destroy);
|
|
+ plugin_funcs->setwindow = (NPP_SetWindowProcPtr)(svg_plugin_set_window);
|
|
+ plugin_funcs->newstream = (NPP_NewStreamProcPtr)(svg_plugin_new_stream);
|
|
+ plugin_funcs->destroystream = (NPP_DestroyStreamProcPtr)(svg_plugin_destroy_stream);
|
|
+ plugin_funcs->asfile = (NPP_StreamAsFileProcPtr)(svg_plugin_stream_as_file);
|
|
+ plugin_funcs->writeready = (NPP_WriteReadyProcPtr)(svg_plugin_write_ready);
|
|
+ plugin_funcs->write = (NPP_WriteProcPtr)(svg_plugin_write);
|
|
+ plugin_funcs->print = (NPP_PrintProcPtr)(svg_plugin_print);
|
|
+#endif
|
|
|
|
return NPERR_NO_ERROR;
|
|
}
|