1328 |
int e; |
int e; |
1329 |
|
|
1330 |
EINTRLOOP (e, stat (name, &st)); |
EINTRLOOP (e, stat (name, &st)); |
1331 |
if (e != 0) |
if (e == 0) |
1332 |
|
mtime = FILE_TIMESTAMP_STAT_MODTIME (name, st); |
1333 |
|
else if (errno == ENOENT || errno == ENOTDIR) |
1334 |
|
mtime = NONEXISTENT_MTIME; |
1335 |
|
else |
1336 |
{ |
{ |
1337 |
if (errno != ENOENT && errno != ENOTDIR) |
perror_with_name ("stat: ", name); |
|
perror_with_name ("stat: ", name); |
|
1338 |
return NONEXISTENT_MTIME; |
return NONEXISTENT_MTIME; |
1339 |
} |
} |
1340 |
mtime = FILE_TIMESTAMP_STAT_MODTIME (name, st); |
|
1341 |
|
/* If we get here we either found it, or it doesn't exist. |
1342 |
|
If it doesn't exist see if we can use a symlink mtime instead. */ |
1343 |
|
|
1344 |
#ifdef MAKE_SYMLINKS |
#ifdef MAKE_SYMLINKS |
1345 |
#ifndef S_ISLNK |
#ifndef S_ISLNK |
1366 |
EINTRLOOP (e, lstat (lpath, &st)); |
EINTRLOOP (e, lstat (lpath, &st)); |
1367 |
if (e) |
if (e) |
1368 |
{ |
{ |
1369 |
/* Eh? Just take what we have. */ |
/* Just take what we have so far. */ |
1370 |
perror_with_name ("lstat: ", lpath); |
if (errno != ENOENT && errno != ENOTDIR) |
1371 |
|
perror_with_name ("lstat: ", lpath); |
1372 |
break; |
break; |
1373 |
} |
} |
1374 |
|
|