wok-stable annotate bash/stuff/bash-4.1-fixes-3.patch @ rev 7898

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