evolution r37029 - trunk/filter



Author: tml
Date: Sat Jan 10 22:21:47 2009
New Revision: 37029
URL: http://svn.gnome.org/viewvc/evolution?rev=37029&view=rev

Log:
2009-01-11  Tor Lillqvist  <tml novell com>

	** Bug #567244

	* filter-option.c (get_dynamic_options): For portability, use
	<gmodule.h> API instead of <dlfcn.h> API.



Modified:
   trunk/filter/ChangeLog
   trunk/filter/filter-option.c

Modified: trunk/filter/filter-option.c
==============================================================================
--- trunk/filter/filter-option.c	(original)
+++ trunk/filter/filter-option.c	Sat Jan 10 22:21:47 2009
@@ -29,7 +29,7 @@
 
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
-#include <dlfcn.h>
+#include <gmodule.h>
 
 #include "filter-option.h"
 #include "filter-part.h"
@@ -352,23 +352,22 @@
 static GSList *
 get_dynamic_options (FilterOption *fo)
 {
-	void *module;
+	GModule *module;
 	GSList *(*get_func)(void);
 	GSList *res = NULL;
 
 	if (!fo || !fo->dynamic_func)
 		return res;
 
-	module = dlopen (NULL, RTLD_LAZY);
+	module = g_module_open (NULL, G_MODULE_BIND_LAZY);
 
-	get_func = dlsym (module, fo->dynamic_func);
-	if (get_func) {
+	if (g_module_symbol (module, fo->dynamic_func, &get_func)) {
 		res = get_func ();
 	} else {
 		g_warning ("optionlist dynamic fill function '%s' not found", fo->dynamic_func);
 	}
 
-	dlclose (module);
+	g_module_close (module);
 
 	return res;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]