Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marcopg@litl.com>2009-03-16 20:08:21 (GMT)
committer Marco Pesenti Gritti <marcopg@litl.com>2010-07-27 22:04:21 (GMT)
commitd39981082070280a245a85d9b1f13fd7220eaf0d (patch)
tree2bef23e162154e896459ec81a1c24bd6d3bded6b
parent0b05393af8dbe1cb5652a08b58cb863ce5345b57 (diff)
Include binary version in the module file name
-rw-r--r--browser-plugin/Makefile.am11
-rw-r--r--browser-plugin/glue.cpp13
2 files changed, 15 insertions, 9 deletions
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 ();