summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2001-11-11 12:35:04 +0000
committerMarc Espie <espie@cvs.openbsd.org>2001-11-11 12:35:04 +0000
commitdc530fd86f2e0e8527101abd7e2e9646177825db (patch)
tree6fc760e44ccc2e2e620d64e990f53e6a2a405a70
parent322915facec3177278e63d2d902533d68526ab68 (diff)
Fixed version... don't see how this could work on i386, since it didn't
initialize create in main.c.
-rw-r--r--usr.bin/make/Makefile4
-rw-r--r--usr.bin/make/dir.c4
-rw-r--r--usr.bin/make/job.c6
-rw-r--r--usr.bin/make/lowparse.c4
-rw-r--r--usr.bin/make/lst.h7
-rw-r--r--usr.bin/make/main.c12
-rw-r--r--usr.bin/make/make.c4
-rw-r--r--usr.bin/make/parse.c8
-rw-r--r--usr.bin/make/suff.c10
9 files changed, 31 insertions, 28 deletions
diff --git a/usr.bin/make/Makefile b/usr.bin/make/Makefile
index 41a139a07d0..76de395a5e2 100644
--- a/usr.bin/make/Makefile
+++ b/usr.bin/make/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.32 2001/11/11 06:02:05 deraadt Exp $
+# $OpenBSD: Makefile,v 1.33 2001/11/11 12:35:02 espie Exp $
PROG= make
CFLAGS+= -I${.OBJDIR} -I${.CURDIR}
@@ -19,7 +19,7 @@ SRCS= arch.c buf.c cmd_exec.c compat.c cond.c dir.c error.c for.c \
var.c varmodifiers.c varname.c
SRCS+= lstAddNew.c lstAppend.c lstConcat.c lstConcatDestroy.c \
lstDeQueue.c lstDestroy.c lstDupl.c lstFindFrom.c lstForEachFrom.c \
- lstInit.c lstInsert.c lstMember.c lstRemove.c lstReplace.c lstSucc.c
+ lstInsert.c lstMember.c lstRemove.c lstReplace.c lstSucc.c
.PATH: ${.CURDIR}/lst.lib
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index b3949586b92..c931630b37b 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: dir.c,v 1.36 2001/11/11 06:02:06 deraadt Exp $ */
+/* $OpenBSD: dir.c,v 1.37 2001/11/11 12:35:02 espie Exp $ */
/* $NetBSD: dir.c,v 1.14 1997/03/29 16:51:26 christos Exp $ */
/*
@@ -320,7 +320,7 @@ Dir_Init()
{
char *dotname = ".";
- Lst_Init(dirSearchPath);
+ Static_Lst_Init(dirSearchPath);
ohash_init(&openDirectories, 4, &dir_info);
ohash_init(&mtimes, 4, &stamp_info);
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index a4933e67dbb..a5b4f392d77 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: job.c,v 1.45 2001/11/11 06:02:06 deraadt Exp $ */
+/* $OpenBSD: job.c,v 1.46 2001/11/11 12:35:02 espie Exp $ */
/* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */
/*
@@ -2348,8 +2348,8 @@ Job_Init(maxproc, maxlocal)
else
(void)close(tfd);
- Lst_Init(&jobs);
- Lst_Init(&stoppedJobs);
+ Static_Lst_Init(&jobs);
+ Static_Lst_Init(&stoppedJobs);
maxJobs = maxproc;
maxLocal = maxlocal;
nJobs = 0;
diff --git a/usr.bin/make/lowparse.c b/usr.bin/make/lowparse.c
index 39260b9100f..09184ff5e30 100644
--- a/usr.bin/make/lowparse.c
+++ b/usr.bin/make/lowparse.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lowparse.c,v 1.15 2001/11/11 06:02:06 deraadt Exp $ */
+/* $OpenBSD: lowparse.c,v 1.16 2001/11/11 12:35:02 espie Exp $ */
/* low-level parsing functions. */
@@ -443,7 +443,7 @@ Parse_Getfilename()
void
LowParse_Init()
{
- Lst_Init(&input_stack);
+ Static_Lst_Init(&input_stack);
current = NULL;
}
diff --git a/usr.bin/make/lst.h b/usr.bin/make/lst.h
index a78be9add5b..b3b0fff16b8 100644
--- a/usr.bin/make/lst.h
+++ b/usr.bin/make/lst.h
@@ -2,7 +2,7 @@
#define _LST_H_
/* $OpenPackages$ */
-/* $OpenBSD: lst.h,v 1.23 2001/11/11 06:02:06 deraadt Exp $ */
+/* $OpenBSD: lst.h,v 1.24 2001/11/11 12:35:02 espie Exp $ */
/* $NetBSD: lst.h,v 1.7 1996/11/06 17:59:12 christos Exp $ */
/*
@@ -81,7 +81,10 @@ typedef void *(*DuplicateProc)(void *);
* Creation/destruction functions
*/
/* Create a new list */
-extern void Lst_Init(LIST *);
+#define Lst_Init(l) (l)->firstPtr = (l)->lastPtr = NULL
+/* Static lists are already okay */
+#define Static_Lst_Init(l)
+
/* Duplicate an existing list */
extern Lst Lst_Clone(Lst, Lst, DuplicateProc);
/* Destroy an old one */
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index 94ac71e8f1e..1be8e27b55e 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: main.c,v 1.55 2001/11/11 06:02:06 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.56 2001/11/11 12:35:02 espie Exp $ */
/* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */
/*
@@ -471,7 +471,7 @@ main(argc, argv)
int argc;
char **argv;
{
- LIST targs; /* target nodes to create */
+ static LIST targs; /* target nodes to create */
bool outOfDate = true; /* false if all targets up to date */
struct stat sb, sa;
char *p, *path, *pathp, *pwd;
@@ -587,10 +587,10 @@ main(argc, argv)
esetenv("PWD", objdir);
unsetenv("CDPATH");
- Lst_Init(create);
- Lst_Init(&makefiles);
- Lst_Init(&varstoprint);
- Lst_Init(&targs);
+ Static_Lst_Init(create);
+ Static_Lst_Init(&makefiles);
+ Static_Lst_Init(&varstoprint);
+ Static_Lst_Init(&targs);
beSilent = false; /* Print commands as executed */
ignoreErrors = false; /* Pay attention to non-zero returns */
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index c0dfd5ff987..685669dd147 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: make.c,v 1.29 2001/11/11 06:02:06 deraadt Exp $ */
+/* $OpenBSD: make.c,v 1.30 2001/11/11 12:35:02 espie Exp $ */
/* $NetBSD: make.c,v 1.10 1996/11/06 17:59:15 christos Exp $ */
/*
@@ -781,7 +781,7 @@ Make_Run(targs)
LIST examine; /* List of targets to examine */
int errors; /* Number of errors the Job module reports */
- Lst_Init(&toBeMade);
+ Static_Lst_Init(&toBeMade);
Lst_Clone(&examine, targs, NOCOPY);
numNodes = 0;
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 4cf8439eb44..a4c4b54fe06 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: parse.c,v 1.65 2001/11/11 06:02:06 deraadt Exp $ */
+/* $OpenBSD: parse.c,v 1.66 2001/11/11 12:35:02 espie Exp $ */
/* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */
/*
@@ -1591,14 +1591,14 @@ void
Parse_Init()
{
mainNode = NULL;
- Lst_Init(parseIncPath);
- Lst_Init(sysIncPath);
+ Static_Lst_Init(parseIncPath);
+ Static_Lst_Init(sysIncPath);
Array_Init(&gsources, SOURCES_SIZE);
Array_Init(&gtargets, TARGETS_SIZE);
LowParse_Init();
#ifdef CLEANUP
- Lst_Init(&targCmds);
+ Static_Lst_Init(&targCmds);
#endif
}
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index 87b9ccdf9ba..e9db75dbe4e 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: suff.c,v 1.45 2001/11/11 06:02:06 deraadt Exp $ */
+/* $OpenBSD: suff.c,v 1.46 2001/11/11 12:35:03 espie Exp $ */
/* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */
/*
@@ -1984,12 +1984,12 @@ Suff_SetNull(name)
void
Suff_Init()
{
- Lst_Init(&sufflist);
+ Static_Lst_Init(&sufflist);
#ifdef CLEANUP
- Lst_Init(&suffClean);
+ Static_Lst_Init(&suffClean);
#endif
- Lst_Init(&srclist);
- Lst_Init(&transforms);
+ Static_Lst_Init(&srclist);
+ Static_Lst_Init(&transforms);
sNum = 0;
/*