summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2007-07-14 02:57:46 +0000
committerPaul Smith <psmith@gnu.org>2007-07-14 02:57:46 +0000
commitca4447f2a61406bed28a9648ece93e9687560ca1 (patch)
treecaeae1a84c3787f3c4c930e14af86e25928689d2 /file.c
parent16d32b5b5a192b931445e7999e4c73ee3446ae4d (diff)
downloadmake-ca4447f2a61406bed28a9648ece93e9687560ca1.tar.gz
Fix Savannah bug #20452.
Add a new feature to the test suite suggested by Icarus Sparry: set a timer before invoking a test, so that if it loops infinitely we will wake up and have a chance to kill the process and continue.
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/file.c b/file.c
index 96aad1d2..303f1924 100644
--- a/file.c
+++ b/file.c
@@ -483,6 +483,7 @@ expand_deps (struct file *f)
{
p = variable_expand ("");
variable_buffer_output (p, d->name, strlen (d->name) + 1);
+ p = variable_buffer;
}
else
{
@@ -495,7 +496,8 @@ expand_deps (struct file *f)
o = subst_expand (buffer, d->name, "%", "$*", 1, 2, 0);
- d->name = strcache_add_len (buffer, o - buffer);
+ d->name = strcache_add_len (variable_buffer,
+ o - variable_buffer);
d->staticpattern = 0; /* Clear staticpattern so that we don't
re-expand %s below. */
}