Author: lupus
Date: 2006-12-20 05:29:10 -0500 (Wed, 20 Dec 2006)
New Revision: 69803
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/filewatcher.c
Log:
Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <[EMAIL PROTECTED]>
* filewatcher.c: updated to use the mono-dl API instead of gmodule.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2006-12-20 09:46:46 UTC (rev 69802)
+++ trunk/mono/mono/metadata/ChangeLog 2006-12-20 10:29:10 UTC (rev 69803)
@@ -1,3 +1,8 @@
+
+Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <[EMAIL PROTECTED]>
+
+ * filewatcher.c: updated to use the mono-dl API instead of gmodule.
+
2006-12-19 Jonathan Chambers <[EMAIL PROTECTED]>
* marshal.c
(ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
Modified: trunk/mono/mono/metadata/filewatcher.c
===================================================================
--- trunk/mono/mono/metadata/filewatcher.c 2006-12-20 09:46:46 UTC (rev
69802)
+++ trunk/mono/mono/metadata/filewatcher.c 2006-12-20 10:29:10 UTC (rev
69803)
@@ -15,6 +15,7 @@
#include <mono/metadata/exception.h>
#include <mono/metadata/filewatcher.h>
#include <mono/metadata/marshal.h>
+#include <mono/utils/mono-dl.h>
#if (defined (PLATFORM_WIN32) && WINVER >= 0x0400)
/*
@@ -46,10 +47,12 @@
#if HAVE_KQUEUE
return 3;
#else
- GModule *fam_module;
+ MonoDl *fam_module;
gchar *filename;
int lib_used = 4; /* gamin */
int inotify_instance;
+ void *iter;
+ char *err;
MONO_ARCH_SAVE_REGS;
@@ -59,20 +62,24 @@
return 5; /* inotify */
}
- filename = g_module_build_path (NULL, "libgamin-1.so.0");
- fam_module = g_module_open (filename, G_MODULE_BIND_LAZY);
+ iter = NULL;
+ /* the build_path calls here should be avoided, since we provide the
full name */
+ filename = mono_dl_build_path (NULL, "libgamin-1.so.0", &iter);
+ fam_module = mono_dl_open (filename, MONO_DL_LAZY, NULL);
g_free (filename);
if (fam_module == NULL) {
lib_used = 2; /* FAM */
- filename = g_module_build_path (NULL, "libfam.so.0");
- fam_module = g_module_open (filename, G_MODULE_BIND_LAZY);
+ iter = NULL;
+ filename = mono_dl_build_path (NULL, "libfam.so.0", &iter);
+ fam_module = mono_dl_open (filename, MONO_DL_LAZY, NULL);
g_free (filename);
}
if (fam_module == NULL)
return 0;
- g_module_symbol (fam_module, "FAMNextEvent", (gpointer *)
&FAMNextEvent);
+ err = mono_dl_symbol (fam_module, "FAMNextEvent", (gpointer *)
&FAMNextEvent);
+ g_free (err);
if (FAMNextEvent == NULL)
return 0;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches