summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2000-01-25 20:52:16 +0000
committerMarc Espie <espie@cvs.openbsd.org>2000-01-25 20:52:16 +0000
commitfaf66c36c9cb90b0b99d0390932b4ff587da3efc (patch)
treeb66865bc631b1e7745f064a1bbe6bb996f7d2832 /usr.bin
parent416211165ee8aedc8f93de315bcaa732f10fc25d (diff)
Kludge to fix timestamp bug.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/dir.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index 0a71509f296..79da0bf429a 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.14 1999/12/19 00:04:25 espie Exp $ */
+/* $OpenBSD: dir.c,v 1.15 2000/01/25 20:52:15 espie Exp $ */
/* $NetBSD: dir.c,v 1.14 1997/03/29 16:51:26 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: dir.c,v 1.14 1999/12/19 00:04:25 espie Exp $";
+static char rcsid[] = "$OpenBSD: dir.c,v 1.15 2000/01/25 20:52:15 espie Exp $";
#endif
#endif /* not lint */
@@ -1019,7 +1019,12 @@ Dir_MTime (gn)
}
stb.st_mtime = (time_t)(long)Hash_GetValue(entry);
Hash_DeleteEntry(&mtimes, entry);
- } else if (stat (fullName, &stb) < 0) {
+ } else if (stat (fullName, &stb) == 0) {
+ /* XXX forces make to differentiate between the epoch and
+ * non-existent files by kludging the timestamp slightly. */
+ if (stb.st_mtime == 0)
+ stb.st_mtime = 1;
+ } else {
if (gn->type & OP_MEMBER) {
if (fullName != gn->path)
free(fullName);