more lower case changes for Makefile -> makefile
[reactos.git] / reactos / tools / rmkdir.c
index fe9be2f..b2120bb 100644 (file)
@@ -2,16 +2,22 @@
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
+#ifdef _MSC_VER
 #include <direct.h>
-
-#ifdef UNIX_PATHS
-#define DIR_SEPARATOR_CHAR '/'
-#define DIR_SEPARATOR_STRING "/"
 #else
-#ifdef DOS_PATHS
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#endif
+
+#if defined(WIN32)
 #define DIR_SEPARATOR_CHAR '\\'
 #define DIR_SEPARATOR_STRING "\\"
-#endif 
+#define DOS_PATHS
+#else
+#define DIR_SEPARATOR_CHAR '/'
+#define DIR_SEPARATOR_STRING "/"
+#define UNIX_PATHS
 #endif 
 
 char* convert_path(char* origpath)
@@ -19,7 +25,9 @@ char* convert_path(char* origpath)
    char* newpath;
    int i;
    
-   newpath = strdup(origpath);
+   //newpath = strdup(origpath);
+        newpath=malloc(strlen(origpath)+1);
+        strcpy(newpath,origpath);
    
    i = 0;
    while (newpath[i] != 0)