Changeset 269 in kBuild
- Timestamp:
- May 6, 2005 3:48:25 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/kmkbuiltin/rm.c
r228 r269 58 58 #include <unistd.h> 59 59 60 #ifdef __EMX__ 61 #undef S_IFWHT 62 #endif 60 63 #ifndef S_IFWHT 61 64 #define S_IFWHT 0 … … 143 146 vflag = 1; 144 147 break; 148 #ifdef FTS_WHITEOUT 145 149 case 'W': 146 150 Wflag = 1; 147 151 break; 152 #endif 148 153 default: 149 154 return usage(); … … 197 202 if (!needstat) 198 203 flags |= FTS_NOSTAT; 204 #ifdef FTS_WHITEOUT 199 205 if (Wflag) 200 206 flags |= FTS_WHITEOUT; 207 #endif 201 208 if (!(fts = fts_open(argv, flags, NULL))) 202 209 err(1, "fts_open"); … … 278 285 break; 279 286 287 #ifdef FTS_W 280 288 case FTS_W: 281 289 rval = undelete(p->fts_accpath); … … 287 295 } 288 296 break; 297 #endif 289 298 290 299 case FTS_NS: … … 333 342 /* Assume if can't stat the file, can't unlink it. */ 334 343 if (lstat(f, &sb)) { 344 #ifdef FTS_WHITEOUT 335 345 if (Wflag) { 336 346 sb.st_mode = S_IFWHT|S_IWUSR|S_IRUSR; 337 347 } else { 348 #else 349 { 350 #endif 338 351 if (!fflag || errno != ENOENT) { 339 352 fprintf(stderr, "%s: %s: %s\n", argv0, f, strerror(errno)); … … 342 355 continue; 343 356 } 357 #ifdef FTS_WHITEOUT 344 358 } else if (Wflag) { 345 359 fprintf(stderr, "%s: %s: %s\n", argv0, f, strerror(EEXIST)); 346 360 eval = 1; 347 361 continue; 362 #endif 348 363 } 349 364
Note:
See TracChangeset
for help on using the changeset viewer.