2008-09-25 Dick Porter <dick@ximian.com>
[mono.git] / mono / utils / mono-path.c
index c2a510ad586b8cf80933e2d33c088fefddcea75f..f13c9b04c829e8257e4aece046bb89fc6e35f162 100644 (file)
 #include <errno.h>
 #include <string.h>
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 /* This is only needed for the mono_path_canonicalize code, MAXSYMLINKS, could be moved */
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
+#endif
 
 #include "mono-path.h"
 
@@ -35,6 +39,9 @@ mono_path_canonicalize (const char *path)
                g_free (tmpdir);
        }
 
+#ifdef PLATFORM_WIN32
+       g_strdelimit (abspath, "/", '\\');
+#endif
        abspath = g_strreverse (abspath);
 
        backc = 0;