+2001-10-09 Tor Lillqvist <tml@iki.fi>
+
+ * gmodule-win32.c (_g_module_build_path): More Unix compatibility:
+ Add "lib" prefix in case the module name doesn't already have it,
+ except if it ends with ".dll" (in which case it probably already
+ is the name of an existing DLL). This is needed for instance for
+ the gdk-pixbuf loaders, which are called "lib*.dll", but
+ gdk-pixbuf-io calls g_module_build_path without the "lib" prefix.
+
2001-10-03 jacob berkman <jacob@ximian.com>
* libgplugin_a.c: (gplugin_a_module_func):
const gchar *module_name)
{
gint k;
-
+
k = strlen (module_name);
+
if (directory && *directory)
if (k > 4 && g_strcasecmp (module_name + k - 4, ".dll") == 0)
return g_strconcat (directory, G_DIR_SEPARATOR_S, module_name, NULL);
- else
+ else if (strncmp (module_name, "lib", 3) == 0)
return g_strconcat (directory, G_DIR_SEPARATOR_S, module_name, ".dll", NULL);
+ else
+ return g_strconcat (directory, G_DIR_SEPARATOR_S, "lib", module_name, ".dll", NULL);
else if (k > 4 && g_strcasecmp (module_name + k - 4, ".dll") == 0)
return g_strdup (module_name);
- else
+ else if (strncmp (module_name, "lib", 3) == 0)
return g_strconcat (module_name, ".dll", NULL);
+ else
+ return g_strconcat ("lib", module_name, ".dll", NULL);
}