+Tue May 29 12:57:51 2001 Tim Janik <timj@gtk.org>
+
+ * gmodule.c (g_module_symbol): erk, strconcat needs NULL as last arg.
+ make sure we pass module name with suffix into backend open.
+
Mon May 28 20:19:25 2001 Tim Janik <timj@gtk.org>
* gmodule.c (g_module_open): as a last resort, if we can't access()
/* try completing by appending libtool suffix */
if (!name)
{
- name = g_strconcat (file_name, ".la");
+ name = g_strconcat (file_name, ".la", NULL);
if (!g_file_test (name, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
{
g_free (name);
* it via library paths
*/
if (!name)
- name = g_strdup (file_name);
+ {
+ gchar *dot = strrchr (file_name, '.');
+ gchar *slash = strrchr (file_name, G_DIR_SEPARATOR);
+
+ /* make sure the name has a suffix */
+ if (!dot || dot < slash)
+ name = g_strconcat (file_name, "." G_MODULE_SUFFIX, NULL);
+ else
+ name = g_strdup (file_name);
+ }
/* ok, try loading the module */
if (name)