summaryrefslogtreecommitdiff
path: root/usr.bin/make/dir.c
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2020-11-29 11:17:41 +0000
committerrillig <rillig@NetBSD.org>2020-11-29 11:17:41 +0000
commit166c98fd35ee33805f868edc55df2d35ffb87fa1 (patch)
tree72c9e4739ce7b85fefb720433102e3607310d1db /usr.bin/make/dir.c
parent3a0f8b493dc0c04481faeb98fea29395ae6b6d3c (diff)
make(1): make documentation of CachedDir.refCount more precise
Diffstat (limited to 'usr.bin/make/dir.c')
-rw-r--r--usr.bin/make/dir.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index 4ea872af2c2..d1364a7aed1 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.233 2020/11/29 10:57:16 rillig Exp $ */
+/* $NetBSD: dir.c,v 1.234 2020/11/29 11:17:41 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -136,7 +136,7 @@
#include "job.h"
/* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: dir.c,v 1.233 2020/11/29 10:57:16 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.234 2020/11/29 11:17:41 rillig Exp $");
#define DIR_DEBUG0(text) DEBUG0(DIR, text)
#define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -225,6 +225,7 @@ struct CachedDir {
/*
* The number of SearchPaths that refer to this directory.
* Plus the number of global variables that refer to this directory.
+ * References from openDirs do not count though.
*
* TODO: Check the reference counting; see Dir_Expand, partPath.
*/
@@ -1521,6 +1522,7 @@ Dir_AddDir(SearchPath *path, const char *name)
(void)HashSet_Add(&dir->files, dp->d_name);
}
(void)closedir(d);
+
OpenDirs_Add(&openDirs, dir);
if (path != NULL)
Lst_Append(path, dir);