make evas_module.c and evas_path.c compile with vc++
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 23 Sep 2009 07:12:11 +0000 (07:12 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 23 Sep 2009 07:12:11 +0000 (07:12 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@42641 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/file/evas_module.c
src/lib/file/evas_path.c

index 0640c66..1dde1f1 100644 (file)
@@ -6,6 +6,17 @@
 
 #include <evas_common.h>
 #include <evas_private.h>
+#include <evas_module.h>
+
+#ifdef _MSC_VER
+# ifdef open
+#  undef open
+# endif
+# ifdef close
+#  undef close
+# endif
+#endif
+
 
 static Eina_Hash *evas_modules[4] = {
   NULL,
@@ -41,7 +52,9 @@ void
 evas_module_paths_init(void)
 {
    char *path, *path2;
+#ifndef _MSC_VER
    const char *path3;
+#endif
 
    /* 1. ~/.evas/modules/ */
    path = eina_module_environment_path_get("HOME", "/.evas/modules");
@@ -59,6 +72,7 @@ evas_module_paths_init(void)
      evas_module_paths = _evas_module_append(evas_module_paths, path2);
 
    /* 4. PREFIX/evas/modules/ */
+#ifndef _MSC_VER
    path3 = PACKAGE_LIB_DIR "/evas/modules";
    if ((path && (strcmp(path, path3) != 0)) ||
        (path2 && (strcmp(path2, path3) != 0)) ||
@@ -68,6 +82,7 @@ evas_module_paths_init(void)
        if (path)
          evas_module_paths = _evas_module_append(evas_module_paths, path);
      }
+#endif
 }
 
 #define EVAS_EINA_STATIC_MODULE_DEFINE(Tn, Name)       \
index 1665b89..809e060 100644 (file)
@@ -8,14 +8,16 @@
 #endif
 
 #include <limits.h>
-#include <unistd.h>
 #include <stdlib.h>
-#include <sys/param.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 /* get the casefold feature! */
 #include <fnmatch.h>
 #include <dirent.h>
+#ifndef _MSC_VER
+# include <unistd.h>
+# include <sys/param.h>
+#endif
 
 #ifdef HAVE_EVIL
 # include <Evil.h>
@@ -50,7 +52,7 @@ char *
 evas_file_path_join(const char *path, const char *end)
 {
    char *res = NULL;
-   int len;
+   size_t len;
 
    if ((!path) && (!end)) return NULL;
    if (!path) return strdup(end);