]>
Commit | Line | Data |
---|---|---|
9c6e89a2 ER |
1 | BASH PATCH REPORT |
2 | ================= | |
3 | ||
4 | Bash-Release: 3.1 | |
5 | Patch-ID: bash31-001 | |
6 | ||
7 | Bug-Reported-by: Mike Frysinger <vapier@gentoo.org> | |
8 | Bug-Reference-ID: <20051212015924.GA820@toucan.gentoo.org> <20051214034438.GK1863@toucan.gentoo.org> | |
9 | Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00030.html http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00041.html | |
10 | ||
11 | Bug-Description: | |
12 | ||
13 | There are parsing problems with compound assignments in several contexts, | |
14 | including as arguments to builtins like `local', `eval', and `let', and | |
15 | as multiple assignments in a single command. | |
16 | ||
17 | Patch: | |
18 | ||
19 | *** ../bash-3.1/parse.y Fri Nov 11 23:14:18 2005 | |
20 | --- parse.y Fri Dec 16 20:43:07 2005 | |
21 | *************** | |
22 | *** 3696,3700 **** | |
23 | b = builtin_address_internal (token, 0); | |
24 | if (b && (b->flags & ASSIGNMENT_BUILTIN)) | |
25 | ! parser_state |= PST_ASSIGNOK; | |
26 | } | |
27 | ||
28 | --- 3696,3702 ---- | |
29 | b = builtin_address_internal (token, 0); | |
30 | if (b && (b->flags & ASSIGNMENT_BUILTIN)) | |
31 | ! parser_state |= PST_ASSIGNOK; | |
32 | ! else if (STREQ (token, "eval") || STREQ (token, "let")) | |
33 | ! parser_state |= PST_ASSIGNOK; | |
34 | } | |
35 | ||
36 | *************** | |
37 | *** 4687,4691 **** | |
38 | { | |
39 | WORD_LIST *wl, *rl; | |
40 | ! int tok, orig_line_number, orig_token_size; | |
41 | char *saved_token, *ret; | |
42 | ||
43 | --- 4689,4693 ---- | |
44 | { | |
45 | WORD_LIST *wl, *rl; | |
46 | ! int tok, orig_line_number, orig_token_size, orig_last_token, assignok; | |
47 | char *saved_token, *ret; | |
48 | ||
49 | *************** | |
50 | *** 4693,4696 **** | |
51 | --- 4695,4699 ---- | |
52 | orig_token_size = token_buffer_size; | |
53 | orig_line_number = line_number; | |
54 | + orig_last_token = last_read_token; | |
55 | ||
56 | last_read_token = WORD; /* WORD to allow reserved words here */ | |
57 | *************** | |
58 | *** 4699,4702 **** | |
59 | --- 4702,4707 ---- | |
60 | token_buffer_size = 0; | |
61 | ||
62 | + assignok = parser_state&PST_ASSIGNOK; /* XXX */ | |
63 | + | |
64 | wl = (WORD_LIST *)NULL; /* ( */ | |
65 | parser_state |= PST_COMPASSIGN; | |
66 | *************** | |
67 | *** 4741,4745 **** | |
68 | } | |
69 | ||
70 | ! last_read_token = WORD; | |
71 | if (wl) | |
72 | { | |
73 | --- 4746,4750 ---- | |
74 | } | |
75 | ||
76 | ! last_read_token = orig_last_token; /* XXX - was WORD? */ | |
77 | if (wl) | |
78 | { | |
79 | *************** | |
80 | *** 4753,4756 **** | |
81 | --- 4758,4765 ---- | |
82 | if (retlenp) | |
83 | *retlenp = (ret && *ret) ? strlen (ret) : 0; | |
84 | + | |
85 | + if (assignok) | |
86 | + parser_state |= PST_ASSIGNOK; | |
87 | + | |
88 | return ret; | |
89 | } | |
90 | *** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005 | |
91 | --- patchlevel.h Wed Dec 7 13:48:42 2005 | |
92 | *************** | |
93 | *** 26,30 **** | |
94 | looks for to find the patch level (for the sccs version string). */ | |
95 | ||
96 | ! #define PATCHLEVEL 0 | |
97 | ||
98 | #endif /* _PATCHLEVEL_H_ */ | |
99 | --- 26,30 ---- | |
100 | looks for to find the patch level (for the sccs version string). */ | |
101 | ||
102 | ! #define PATCHLEVEL 1 | |
103 | ||
104 | #endif /* _PATCHLEVEL_H_ */ |