| [e9b21a8] | 1 | Submitted By: Joe Ciccone <jciccone@gmail.com> | 
|---|
| [96f80a4] | 2 | Date: 01-08-2011 | 
|---|
| [e9b21a8] | 3 | Initial Package Version: 4.1 | 
|---|
|  | 4 | Origin: Upstream | 
|---|
|  | 5 | Upstream Status: From Upstream | 
|---|
| [96f80a4] | 6 | Description: Contains all upstream patches up to 4.1-009 | 
|---|
| [e9b21a8] | 7 |  | 
|---|
|  | 8 | diff -Naur bash-4.1.orig//bashline.c bash-4.1/bashline.c | 
|---|
|  | 9 | --- bash-4.1.orig//bashline.c   2009-10-24 14:10:19.000000000 -0400 | 
|---|
| [96f80a4] | 10 | +++ bash-4.1/bashline.c 2011-01-08 15:59:31.934906851 -0500 | 
|---|
| [e9b21a8] | 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 | { | 
|---|
| [96f80a4] | 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-25 19:42:00.000000000 -0500 | 
|---|
|  | 22 | +++ bash-4.1/builtins/declare.def       2011-01-08 15:59:58.930671218 -0500 | 
|---|
|  | 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 | } | 
|---|
| [e9b21a8] | 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 15:31:23.000000000 -0500 | 
|---|
| [96f80a4] | 34 | +++ bash-4.1/builtins/printf.def        2011-01-08 15:59:31.934906851 -0500 | 
|---|
| [e9b21a8] | 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 | 
|---|
|  | 46 |  | 
|---|
|  | 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 | 
|---|
|  | 51 |  | 
|---|
|  | 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 11:35:46.000000000 -0400 | 
|---|
| [96f80a4] | 55 | +++ bash-4.1/builtins/read.def  2011-01-08 15:59:31.934906851 -0500 | 
|---|
| [e9b21a8] | 56 | @@ -615,14 +615,15 @@ | 
|---|
|  | 57 | if (unbuffered_read == 0) | 
|---|
|  | 58 | zsyncfd (fd); | 
|---|
|  | 59 |  | 
|---|
|  | 60 | -  interrupt_immediately--; | 
|---|
|  | 61 | -  terminate_immediately--; | 
|---|
|  | 62 | discard_unwind_frame ("read_builtin"); | 
|---|
|  | 63 |  | 
|---|
|  | 64 | retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS; | 
|---|
|  | 65 |  | 
|---|
|  | 66 | assign_vars: | 
|---|
|  | 67 |  | 
|---|
|  | 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 18:39:30.000000000 -0500 | 
|---|
| [96f80a4] | 76 | +++ bash-4.1/lib/readline/complete.c    2011-01-08 15:59:31.934906851 -0500 | 
|---|
| [e9b21a8] | 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; | 
|---|
|  | 84 |  | 
|---|
|  | 85 | if (convfn[0] != '.' || | 
|---|
|  | 86 | @@ -2219,7 +2219,7 @@ | 
|---|
|  | 87 | temp[dirlen++] = '/'; | 
|---|
|  | 88 | } | 
|---|
|  | 89 |  | 
|---|
|  | 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 16:39:22.000000000 -0400 | 
|---|
| [96f80a4] | 97 | +++ bash-4.1/patchlevel.h       2011-01-08 16:00:00.782985562 -0500 | 
|---|
| [e9b21a8] | 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). */ | 
|---|
|  | 101 |  | 
|---|
|  | 102 | -#define PATCHLEVEL 0 | 
|---|
| [96f80a4] | 103 | +#define PATCHLEVEL 9 | 
|---|
| [e9b21a8] | 104 |  | 
|---|
|  | 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 15:32:26.000000000 -0400 | 
|---|
| [96f80a4] | 108 | +++ bash-4.1/print_cmd.c        2011-01-08 15:59:31.938922841 -0500 | 
|---|
| [e9b21a8] | 109 | @@ -113,6 +113,12 @@ | 
|---|
|  | 110 |  | 
|---|
|  | 111 | #define CHECK_XTRACE_FP        xtrace_fp = (xtrace_fp ? xtrace_fp : stderr) | 
|---|
|  | 112 |  | 
|---|
|  | 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 | } | 
|---|
|  | 138 |  | 
|---|
| [96f80a4] | 139 | diff -Naur bash-4.1.orig//sig.c bash-4.1/sig.c | 
|---|
|  | 140 | --- bash-4.1.orig//sig.c        2009-08-14 16:31:52.000000000 -0400 | 
|---|
|  | 141 | +++ bash-4.1/sig.c      2011-01-08 16:00:00.782985562 -0500 | 
|---|
|  | 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); | 
|---|
| [e9b21a8] | 152 | diff -Naur bash-4.1.orig//variables.c bash-4.1/variables.c | 
|---|
|  | 153 | --- bash-4.1.orig//variables.c  2009-11-03 14:13:58.000000000 -0500 | 
|---|
| [96f80a4] | 154 | +++ bash-4.1/variables.c        2011-01-08 15:59:31.938922841 -0500 | 
|---|
| [e9b21a8] | 155 | @@ -3808,6 +3808,11 @@ | 
|---|
|  | 156 |  | 
|---|
|  | 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) | 
|---|