CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
m4: aligned with upstream
[crossrootfs.git] / make / savannah-bugs.patch
1 https://savannah.gnu.org/bugs/?30612
2 https://savannah.gnu.org/bugs/?30723
3 https://savannah.gnu.org/bugs/?31743 (no longer visible)
4
5 --- main.c 2010-07-19 14:10:53.000000000 +0700
6 +++ main.c 2011-01-12 21:31:30.114891591 +0700
7 @@ -1,3 +1,4 @@
8 +
9 /* Argument parsing and main program of GNU Make.
10 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
11 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
12 @@ -1138,7 +1139,7 @@
13 a macro and some compilers (MSVC) don't like conditionals in macros. */
14 {
15 const char *features = "target-specific order-only second-expansion"
16 - " else-if shortest-stem undefine"
17 + " else-if shortest-stem undefine oneshell"
18 #ifndef NO_ARCHIVES
19 " archives"
20 #endif
21 @@ -2093,7 +2094,7 @@
22 const char *pv = define_makeflags (1, 1);
23 char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1);
24 sprintf (p, "MAKEFLAGS=%s", pv);
25 - putenv (p);
26 + putenv (allocated_variable_expand (p));
27 }
28
29 if (ISDB (DB_BASIC))
30 --- read.c 2010-07-13 08:20:42.000000000 +0700
31 +++ read.c 2011-01-12 21:31:23.497486028 +0700
32 @@ -3028,7 +3028,7 @@
33 {
34 /* This looks like the first element in an open archive group.
35 A valid group MUST have ')' as the last character. */
36 - const char *e = p + nlen;
37 + const char *e = p;
38 do
39 {
40 e = next_token (e);
41 @@ -3084,19 +3084,19 @@
42 Go to the next item in the string. */
43 if (flags & PARSEFS_NOGLOB)
44 {
45 - NEWELT (concat (2, prefix, tp));
46 + NEWELT (concat (2, prefix, tmpbuf));
47 continue;
48 }
49
50 /* If we get here we know we're doing glob expansion.
51 TP is a string in tmpbuf. NLEN is no longer used.
52 We may need to do more work: after this NAME will be set. */
53 - name = tp;
54 + name = tmpbuf;
55
56 /* Expand tilde if applicable. */
57 - if (tp[0] == '~')
58 + if (tmpbuf[0] == '~')
59 {
60 - tildep = tilde_expand (tp);
61 + tildep = tilde_expand (tmpbuf);
62 if (tildep != 0)
63 name = tildep;
64 }
65 @@ -3152,7 +3152,11 @@
66 else
67 {
68 /* We got a chain of items. Attach them. */
69 - (*newp)->next = found;
70 + if (*newp)
71 + (*newp)->next = found;
72 + else
73 + *newp = found;
74 +
75
76 /* Find and set the new end. Massage names if necessary. */
77 while (1)
78 --- read.c 2010/11/06 21:56:24 1.195
79 +++ read.c 2010/11/30 14:48:53 1.196
80 @@ -1811,7 +1811,8 @@
81 int len = strlen(v->name);
82
83 gv = lookup_variable (v->name, len);
84 - if (gv && (gv->origin == o_env_override || gv->origin == o_command))
85 + if (gv && v != gv
86 + && (gv->origin == o_env_override || gv->origin == o_command))
87 {
88 if (v->value != 0)
89 free (v->value);