# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../make/archive.patch # Copyright (C) 2010 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- https://savannah.gnu.org/bugs/?30612 revision 1.194 date: 2010-08-13 22:50:14 -0400; author: psmith; state: Exp; lines: +9 -6; commitid: 4UaslPqQHZTs5wKu; - Fix Savannah bug #30612: handling of archive references with >1 object Index: read.c =================================================================== RCS file: /sources/make/make/read.c,v retrieving revision 1.193 retrieving revision 1.194 diff -u -p -r1.193 -r1.194 --- ./read.c 13 Jul 2010 01:20:42 -0000 1.193 +++ ./read.c 14 Aug 2010 02:50:14 -0000 1.194 @@ -3028,7 +3028,7 @@ parse_file_seq (char **stringp, unsigned { /* 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 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 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)