From d39981082070280a245a85d9b1f13fd7220eaf0d Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 16 Mar 2009 20:08:21 +0000 Subject: Include binary version in the module file name --- diff --git a/browser-plugin/Makefile.am b/browser-plugin/Makefile.am index 175726b..1f2fccd 100644 --- a/browser-plugin/Makefile.am +++ b/browser-plugin/Makefile.am @@ -8,11 +8,12 @@ libevince_plugin_la_SOURCES = \ scriptable.cpp \ scriptable.h -libevince_plugin_la_CPPFLAGS = \ - -I$(top_srcdir)/libview \ - -DXP_UNIX \ - -DMOZ_X11 \ - $(BROWSER_PLUGIN_CFLAGS) \ +libevince_plugin_la_CPPFLAGS = \ + -I$(top_srcdir)/libview \ + -DXP_UNIX \ + -DMOZ_X11 \ + -DEV_BINARY_VERSION=\"$(EV_BINARY_VERSION)\" \ + $(BROWSER_PLUGIN_CFLAGS) \ $(AM_CPPFLAGS) libevince_plugin_la_LIBADD = \ diff --git a/browser-plugin/glue.cpp b/browser-plugin/glue.cpp index 74a3a34..f63fb9e 100644 --- a/browser-plugin/glue.cpp +++ b/browser-plugin/glue.cpp @@ -47,12 +47,17 @@ InitEvince (void) /* Keep libevview in memory. NPPVpluginKeepLibraryInMemory is broken. See https://bugzilla.mozilla.org/show_bug.cgi?id=359870 */ - GModule *module = g_module_open ("libevview", (GModuleFlags)0); - if (module == NULL) { + char *file_name = g_strconcat ("libevview", "." G_MODULE_SUFFIX "." + EV_BINARY_VERSION, NULL); + GModule *module = g_module_open (file_name, (GModuleFlags)0); + g_free (file_name); + + if (module != NULL) { + g_module_make_resident (module); + g_module_close (module); + } else { return false; } - g_module_make_resident (module); - g_module_close (module); #endif ev_init (); -- cgit v0.9.1