Changeset 601 in kBuild for trunk/src/gmake/kmkbuiltin/mkdir.c
- Timestamp:
- Nov 26, 2006 12:19:19 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/src/gmake/kmkbuiltin/mkdir.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/kmkbuiltin/mkdir.c
r557 r601 58 58 #else 59 59 #include "mscfakes.h" 60 #include <malloc.h> 60 61 #endif 61 62 … … 161 162 char *p; 162 163 164 const size_t len = strlen(path); 165 p = alloca(len + 1); 166 path = memcpy(p, path, len + 1); 167 168 #if defined(_MSC_VER) || defined(__EMX__) 169 p = strchr(path, '\\'); 170 while (p) { 171 *p++ = '/'; 172 p = strchr(p, '\\'); 173 } 174 #endif 175 163 176 p = path; 164 177 oumask = 0; 165 178 retval = 0; 166 179 #if defined(_MSC_VER) || defined(__EMX__) 167 if ( ( (p[0] >= 'A' && p[0] <= 'Z')168 || (p[0] >= 'a' && p[0] <= 'z'))169 && p[1] == ':')170 p += 2;171 else if ( (p[0] == '/' || p[0] == '\\') 172 && (p[1] == '/' || p[1] == '\\') 173 && (p[2] != '/' && p[2] != '\\'))174 {175 char *p2;176 p += 2;177 p2 = strpbrk(p, "\\/");178 if (p2)179 p = p2 + 1;180 }180 if ( ( (p[0] >= 'A' && p[0] <= 'Z') 181 || (p[0] >= 'a' && p[0] <= 'z')) 182 && p[1] == ':') 183 p += 2; 184 else if ( p[0] == '/' 185 && p[1] == '/' 186 && p[2] != '/') 187 { 188 char *p2; 189 p += 2; 190 p2 = strchr(p, '/'); 191 if (p2) 192 p = p2 + 1; 193 } 181 194 #endif 182 195 if (p[0] == '/') /* Skip leading '/'. */
Note:
See TracChangeset
for help on using the changeset viewer.

