diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2000-09-14 13:46:46 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2000-09-14 13:46:46 +0000 |
commit | cc11fcd76306cd4861949984c169afd9d9b1f759 (patch) | |
tree | f2811d279907b0c95af6a40754e79cad5e2dc6ce /usr.bin/make/compat.c | |
parent | c4465c8c2691ab013c83c9c05cb5c22c8131bcf7 (diff) |
Replace the old hash used to hold file names within a directory with
open hashing.
An interesting optimization is that the open hashing interface is more
fine-grained, hence we can compute the correct hash value at the start
of Dir_FindFile, and reuse it for each hash structure into which we look
(the effect is measurable on large directories along with objdir/VPATH).
Remove a few unnecessary Lst_Open/Lst_Close that serve no purpose except
obfuscating the code.
The interface to dir.h changes slightly, hence tedious includes changes...
Diffstat (limited to 'usr.bin/make/compat.c')
-rw-r--r-- | usr.bin/make/compat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index 7dbe71f423b..6e8d066c6c8 100644 --- a/usr.bin/make/compat.c +++ b/usr.bin/make/compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.c,v 1.33 2000/09/14 13:32:06 espie Exp $ */ +/* $OpenBSD: compat.c,v 1.34 2000/09/14 13:46:44 espie Exp $ */ /* $NetBSD: compat.c,v 1.14 1996/11/06 17:59:01 christos Exp $ */ /* @@ -52,6 +52,7 @@ * thems as need creatin' */ +#include <stddef.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> @@ -60,7 +61,7 @@ #include <errno.h> #include <signal.h> #include "make.h" -#include "hash.h" +#include "ohash.h" #include "dir.h" #include "job.h" @@ -69,7 +70,7 @@ static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else UNUSED -static char rcsid[] = "$OpenBSD: compat.c,v 1.33 2000/09/14 13:32:06 espie Exp $"; +static char rcsid[] = "$OpenBSD: compat.c,v 1.34 2000/09/14 13:46:44 espie Exp $"; #endif #endif /* not lint */ |