From b96fe7916851a7dd63d7b2d39fa438a071b06c31 Mon Sep 17 00:00:00 2001 From: Gonzalo Paniagua Javier Date: Thu, 17 Aug 2006 07:37:03 +0000 Subject: [PATCH] forgot this one svn path=/trunk/mono/; revision=63880 --- eglib/TODO | 1 - eglib/src/glib.h | 1 + eglib/src/gmodule.c | 11 +++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/eglib/TODO b/eglib/TODO index 417cf80b7b7..09d3ba256af 100644 --- a/eglib/TODO +++ b/eglib/TODO @@ -61,7 +61,6 @@ Routines missing from eglib, by count number: 5 g_ptr_array_sort 5 g_path_is_absolute 5 g_newa - 5 g_module_build_path 5 g_list_first 5 g_get_current_dir 5 g_file_get_contents diff --git a/eglib/src/glib.h b/eglib/src/glib.h index 089cf3a092c..3cf39fa798f 100644 --- a/eglib/src/glib.h +++ b/eglib/src/glib.h @@ -171,6 +171,7 @@ gboolean g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol); const gchar *g_module_error (void); gboolean g_module_close (GModule *module); +gchar * g_module_build_path (const gchar *directory, const gchar *module_name); /* * Messages */ diff --git a/eglib/src/gmodule.c b/eglib/src/gmodule.c index 51c9e63be40..ba64fb88095 100644 --- a/eglib/src/gmodule.c +++ b/eglib/src/gmodule.c @@ -56,3 +56,14 @@ g_module_close (GModule *module) return (0 == dlclose (handle)); } +gchar * +g_module_build_path (const gchar *directory, const gchar *module_name) +{ + if (module_name == NULL) + return NULL; + + if (directory) + return g_strdup_printf ("%s/lib%s.so", directory, module_name); + return g_strdup_printf ("lib%s.so", module_name); +} + -- 2.25.1