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/main.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/main.c')
-rw-r--r-- | usr.bin/make/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index fb0b9d9dd45..26a0bd8a47e 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.42 2000/09/14 13:43:31 espie Exp $ */ +/* $OpenBSD: main.c,v 1.43 2000/09/14 13:46:45 espie Exp $ */ /* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */ /* @@ -78,6 +78,7 @@ #include <sys/wait.h> #include <errno.h> #include <fcntl.h> +#include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <time.h> @@ -87,7 +88,7 @@ #include <varargs.h> #endif #include "make.h" -#include "hash.h" +#include "ohash.h" #include "dir.h" #include "job.h" #include "pathnames.h" @@ -104,7 +105,7 @@ static char copyright[] = static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else UNUSED -static char rcsid[] = "$OpenBSD: main.c,v 1.42 2000/09/14 13:43:31 espie Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.43 2000/09/14 13:46:45 espie Exp $"; #endif #endif /* not lint */ |