wok-stable rev 7898
bash: update patches
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sun Jan 09 14:11:12 2011 +0100 (2011-01-09) |
parents | d2d594c8804d |
children | 516471adc8f2 |
files | bash/stuff/bash-4.1-fixes-3.patch bash/stuff/bash32-025.patch |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/bash/stuff/bash-4.1-fixes-3.patch Sun Jan 09 14:11:12 2011 +0100 1.3 @@ -0,0 +1,166 @@ 1.4 +Submitted By: Matt Burgess <matthew_at_linuxfromscratch_dot_org> 1.5 +Date: 2010-10-11 1.6 +Initial Package Version: 4.1 1.7 +Upstream Status: Already in upstream patch repo 1.8 +Origin: Upstream 1.9 +Description: This patch contains upstream patch numbers 1 thru 9. 1.10 + 1.11 +diff -Naur bash-4.1.orig//bashline.c bash-4.1//bashline.c 1.12 +--- bash-4.1.orig//bashline.c 2009-10-24 19:10:19.000000000 +0100 1.13 ++++ bash-4.1//bashline.c 2010-10-11 22:39:38.213029316 +0100 1.14 +@@ -1680,7 +1680,7 @@ 1.15 + a single match (multiple matches that end up reducing the number of 1.16 + characters in the common prefix are bad) will ever be returned on 1.17 + regular completion. */ 1.18 +- if (glob_pattern_p (hint)) 1.19 ++ if (globpat) 1.20 + { 1.21 + if (state == 0) 1.22 + { 1.23 +diff -Naur bash-4.1.orig//builtins/declare.def bash-4.1//builtins/declare.def 1.24 +--- bash-4.1.orig//builtins/declare.def 2009-11-26 00:42:00.000000000 +0000 1.25 ++++ bash-4.1//builtins/declare.def 2010-10-11 22:39:38.397029565 +0100 1.26 +@@ -512,7 +512,7 @@ 1.27 + { 1.28 + /* let bind_{array,assoc}_variable take care of this. */ 1.29 + if (assoc_p (var)) 1.30 +- bind_assoc_variable (var, name, "0", value, aflags); 1.31 ++ bind_assoc_variable (var, name, savestring ("0"), value, aflags); 1.32 + else 1.33 + bind_array_variable (name, 0, value, aflags); 1.34 + } 1.35 +diff -Naur bash-4.1.orig//builtins/printf.def bash-4.1//builtins/printf.def 1.36 +--- bash-4.1.orig//builtins/printf.def 2009-11-20 20:31:23.000000000 +0000 1.37 ++++ bash-4.1//builtins/printf.def 2010-10-11 22:39:38.381029548 +0100 1.38 +@@ -117,7 +117,7 @@ 1.39 + else if (have_fieldwidth) \ 1.40 + nw = vflag ? vbprintf (f, fieldwidth, func) : printf (f, fieldwidth, func); \ 1.41 + else if (have_precision) \ 1.42 +- nw = vflag ? vbprintf (f, precision, func) : printf (f, fieldwidth, func); \ 1.43 ++ nw = vflag ? vbprintf (f, precision, func) : printf (f, precision, func); \ 1.44 + else \ 1.45 + nw = vflag ? vbprintf (f, func) : printf (f, func); \ 1.46 + tw += nw; \ 1.47 +@@ -172,7 +172,7 @@ 1.48 + #endif 1.49 + 1.50 + #if !HAVE_VSNPRINTF 1.51 +-extern int vsnprintf __P((char *, size_t, const char *, ...)) __attribute__((__format__ (printf, 3, 4))); 1.52 ++extern int vsnprintf __P((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0))); 1.53 + #endif 1.54 + 1.55 + static void printf_erange __P((char *)); 1.56 +diff -Naur bash-4.1.orig//builtins/read.def bash-4.1//builtins/read.def 1.57 +--- bash-4.1.orig//builtins/read.def 2009-10-08 16:35:46.000000000 +0100 1.58 ++++ bash-4.1//builtins/read.def 2010-10-11 22:39:38.321029469 +0100 1.59 +@@ -615,14 +615,15 @@ 1.60 + if (unbuffered_read == 0) 1.61 + zsyncfd (fd); 1.62 + 1.63 +- interrupt_immediately--; 1.64 +- terminate_immediately--; 1.65 + discard_unwind_frame ("read_builtin"); 1.66 + 1.67 + retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS; 1.68 + 1.69 + assign_vars: 1.70 + 1.71 ++ interrupt_immediately--; 1.72 ++ terminate_immediately--; 1.73 ++ 1.74 + #if defined (ARRAY_VARS) 1.75 + /* If -a was given, take the string read, break it into a list of words, 1.76 + an assign them to `arrayname' in turn. */ 1.77 +diff -Naur bash-4.1.orig//lib/readline/complete.c bash-4.1//lib/readline/complete.c 1.78 +--- bash-4.1.orig//lib/readline/complete.c 2009-11-29 23:39:30.000000000 +0000 1.79 ++++ bash-4.1//lib/readline/complete.c 2010-10-11 22:39:38.189029310 +0100 1.80 +@@ -2138,7 +2138,7 @@ 1.81 + All other entries except "." and ".." match. */ 1.82 + if (filename_len == 0) 1.83 + { 1.84 +- if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name)) 1.85 ++ if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn)) 1.86 + continue; 1.87 + 1.88 + if (convfn[0] != '.' || 1.89 +@@ -2219,7 +2219,7 @@ 1.90 + temp[dirlen++] = '/'; 1.91 + } 1.92 + 1.93 +- strcpy (temp + dirlen, entry->d_name); 1.94 ++ strcpy (temp + dirlen, convfn); 1.95 + } 1.96 + else 1.97 + temp = savestring (convfn); 1.98 +diff -Naur bash-4.1.orig//patchlevel.h bash-4.1//patchlevel.h 1.99 +--- bash-4.1.orig//patchlevel.h 2009-10-01 21:39:22.000000000 +0100 1.100 ++++ bash-4.1//patchlevel.h 2010-10-11 22:39:38.433029614 +0100 1.101 +@@ -25,6 +25,6 @@ 1.102 + regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh 1.103 + looks for to find the patch level (for the sccs version string). */ 1.104 + 1.105 +-#define PATCHLEVEL 0 1.106 ++#define PATCHLEVEL 9 1.107 + 1.108 + #endif /* _PATCHLEVEL_H_ */ 1.109 +diff -Naur bash-4.1.orig//print_cmd.c bash-4.1//print_cmd.c 1.110 +--- bash-4.1.orig//print_cmd.c 2009-09-16 20:32:26.000000000 +0100 1.111 ++++ bash-4.1//print_cmd.c 2010-10-11 22:39:38.357029519 +0100 1.112 +@@ -113,6 +113,12 @@ 1.113 + 1.114 + #define CHECK_XTRACE_FP xtrace_fp = (xtrace_fp ? xtrace_fp : stderr) 1.115 + 1.116 ++#define PRINT_DEFERRED_HEREDOCS(x) \ 1.117 ++ do { \ 1.118 ++ if (deferred_heredocs) \ 1.119 ++ print_deferred_heredocs (x); \ 1.120 ++ } while (0) 1.121 ++ 1.122 + /* Non-zero means the stuff being printed is inside of a function def. */ 1.123 + static int inside_function_def; 1.124 + static int skip_this_indent; 1.125 +@@ -560,13 +566,15 @@ 1.126 + FOR_COM *for_command; 1.127 + { 1.128 + print_for_command_head (for_command); 1.129 +- 1.130 + cprintf (";"); 1.131 + newline ("do\n"); 1.132 ++ 1.133 + indentation += indentation_amount; 1.134 + make_command_string_internal (for_command->action); 1.135 ++ PRINT_DEFERRED_HEREDOCS (""); 1.136 + semicolon (); 1.137 + indentation -= indentation_amount; 1.138 ++ 1.139 + newline ("done"); 1.140 + } 1.141 + 1.142 +diff -Naur bash-4.1.orig//sig.c bash-4.1//sig.c 1.143 +--- bash-4.1.orig//sig.c 2009-08-14 21:31:52.000000000 +0100 1.144 ++++ bash-4.1//sig.c 2010-10-11 22:39:38.421029599 +0100 1.145 +@@ -655,6 +655,9 @@ 1.146 + act.sa_flags |= SA_INTERRUPT; /* XXX */ 1.147 + else 1.148 + act.sa_flags |= SA_RESTART; /* XXX */ 1.149 ++#else 1.150 ++ if (sig == SIGCHLD) 1.151 ++ act.sa_flags |= SA_RESTART; 1.152 + #endif 1.153 + sigemptyset (&act.sa_mask); 1.154 + sigemptyset (&oact.sa_mask); 1.155 +diff -Naur bash-4.1.orig//variables.c bash-4.1//variables.c 1.156 +--- bash-4.1.orig//variables.c 2009-11-03 19:13:58.000000000 +0000 1.157 ++++ bash-4.1//variables.c 2010-10-11 22:39:38.281029411 +0100 1.158 +@@ -3808,6 +3808,11 @@ 1.159 + 1.160 + if (tempvar_p (var) && (posixly_correct || (var->attributes & att_propagate))) 1.161 + { 1.162 ++ /* Make sure we have a hash table to store the variable in while it is 1.163 ++ being propagated down to the global variables table. Create one if 1.164 ++ we have to */ 1.165 ++ if ((vc_isfuncenv (shell_variables) || vc_istempenv (shell_variables)) && shell_variables->table == 0) 1.166 ++ shell_variables->table = hash_create (0); 1.167 + /* XXX - should we set v->context here? */ 1.168 + v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0); 1.169 + if (shell_variables == global_variables)
2.1 --- a/bash/stuff/bash32-025.patch Sun Jan 09 14:07:48 2011 +0100 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,79 +0,0 @@ 2.4 - BASH PATCH REPORT 2.5 - ================= 2.6 - 2.7 -Bash-Release: 3.2 2.8 -Patch-ID: bash32-025 2.9 - 2.10 -Bug-Reported-by: Tom Bjorkholm <tom.bjorkholm@ericsson.com> 2.11 -Bug-Reference-ID: <AEA1A32F001C6B4F98614B5B80D7647D01C075E9@esealmw115.eemea.ericsson.se> 2.12 -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-04/msg00004.html 2.13 - 2.14 -Bug-Description: 2.15 - 2.16 -An off-by-one error in readline's input buffering caused readline to drop 2.17 -each 511th character of buffered input (e.g., when pasting a large amount 2.18 -of data into a terminal window). 2.19 - 2.20 -Patch: 2.21 - 2.22 -*** ../bash-3.2-patched/lib/readline/input.c Wed Aug 16 15:15:16 2006 2.23 ---- lib/readline/input.c Tue Jul 17 09:24:21 2007 2.24 -*************** 2.25 -*** 134,139 **** 2.26 - 2.27 - *key = ibuffer[pop_index++]; 2.28 -! 2.29 - if (pop_index >= ibuffer_len) 2.30 - pop_index = 0; 2.31 - 2.32 ---- 134,142 ---- 2.33 - 2.34 - *key = ibuffer[pop_index++]; 2.35 -! #if 0 2.36 - if (pop_index >= ibuffer_len) 2.37 -+ #else 2.38 -+ if (pop_index > ibuffer_len) 2.39 -+ #endif 2.40 - pop_index = 0; 2.41 - 2.42 -*************** 2.43 -*** 251,255 **** 2.44 - { 2.45 - k = (*rl_getc_function) (rl_instream); 2.46 -! rl_stuff_char (k); 2.47 - if (k == NEWLINE || k == RETURN) 2.48 - break; 2.49 ---- 254,259 ---- 2.50 - { 2.51 - k = (*rl_getc_function) (rl_instream); 2.52 -! if (rl_stuff_char (k) == 0) 2.53 -! break; /* some problem; no more room */ 2.54 - if (k == NEWLINE || k == RETURN) 2.55 - break; 2.56 -*************** 2.57 -*** 374,378 **** 2.58 ---- 378,386 ---- 2.59 - } 2.60 - ibuffer[push_index++] = key; 2.61 -+ #if 0 2.62 - if (push_index >= ibuffer_len) 2.63 -+ #else 2.64 -+ if (push_index > ibuffer_len) 2.65 -+ #endif 2.66 - push_index = 0; 2.67 - 2.68 -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 2.69 ---- patchlevel.h Mon Oct 16 14:22:54 2006 2.70 -*************** 2.71 -*** 26,30 **** 2.72 - looks for to find the patch level (for the sccs version string). */ 2.73 - 2.74 -! #define PATCHLEVEL 24 2.75 - 2.76 - #endif /* _PATCHLEVEL_H_ */ 2.77 ---- 26,30 ---- 2.78 - looks for to find the patch level (for the sccs version string). */ 2.79 - 2.80 -! #define PATCHLEVEL 25 2.81 - 2.82 - #endif /* _PATCHLEVEL_H_ */