Module Name: src
Committed By: rillig
Date: Sun Nov 29 11:17:41 UTC 2020
Modified Files:
src/usr.bin/make: dir.c
Log Message:
make(1): make documentation of CachedDir.refCount more precise
To generate a diff of this commit:
cvs rdiff -u -r1.233 -r1.234 src/usr.bin/make/dir.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/dir.c
diff -u src/usr.bin/make/dir.c:1.233 src/usr.bin/make/dir.c:1.234
--- src/usr.bin/make/dir.c:1.233 Sun Nov 29 10:57:16 2020
+++ src/usr.bin/make/dir.c Sun Nov 29 11:17:41 2020
@@ -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
(void)HashSet_Add(&dir->files, dp->d_name);
}
(void)closedir(d);
+
OpenDirs_Add(&openDirs, dir);
if (path != NULL)
Lst_Append(path, dir);