Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make(1): fix cached_stat for files with st_mtime 0
details: https://anonhg.NetBSD.org/src/rev/2e6adc6d1161
branches: trunk
changeset: 943395:2e6adc6d1161
user: rillig <rillig%NetBSD.org@localhost>
date: Wed Sep 02 04:32:13 2020 +0000
description:
make(1): fix cached_stat for files with st_mtime 0
diffstat:
usr.bin/make/dir.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (42 lines):
diff -r 16bd3c78d083 -r 2e6adc6d1161 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c Wed Sep 02 04:19:52 2020 +0000
+++ b/usr.bin/make/dir.c Wed Sep 02 04:32:13 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.134 2020/09/02 04:19:52 rillig Exp $ */
+/* $NetBSD: dir.c,v 1.135 2020/09/02 04:32:13 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: dir.c,v 1.134 2020/09/02 04:19:52 rillig Exp $";
+static char rcsid[] = "$NetBSD: dir.c,v 1.135 2020/09/02 04:32:13 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94";
#else
-__RCSID("$NetBSD: dir.c,v 1.134 2020/09/02 04:19:52 rillig Exp $");
+__RCSID("$NetBSD: dir.c,v 1.135 2020/09/02 04:32:13 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -315,12 +315,12 @@
if (rc == -1)
return -1;
+ if (sys_st.st_mtime == 0)
+ sys_st.st_mtime = 1; /* avoid confusion with missing file */
+
mst->mst_mode = sys_st.st_mode;
mst->mst_mtime = sys_st.st_mtime;
- if (sys_st.st_mtime == 0)
- sys_st.st_mtime = 1; /* avoid confusion with missing file */
-
if (entry == NULL)
entry = Hash_CreateEntry(htp, pathname, NULL);
if (Hash_GetValue(entry) == NULL) {
Home |
Main Index |
Thread Index |
Old Index