wok view bash/stuff/bash-4.1-fixes-3.patch @ rev 8087

Changed linux-ieee1394 to linux-firewire. This is cause ieee1394 stack is replaced by firewire now.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Jan 22 04:19:17 2011 +0000 (2011-01-22)
parents f534b662cde5
children
line source
1 Submitted By: Matt Burgess <matthew_at_linuxfromscratch_dot_org>
2 Date: 2010-10-11
3 Initial Package Version: 4.1
4 Upstream Status: Already in upstream patch repo
5 Origin: Upstream
6 Description: This patch contains upstream patch numbers 1 thru 9.
8 diff -Naur bash-4.1.orig/bashline.c bash-4.1/bashline.c
9 --- bash-4.1.orig/bashline.c 2009-10-24 19:10:19.000000000 +0100
10 +++ bash-4.1/bashline.c 2010-10-11 22:39:38.213029316 +0100
11 @@ -1680,7 +1680,7 @@
12 a single match (multiple matches that end up reducing the number of
13 characters in the common prefix are bad) will ever be returned on
14 regular completion. */
15 - if (glob_pattern_p (hint))
16 + if (globpat)
17 {
18 if (state == 0)
19 {
20 diff -Naur bash-4.1.orig/builtins/declare.def bash-4.1/builtins/declare.def
21 --- bash-4.1.orig/builtins/declare.def 2009-11-26 00:42:00.000000000 +0000
22 +++ bash-4.1/builtins/declare.def 2010-10-11 22:39:38.397029565 +0100
23 @@ -512,7 +512,7 @@
24 {
25 /* let bind_{array,assoc}_variable take care of this. */
26 if (assoc_p (var))
27 - bind_assoc_variable (var, name, "0", value, aflags);
28 + bind_assoc_variable (var, name, savestring ("0"), value, aflags);
29 else
30 bind_array_variable (name, 0, value, aflags);
31 }
32 diff -Naur bash-4.1.orig/builtins/printf.def bash-4.1/builtins/printf.def
33 --- bash-4.1.orig/builtins/printf.def 2009-11-20 20:31:23.000000000 +0000
34 +++ bash-4.1/builtins/printf.def 2010-10-11 22:39:38.381029548 +0100
35 @@ -117,7 +117,7 @@
36 else if (have_fieldwidth) \
37 nw = vflag ? vbprintf (f, fieldwidth, func) : printf (f, fieldwidth, func); \
38 else if (have_precision) \
39 - nw = vflag ? vbprintf (f, precision, func) : printf (f, fieldwidth, func); \
40 + nw = vflag ? vbprintf (f, precision, func) : printf (f, precision, func); \
41 else \
42 nw = vflag ? vbprintf (f, func) : printf (f, func); \
43 tw += nw; \
44 @@ -172,7 +172,7 @@
45 #endif
47 #if !HAVE_VSNPRINTF
48 -extern int vsnprintf __P((char *, size_t, const char *, ...)) __attribute__((__format__ (printf, 3, 4)));
49 +extern int vsnprintf __P((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0)));
50 #endif
52 static void printf_erange __P((char *));
53 diff -Naur bash-4.1.orig/builtins/read.def bash-4.1/builtins/read.def
54 --- bash-4.1.orig/builtins/read.def 2009-10-08 16:35:46.000000000 +0100
55 +++ bash-4.1/builtins/read.def 2010-10-11 22:39:38.321029469 +0100
56 @@ -615,14 +615,15 @@
57 if (unbuffered_read == 0)
58 zsyncfd (fd);
60 - interrupt_immediately--;
61 - terminate_immediately--;
62 discard_unwind_frame ("read_builtin");
64 retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS;
66 assign_vars:
68 + interrupt_immediately--;
69 + terminate_immediately--;
70 +
71 #if defined (ARRAY_VARS)
72 /* If -a was given, take the string read, break it into a list of words,
73 an assign them to `arrayname' in turn. */
74 diff -Naur bash-4.1.orig/lib/readline/complete.c bash-4.1/lib/readline/complete.c
75 --- bash-4.1.orig/lib/readline/complete.c 2009-11-29 23:39:30.000000000 +0000
76 +++ bash-4.1/lib/readline/complete.c 2010-10-11 22:39:38.189029310 +0100
77 @@ -2138,7 +2138,7 @@
78 All other entries except "." and ".." match. */
79 if (filename_len == 0)
80 {
81 - if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name))
82 + if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn))
83 continue;
85 if (convfn[0] != '.' ||
86 @@ -2219,7 +2219,7 @@
87 temp[dirlen++] = '/';
88 }
90 - strcpy (temp + dirlen, entry->d_name);
91 + strcpy (temp + dirlen, convfn);
92 }
93 else
94 temp = savestring (convfn);
95 diff -Naur bash-4.1.orig/patchlevel.h bash-4.1/patchlevel.h
96 --- bash-4.1.orig/patchlevel.h 2009-10-01 21:39:22.000000000 +0100
97 +++ bash-4.1/patchlevel.h 2010-10-11 22:39:38.433029614 +0100
98 @@ -25,6 +25,6 @@
99 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
100 looks for to find the patch level (for the sccs version string). */
102 -#define PATCHLEVEL 0
103 +#define PATCHLEVEL 9
105 #endif /* _PATCHLEVEL_H_ */
106 diff -Naur bash-4.1.orig/print_cmd.c bash-4.1/print_cmd.c
107 --- bash-4.1.orig/print_cmd.c 2009-09-16 20:32:26.000000000 +0100
108 +++ bash-4.1/print_cmd.c 2010-10-11 22:39:38.357029519 +0100
109 @@ -113,6 +113,12 @@
111 #define CHECK_XTRACE_FP xtrace_fp = (xtrace_fp ? xtrace_fp : stderr)
113 +#define PRINT_DEFERRED_HEREDOCS(x) \
114 + do { \
115 + if (deferred_heredocs) \
116 + print_deferred_heredocs (x); \
117 + } while (0)
118 +
119 /* Non-zero means the stuff being printed is inside of a function def. */
120 static int inside_function_def;
121 static int skip_this_indent;
122 @@ -560,13 +566,15 @@
123 FOR_COM *for_command;
124 {
125 print_for_command_head (for_command);
126 -
127 cprintf (";");
128 newline ("do\n");
129 +
130 indentation += indentation_amount;
131 make_command_string_internal (for_command->action);
132 + PRINT_DEFERRED_HEREDOCS ("");
133 semicolon ();
134 indentation -= indentation_amount;
135 +
136 newline ("done");
137 }
139 diff -Naur bash-4.1.orig/sig.c bash-4.1/sig.c
140 --- bash-4.1.orig/sig.c 2009-08-14 21:31:52.000000000 +0100
141 +++ bash-4.1/sig.c 2010-10-11 22:39:38.421029599 +0100
142 @@ -655,6 +655,9 @@
143 act.sa_flags |= SA_INTERRUPT; /* XXX */
144 else
145 act.sa_flags |= SA_RESTART; /* XXX */
146 +#else
147 + if (sig == SIGCHLD)
148 + act.sa_flags |= SA_RESTART;
149 #endif
150 sigemptyset (&act.sa_mask);
151 sigemptyset (&oact.sa_mask);
152 diff -Naur bash-4.1.orig/variables.c bash-4.1/variables.c
153 --- bash-4.1.orig/variables.c 2009-11-03 19:13:58.000000000 +0000
154 +++ bash-4.1/variables.c 2010-10-11 22:39:38.281029411 +0100
155 @@ -3808,6 +3808,11 @@
157 if (tempvar_p (var) && (posixly_correct || (var->attributes & att_propagate)))
158 {
159 + /* Make sure we have a hash table to store the variable in while it is
160 + being propagated down to the global variables table. Create one if
161 + we have to */
162 + if ((vc_isfuncenv (shell_variables) || vc_istempenv (shell_variables)) && shell_variables->table == 0)
163 + shell_variables->table = hash_create (0);
164 /* XXX - should we set v->context here? */
165 v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0);
166 if (shell_variables == global_variables)