- Timestamp:
- May 26, 2007 6:42:30 PM (18 years ago)
- Location:
- trunk/src/gmakenew/kmkbuiltin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmakenew/kmkbuiltin/mscfakes.c
r785 r936 33 33 #include "err.h" 34 34 #include "mscfakes.h" 35 #undef mkdir36 35 37 36 … … 53 52 int mkdir_msc(const char *path, mode_t mode) 54 53 { 55 int rc = mkdir(path);54 int rc = (mkdir)(path); 56 55 if (rc) 57 56 { … … 62 61 while (len > 0 && (str[len - 1] == '/' || str[len - 1] == '\\')) 63 62 str[--len] = '\0'; 64 rc = mkdir(str); 63 rc = (mkdir)(str); 64 free(str); 65 } 66 } 67 return rc; 68 } 69 70 int rmdir_msc(const char *path) 71 { 72 int rc = (rmdir)(path); 73 if (rc) 74 { 75 int len = strlen(path); 76 if (len > 0 && (path[len - 1] == '/' || path[len - 1] == '\\')) 77 { 78 char *str = strdup(path); 79 while (len > 0 && (str[len - 1] == '/' || str[len - 1] == '\\')) 80 str[--len] = '\0'; 81 rc = (rmdir)(str); 65 82 free(str); 66 83 } -
trunk/src/gmakenew/kmkbuiltin/mscfakes.h
r809 r936 122 122 #define readlink(link, buf, size) -1 123 123 #define reallocf(old, size) realloc(old, size) 124 int rmdir_msc(const char *path); 125 #define rmdir(path) rmdir_msc(path) 124 126 intmax_t strtoimax(const char *nptr, char **endptr, int base); 125 127 uintmax_t strtoumax(const char *nptr, char **endptr, int base);
Note:
See TracChangeset
for help on using the changeset viewer.