[gaim-migrate @ 14358]

Sun, 13 Nov 2005 00:40:56 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Sun, 13 Nov 2005 00:40:56 +0000
changeset 12063
9747fa9c89eb
parent 12062
2562ff52c825
child 12064
f5ff969af2ce

[gaim-migrate @ 14358]
Handle the shared object filename suffix better.

src/gtkutils.c file | annotate | diff | comparison | revisions
--- a/src/gtkutils.c	Sun Nov 13 00:20:53 2005 +0000
+++ b/src/gtkutils.c	Sun Nov 13 00:40:56 2005 +0000
@@ -903,14 +903,17 @@
 static GtkSpell* (*gtkspell_new_attach_ptr)(GtkTextView *view, const gchar *lang, GError **error);
 static int gtkspell_available = -1; /* -1 unknown, 0 false, 1 true */
 
+#define GTKSPELL_SONAME "libgtkspell." G_MODULE_SUFFIX ".0"
+
 static void
 setup_gtkspell()
 {
 #if GLIB_CHECK_VERSION(2,3,3)
-	GModule *handle = g_module_open("libgtkspell", G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
+	GModule *handle = g_module_open(GTKSPELL_SONAME, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
 #else
-	GModule *handle = g_module_open("libgtkspell", G_MODULE_BIND_LAZY);
+	GModule *handle = g_module_open(GTKSPELL_SONAME, G_MODULE_BIND_LAZY);
 #endif
+
 	if (handle != NULL)
 	{
 		gpointer ptr; /* squash GCC strict aliasing warnings */
@@ -928,7 +931,7 @@
 	}
 	else
 	{
-		gaim_debug_warning("gtkspell", "Failed to load libgtkspell.so.0: %s\n", dlerror());
+		gaim_debug_warning("gtkspell", "Failed to load %s: %s\n", GTKSPELL_SONAME, g_module_error());
 		gtkspell_available = FALSE;
 	}
 }

mercurial