remove utimes() workarounds

With the addition of utimes(), we can remove the workarounds
and use the original NetBSD code for timestamping files.

Also restore use of -p & -r for install while building
This commit is contained in:
Thomas Cort
2013-04-12 18:55:40 +00:00
committed by Ben Gras
parent 3ae6c600a9
commit a0a1440a52
13 changed files with 9 additions and 118 deletions
-14
View File
@@ -779,7 +779,6 @@ fetch(char *URL, const char *path)
*/
signal:
/* set mtime of local file */
#ifndef __minix
if (!n_flag && us.mtime && !o_stdout && of != NULL &&
(stat(path, &sb) != -1) && sb.st_mode & S_IFREG) {
struct timeval tv[2];
@@ -791,19 +790,6 @@ fetch(char *URL, const char *path)
if (utimes(tmppath ? tmppath : path, tv))
warn("%s: utimes()", tmppath ? tmppath : path);
}
#else
if (!n_flag && us.mtime && !o_stdout && of != NULL &&
(stat(path, &sb) != -1) && sb.st_mode & S_IFREG) {
struct utimbuf ut;
fflush(of);
ut.actime = (us.atime ? us.atime : us.mtime);
ut.modtime = us.mtime;
if (utime(tmppath ? tmppath : path, &ut))
warn("%s: utime()", tmppath ? tmppath : path);
}
#endif
/* timed out or interrupted? */
if (fetchLastErrCode == FETCH_TIMEOUT)