diff options
author | harti <harti@FreeBSD.org> | 2005-02-25 13:16:56 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-02-25 13:16:56 +0000 |
commit | d1abcd79ac0bffbc9147263601cfc48932ff7994 (patch) | |
tree | 963a624e0fb5923bd6f2945b59e5f91ad527872d /usr.bin/make/compat.c | |
parent | 3155a16bbff21fc68e2028ac99868d17bffa9767 (diff) | |
download | FreeBSD-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/compat.c')
-rw-r--r-- | usr.bin/make/compat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index ac225b2..10aa29a 100644 --- a/usr.bin/make/compat.c +++ b/usr.bin/make/compat.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include <string.h> #include <unistd.h> +#include "buf.h" #include "compat.h" #include "config.h" #include "dir.h" @@ -242,6 +243,7 @@ Compat_RunCommand(char *cmd, GNode *gn) LstNode *cmdNode; /* Node where current command is located */ char **av; /* Argument vector for thing to exec */ char *cmd_save; /* saved cmd */ + Buffer *buf; /* * Avoid clobbered variable warnings by forcing the compiler @@ -256,7 +258,10 @@ Compat_RunCommand(char *cmd, GNode *gn) doit = FALSE; cmdNode = Lst_Member(&gn->commands, cmd); - cmdStart = Var_Subst(NULL, cmd, gn, FALSE); + + buf = Var_Subst(NULL, cmd, gn, FALSE); + cmdStart = Buf_GetAll(buf, NULL); + Buf_Destroy(buf, FALSE); /* * brk_string will return an argv with a NULL in av[0], thus causing |