version 1.28, 2000/11/24 14:27:19 |
version 1.29, 2000/11/24 14:36:33 |
|
|
/* Save the modification time so if it's needed, we don't have |
/* Save the modification time so if it's needed, we don't have |
* to fetch it again. */ |
* to fetch it again. */ |
if (DEBUG(DIR)) |
if (DEBUG(DIR)) |
printf("Caching %s for %s\n", Targ_FmtTime(stb.st_mtime), |
printf("Caching %s for %s\n", Targ_FmtTime(mtime), |
file); |
file); |
record_stamp(file, mtime); |
record_stamp(file, mtime); |
nearmisses += 1; |
nearmisses += 1; |
|
|
|
|
grab_stat(stb, mtime); |
grab_stat(stb, mtime); |
if (DEBUG(DIR)) |
if (DEBUG(DIR)) |
printf("Caching %s for %s\n", Targ_FmtTime(stb.st_mtime), |
printf("Caching %s for %s\n", Targ_FmtTime(mtime), |
name); |
name); |
record_stamp(name, mtime); |
record_stamp(name, mtime); |
return estrdup(name); |
return estrdup(name); |
|
|
if (gn->type & OP_MEMBER) { |
if (gn->type & OP_MEMBER) { |
if (fullName != gn->path) |
if (fullName != gn->path) |
free(fullName); |
free(fullName); |
return Arch_MemMTime (gn); |
return Arch_MemMTime(gn); |
} else |
} else |
set_out_of_date(mtime); |
set_out_of_date(mtime); |
} |
} |
|
|
Lst path; |
Lst path; |
{ |
{ |
Lst_Every(path, DirPrintDir); |
Lst_Every(path, DirPrintDir); |
|
} |
|
|
|
#ifndef USE_TIMESPEC |
|
#include <sys/types.h> |
|
#include <utime.h> |
|
#endif |
|
int |
|
set_times(f) |
|
const char *f; |
|
{ |
|
#ifdef USE_TIMESPEC |
|
struct timeval tv[2]; |
|
|
|
TIMESPEC_TO_TIMEVAL(&tv[0], &now); |
|
TIMESPEC_TO_TIMEVAL(&tv[1], &now); |
|
return utimes(f, tv); |
|
#else |
|
struct utimbuf times; |
|
|
|
times.actime = times.modtime = now; |
|
return utime(f, ×); |
|
#endif |
} |
} |