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/suff.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/suff.c')
-rw-r--r-- | usr.bin/make/suff.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c index 26541b915fc..c1fc002de29 100644 --- a/usr.bin/make/suff.c +++ b/usr.bin/make/suff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: suff.c,v 1.37 2000/09/14 13:40:03 espie Exp $ */ +/* $OpenBSD: suff.c,v 1.38 2000/09/14 13:46:45 espie Exp $ */ /* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */ /* @@ -90,9 +90,10 @@ * if the target had no implicit sources. */ +#include <stddef.h> #include <stdio.h> #include "make.h" -#include "hash.h" +#include "ohash.h" #include "dir.h" #ifndef lint @@ -100,7 +101,7 @@ static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94"; #else UNUSED -static char rcsid[] = "$OpenBSD: suff.c,v 1.37 2000/09/14 13:40:03 espie Exp $"; +static char rcsid[] = "$OpenBSD: suff.c,v 1.38 2000/09/14 13:46:45 espie Exp $"; #endif #endif /* not lint */ |