aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorJuli Mallett <jmallett@FreeBSD.org>2002-10-23 23:16:43 +0000
committerJuli Mallett <jmallett@FreeBSD.org>2002-10-23 23:16:43 +0000
commitcbfcb39874d97238abccb006b6acf2b2f78b2e65 (patch)
treebbd5e7ccf4fc366bc27a8cad8364cb37e593aa28 /usr.bin/make
parent97490f4b3c85d61c156198a4ed31fefc6d41fe24 (diff)
downloadsrc-cbfcb39874d97238abccb006b6acf2b2f78b2e65.tar.gz
src-cbfcb39874d97238abccb006b6acf2b2f78b2e65.zip
Remove efree(), it isn't used consistently enough to even pretend that it
might help on the systems it could possibly be used as a bandaid for. In fact, the only thing it's useful for is instrumenting free(3) calls, and in that capacity, it's better served as a local patch, than a public wrapper.
Notes
Notes: svn path=/head/; revision=105826
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/arch.c12
-rw-r--r--usr.bin/make/compat.c8
-rw-r--r--usr.bin/make/cond.c2
-rw-r--r--usr.bin/make/job.c2
-rw-r--r--usr.bin/make/main.c4
-rw-r--r--usr.bin/make/make.c8
-rw-r--r--usr.bin/make/nonints.h3
-rw-r--r--usr.bin/make/str.c4
-rw-r--r--usr.bin/make/suff.c6
-rw-r--r--usr.bin/make/targ.c2
10 files changed, 24 insertions, 27 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index 063ad7a69a50..e79d383c87c1 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -149,7 +149,7 @@ ArchFree(void *ap)
free(Hash_GetValue(entry));
free(a->name);
- efree(a->fnametab);
+ free(a->fnametab);
Hash_DeleteTable(&a->members);
free(a);
}
@@ -650,7 +650,7 @@ ArchStatMember (char *archive, char *member, Boolean hash)
badarch:
fclose (arch);
Hash_DeleteTable (&ar->members);
- efree(ar->fnametab);
+ free(ar->fnametab);
free (ar);
return (NULL);
}
@@ -915,8 +915,8 @@ Arch_Touch (GNode *gn)
arch = ArchFindMember(Var_Value (ARCHIVE, gn, &p1),
Var_Value (TARGET, gn, &p2),
&arh, "r+");
- efree(p1);
- efree(p2);
+ free(p1);
+ free(p2);
snprintf(arh.ar_date, sizeof(arh.ar_date), "%-12ld", (long) now);
if (arch != NULL) {
@@ -986,8 +986,8 @@ Arch_MTime(GNode *gn)
arhPtr = ArchStatMember (Var_Value (ARCHIVE, gn, &p1),
Var_Value (TARGET, gn, &p2),
TRUE);
- efree(p1);
- efree(p2);
+ free(p1);
+ free(p2);
if (arhPtr != NULL) {
modTime = (int) strtol(arhPtr->ar_date, NULL, 10);
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c
index 29e89a627f83..3e2d9c9d9a42 100644
--- a/usr.bin/make/compat.c
+++ b/usr.bin/make/compat.c
@@ -115,7 +115,7 @@ CompatInterrupt (int signo)
if (!noExecute && eunlink(file) != -1) {
printf ("*** %s removed\n", file);
}
- efree(p1);
+ free(p1);
/*
* Run .INTERRUPT only if hit with interrupt signal
@@ -435,7 +435,7 @@ CompatMake (void *gnp, void *pgnp)
if (Lst_Member (gn->iParents, pgn) != NULL) {
char *p1;
Var_Set (IMPSRC, Var_Value(TARGET, gn, &p1), pgn);
- efree(p1);
+ free(p1);
}
/*
@@ -569,7 +569,7 @@ CompatMake (void *gnp, void *pgnp)
char *p1;
printf ("\n\nStop in %s.\n", Var_Value(".CURDIR", gn, &p1));
- efree(p1);
+ free(p1);
exit (1);
}
} else if (gn->made == ERROR) {
@@ -582,7 +582,7 @@ CompatMake (void *gnp, void *pgnp)
if (Lst_Member (gn->iParents, pgn) != NULL) {
char *p1;
Var_Set (IMPSRC, Var_Value(TARGET, gn, &p1), pgn);
- efree(p1);
+ free(p1);
}
switch(gn->made) {
case BEINGMADE:
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index a6eb9a925ad0..6f82ecbee3ea 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -284,7 +284,7 @@ CondDoDefined (int argLen, char *arg)
} else {
result = FALSE;
}
- efree(p1);
+ free(p1);
arg[argLen] = savec;
return (result);
}
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index d83f8eb0ce36..b25edd89e35f 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1070,7 +1070,7 @@ Job_CheckCommands(GNode *gn, void (*abortProc)(const char *, ...))
*/
Make_HandleUse(DEFAULT, gn);
Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), gn);
- efree(p1);
+ free(p1);
} else if (Dir_MTime(gn) == 0) {
/*
* The node wasn't the target of an operator we have no .DEFAULT
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index c708cff0665d..e80ff06bef76 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -759,7 +759,7 @@ main(int argc, char **argv)
(void)ReadMakefile(".depend", NULL);
Var_Append("MFLAGS", Var_Value(MAKEFLAGS, VAR_GLOBAL, &p1), VAR_GLOBAL);
- efree(p1);
+ free(p1);
/* Install all the flags into the MAKE envariable. */
if (((p = Var_Value(MAKEFLAGS, VAR_GLOBAL, &p1)) != NULL) && *p)
@@ -768,7 +768,7 @@ main(int argc, char **argv)
#else
setenv("MAKE", p, 1);
#endif
- efree(p1);
+ free(p1);
/*
* For compatibility, look at the directories in the VPATH variable
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index 653bd215e18b..762b65a648a6 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -375,7 +375,7 @@ Make_Update (GNode *cgn)
char *p1;
cname = Var_Value (TARGET, cgn, &p1);
- efree(p1);
+ free(p1);
/*
* If the child was actually made, see what its modification time is
@@ -502,7 +502,7 @@ Make_Update (GNode *cgn)
Var_Set (PREFIX, cpref, pgn);
}
}
- efree(ptr);
+ free(ptr);
Lst_Close (cgn->iParents);
}
}
@@ -570,7 +570,7 @@ MakeAddAllSrc (void *cgnp, void *pgnp)
*/
Var_Append(OODATE, child, pgn);
}
- efree(p1);
+ free(p1);
}
return (0);
}
@@ -612,7 +612,7 @@ Make_DoAllVar (GNode *gn)
if (gn->type & OP_JOIN) {
char *p1;
Var_Set (TARGET, Var_Value (ALLSRC, gn, &p1), gn);
- efree(p1);
+ free(p1);
}
}
diff --git a/usr.bin/make/nonints.h b/usr.bin/make/nonints.h
index 0b08e165320a..a9720c591094 100644
--- a/usr.bin/make/nonints.h
+++ b/usr.bin/make/nonints.h
@@ -73,9 +73,6 @@ int PrintAddr(void *, void *);
void Finish(int);
char *estrdup(const char *);
void *emalloc(size_t);
-/* efree(x) works when x==NULL. STDC behavior, may need some different
- * definition for cross-builds on deficient systems */
-#define efree free
void *erealloc(void *, size_t);
void enomem(void);
int eunlink(const char *);
diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c
index af5a23930bcf..56cb71fd0dde 100644
--- a/usr.bin/make/str.c
+++ b/usr.bin/make/str.c
@@ -115,8 +115,8 @@ str_concat(char *s1, char *s2, int flags)
/* free original strings */
if (flags & STR_DOFREE) {
- (void)efree(s1);
- (void)efree(s2);
+ (void)free(s1);
+ (void)free(s2);
}
return(result);
}
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index 688f320aaea2..b6eb1240633d 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -1633,7 +1633,7 @@ SuffFindArchiveDeps(GNode *gn, Lst slst)
for (i = (sizeof(copy)/sizeof(copy[0]))-1; i >= 0; i--) {
char *p1;
Var_Set(copy[i], Var_Value(copy[i], mem, &p1), gn);
- efree(p1);
+ free(p1);
}
@@ -1955,7 +1955,7 @@ sfnd_abort:
gn->suffix = (targ == NULL) ? NULL : targ->suff;
if (gn->suffix)
gn->suffix->refCount++;
- efree(gn->path);
+ free(gn->path);
gn->path = estrdup(gn->name);
}
@@ -2055,7 +2055,7 @@ sfnd_abort:
/*
* So Dir_MTime doesn't go questing for it...
*/
- efree(gn->path);
+ free(gn->path);
gn->path = estrdup(gn->name);
/*
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c
index 2d0f1c37657c..ca8a718e649c 100644
--- a/usr.bin/make/targ.c
+++ b/usr.bin/make/targ.c
@@ -207,7 +207,7 @@ TargFreeGN (void *gnp)
free(gn->name);
- efree(gn->path);
+ free(gn->path);
Lst_Destroy(gn->iParents, NOFREE);
Lst_Destroy(gn->cohorts, NOFREE);