summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/suff.c
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-02-25 13:16:56 +0000
committerharti <harti@FreeBSD.org>2005-02-25 13:16:56 +0000
commitd1abcd79ac0bffbc9147263601cfc48932ff7994 (patch)
tree963a624e0fb5923bd6f2945b59e5f91ad527872d /usr.bin/make/suff.c
parent3155a16bbff21fc68e2028ac99868d17bffa9767 (diff)
downloadFreeBSD-src-d1abcd79ac0bffbc9147263601cfc48932ff7994.zip
FreeBSD-src-d1abcd79ac0bffbc9147263601cfc48932ff7994.tar.gz
Change the return value of Var_Subst to return a Buffer instead
of a char *. Patch: 7.49 Submitted by: Max Okumoto <okumoto@ucsd.edu>
Diffstat (limited to 'usr.bin/make/suff.c')
-rw-r--r--usr.bin/make/suff.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index 7fb30e8..a6c8650 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -94,6 +94,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include "arch.h"
+#include "buf.h"
#include "config.h"
#include "dir.h"
#include "globals.h"
@@ -1296,6 +1297,7 @@ SuffExpandChildren(void *cgnp, void *pgnp)
LstNode *prevLN; /* Node after which new source should be put */
LstNode *ln; /* List element for old source */
char *cp; /* Expanded value */
+ Buffer *buf;
/*
* New nodes effectively take the place of the child, so place them
@@ -1311,7 +1313,9 @@ SuffExpandChildren(void *cgnp, void *pgnp)
*/
if (strchr(cgn->name, '$') != NULL) {
DEBUGF(SUFF, ("Expanding \"%s\"...", cgn->name));
- cp = Var_Subst(NULL, cgn->name, pgn, TRUE);
+ buf = Var_Subst(NULL, cgn->name, pgn, TRUE);
+ cp = Buf_GetAll(buf, NULL);
+ Buf_Destroy(buf, FALSE);
if (cp != NULL) {
Lst members = Lst_Initializer(members);
OpenPOWER on IntegriCloud