1 |
vapier 09/02/26 20:26:28 |
2 |
|
3 |
Modified: bash-4.0-declare-identifier.patch |
4 |
Log: |
5 |
Newer patch from upstream. |
6 |
(Portage version: 2.2_rc23/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.2 app-shells/bash/files/bash-4.0-declare-identifier.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/bash/files/bash-4.0-declare-identifier.patch?rev=1.2&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/bash/files/bash-4.0-declare-identifier.patch?rev=1.2&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/bash/files/bash-4.0-declare-identifier.patch?r1=1.1&r2=1.2 |
14 |
|
15 |
Index: bash-4.0-declare-identifier.patch |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/app-shells/bash/files/bash-4.0-declare-identifier.patch,v |
18 |
retrieving revision 1.1 |
19 |
retrieving revision 1.2 |
20 |
diff -u -r1.1 -r1.2 |
21 |
--- bash-4.0-declare-identifier.patch 25 Feb 2009 17:22:26 -0000 1.1 |
22 |
+++ bash-4.0-declare-identifier.patch 26 Feb 2009 20:26:28 -0000 1.2 |
23 |
@@ -1,18 +1,31 @@ |
24 |
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00206.html |
25 |
|
26 |
*** ../bash-4.0/builtins/declare.def 2009-01-04 14:32:22.000000000 -0500 |
27 |
---- builtins/declare.def 2009-02-25 09:41:35.000000000 -0500 |
28 |
+--- builtins/declare.def 2009-02-26 11:40:16.000000000 -0500 |
29 |
*************** |
30 |
-*** 288,291 **** |
31 |
---- 288,297 ---- |
32 |
- } |
33 |
- } |
34 |
-+ else if (legal_identifier (name) == 0) |
35 |
-+ { |
36 |
-+ sh_invalidid (name); |
37 |
-+ assign_error++; |
38 |
-+ NEXT_VARIABLE (); |
39 |
-+ } |
40 |
- else |
41 |
- value = ""; |
42 |
- |
43 |
+*** 296,299 **** |
44 |
+--- 296,306 ---- |
45 |
+ if (t = strchr (name, '[')) /* ] */ |
46 |
+ { |
47 |
++ /* If offset != 0 we have already validated any array reference */ |
48 |
++ if (offset == 0 && valid_array_reference (name) == 0) |
49 |
++ { |
50 |
++ sh_invalidid (name); |
51 |
++ assign_error++; |
52 |
++ NEXT_VARIABLE (); |
53 |
++ } |
54 |
+ subscript_start = t; |
55 |
+ *t = '\0'; |
56 |
+*************** |
57 |
+*** 485,489 **** |
58 |
+ /* declare -a name[[n]] or declare name[n] makes name an indexed |
59 |
+ array variable. */ |
60 |
+! else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0) |
61 |
+ var = convert_var_to_array (var); |
62 |
+ #endif /* ARRAY_VARS */ |
63 |
+--- 492,496 ---- |
64 |
+ /* declare -a name[[n]] or declare name[n] makes name an indexed |
65 |
+ array variable. */ |
66 |
+! else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0 && assoc_p (var) == 0) |
67 |
+ var = convert_var_to_array (var); |
68 |
+ #endif /* ARRAY_VARS */ |