2010-01-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
[mono.git] / mono / metadata / filewatcher.c
index 954b1111e435b91dc2388d238922f5da27926139..5016e52eb6808da1e9ee26310243ed9c94cd5cd9 100644 (file)
@@ -4,7 +4,7 @@
  * Authors:
  *     Gonzalo Paniagua Javier (gonzalo@ximian.com)
  *
- * (C) 2004,2005,2006 Novell, Inc. (http://www.novell.com)
+ * Copyright 2004-2009 Novell, Inc (http://www.novell.com)
  */
 
 #ifdef HAVE_CONFIG_H
@@ -16,7 +16,7 @@
 #include <mono/metadata/filewatcher.h>
 #include <mono/metadata/marshal.h>
 #include <mono/utils/mono-dl.h>
-#if (defined (PLATFORM_WIN32) && WINVER >= 0x0400)
+#ifdef HOST_WIN32
 
 /*
  * TODO:
@@ -48,7 +48,6 @@ ves_icall_System_IO_FSW_SupportsFSW (void)
        return 3;
 #else
        MonoDl *fam_module;
-       gchar *filename;
        int lib_used = 4; /* gamin */
        int inotify_instance;
        void *iter;
@@ -63,16 +62,11 @@ ves_icall_System_IO_FSW_SupportsFSW (void)
        }
 
        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);
+       fam_module = mono_dl_open ("libgamin-1.so", MONO_DL_LAZY, NULL);
        if (fam_module == NULL) {
                lib_used = 2; /* FAM */
                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);
+               fam_module = mono_dl_open ("libfam.so", MONO_DL_LAZY, NULL);
        }
 
        if (fam_module == NULL)