core/make/make-3.82-bug_30612.patch

71 lines
2.4 KiB
Diff

commit 2a59dc32aaf0681dec569f32a9d7ab88a379d34f
Author: psmith <psmith>
Date: Sat Aug 14 02:50:14 2010 +0000
- Fix the NEWS file to be accurate
- Add oneshell to $(.FEATURES) (forgot that!)
- Fix Savannah bug #30612: handling of archive references with >1 object
diff --git a/main.c b/main.c
index 9fe8090..782b0de 100644
--- a/main.c
+++ b/main.c
@@ -1138,7 +1138,7 @@ main (int argc, char **argv, char **envp)
a macro and some compilers (MSVC) don't like conditionals in macros. */
{
const char *features = "target-specific order-only second-expansion"
- " else-if shortest-stem undefine"
+ " else-if shortest-stem undefine oneshell"
#ifndef NO_ARCHIVES
" archives"
#endif
diff --git a/read.c b/read.c
index a3ad88e..9dfd4ea 100644
--- a/read.c
+++ b/read.c
@@ -3028,7 +3028,7 @@ parse_file_seq (char **stringp, unsigned int size, int stopchar,
{
/* This looks like the first element in an open archive group.
A valid group MUST have ')' as the last character. */
- const char *e = p + nlen;
+ const char *e = p;
do
{
e = next_token (e);
@@ -3084,19 +3084,19 @@ parse_file_seq (char **stringp, unsigned int size, int stopchar,
Go to the next item in the string. */
if (flags & PARSEFS_NOGLOB)
{
- NEWELT (concat (2, prefix, tp));
+ NEWELT (concat (2, prefix, tmpbuf));
continue;
}
/* If we get here we know we're doing glob expansion.
TP is a string in tmpbuf. NLEN is no longer used.
We may need to do more work: after this NAME will be set. */
- name = tp;
+ name = tmpbuf;
/* Expand tilde if applicable. */
- if (tp[0] == '~')
+ if (tmpbuf[0] == '~')
{
- tildep = tilde_expand (tp);
+ tildep = tilde_expand (tmpbuf);
if (tildep != 0)
name = tildep;
}
@@ -3152,7 +3152,10 @@ parse_file_seq (char **stringp, unsigned int size, int stopchar,
else
{
/* We got a chain of items. Attach them. */
- (*newp)->next = found;
+ if (*newp)
+ (*newp)->next = found;
+ else
+ *newp = found;
/* Find and set the new end. Massage names if necessary. */
while (1)