source: patches/bash-4.1-branch_update-1.patch @ 7c59b60

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 7c59b60 was e9b21a8, checked in by Joe Ciccone <jciccone@…>, 14 years ago

Updated Bash to 4.1p7.

  • Property mode set to 100644
File size: 5.0 KB
RevLine 
[e9b21a8]1Submitted By: Joe Ciccone <jciccone@gmail.com>
2Date: 07-25-2010
3Initial Package Version: 4.1
4Origin: Upstream
5Upstream Status: From Upstream
6Description: Contains all upstream patches up to 4.1-007
7
8diff -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
10+++ bash-4.1/bashline.c 2010-07-25 22:04:42.669952245 -0400
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        {
20diff -Naur bash-4.1.orig//builtins/printf.def bash-4.1/builtins/printf.def
21--- bash-4.1.orig//builtins/printf.def  2009-11-20 15:31:23.000000000 -0500
22+++ bash-4.1/builtins/printf.def        2010-07-25 22:04:42.685951678 -0400
23@@ -117,7 +117,7 @@
24     else if (have_fieldwidth) \
25       nw = vflag ? vbprintf (f, fieldwidth, func) : printf (f, fieldwidth, func); \
26     else if (have_precision) \
27-      nw = vflag ? vbprintf (f, precision, func) : printf (f, fieldwidth, func); \
28+      nw = vflag ? vbprintf (f, precision, func) : printf (f, precision, func); \
29     else \
30       nw = vflag ? vbprintf (f, func) : printf (f, func); \
31     tw += nw; \
32@@ -172,7 +172,7 @@
33 #endif
34 
35 #if !HAVE_VSNPRINTF
36-extern int vsnprintf __P((char *, size_t, const char *, ...)) __attribute__((__format__ (printf, 3, 4)));
37+extern int vsnprintf __P((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0)));
38 #endif
39 
40 static void printf_erange __P((char *));
41diff -Naur bash-4.1.orig//builtins/read.def bash-4.1/builtins/read.def
42--- bash-4.1.orig//builtins/read.def    2009-10-08 11:35:46.000000000 -0400
43+++ bash-4.1/builtins/read.def  2010-07-25 22:04:42.673839182 -0400
44@@ -615,14 +615,15 @@
45   if (unbuffered_read == 0)
46     zsyncfd (fd);
47 
48-  interrupt_immediately--;
49-  terminate_immediately--;
50   discard_unwind_frame ("read_builtin");
51 
52   retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS;
53 
54 assign_vars:
55 
56+  interrupt_immediately--;
57+  terminate_immediately--;
58+
59 #if defined (ARRAY_VARS)
60   /* If -a was given, take the string read, break it into a list of words,
61      an assign them to `arrayname' in turn. */
62diff -Naur bash-4.1.orig//lib/readline/complete.c bash-4.1/lib/readline/complete.c
63--- bash-4.1.orig//lib/readline/complete.c      2009-11-29 18:39:30.000000000 -0500
64+++ bash-4.1/lib/readline/complete.c    2010-07-25 22:04:42.669952245 -0400
65@@ -2138,7 +2138,7 @@
66         All other entries except "." and ".." match. */
67       if (filename_len == 0)
68        {
69-         if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name))
70+         if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn))
71            continue;
72 
73          if (convfn[0] != '.' ||
74@@ -2219,7 +2219,7 @@
75                temp[dirlen++] = '/';
76            }
77 
78-         strcpy (temp + dirlen, entry->d_name);
79+         strcpy (temp + dirlen, convfn);
80        }
81       else
82        temp = savestring (convfn);
83diff -Naur bash-4.1.orig//patchlevel.h bash-4.1/patchlevel.h
84--- bash-4.1.orig//patchlevel.h 2009-10-01 16:39:22.000000000 -0400
85+++ bash-4.1/patchlevel.h       2010-07-25 22:04:42.689952400 -0400
86@@ -25,6 +25,6 @@
87    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
88    looks for to find the patch level (for the sccs version string). */
89 
90-#define PATCHLEVEL 0
91+#define PATCHLEVEL 7
92 
93 #endif /* _PATCHLEVEL_H_ */
94diff -Naur bash-4.1.orig//print_cmd.c bash-4.1/print_cmd.c
95--- bash-4.1.orig//print_cmd.c  2009-09-16 15:32:26.000000000 -0400
96+++ bash-4.1/print_cmd.c        2010-07-25 22:04:42.677952146 -0400
97@@ -113,6 +113,12 @@
98 
99 #define CHECK_XTRACE_FP        xtrace_fp = (xtrace_fp ? xtrace_fp : stderr)
100 
101+#define PRINT_DEFERRED_HEREDOCS(x) \
102+  do { \
103+    if (deferred_heredocs) \
104+      print_deferred_heredocs (x); \
105+  } while (0)
106+
107 /* Non-zero means the stuff being printed is inside of a function def. */
108 static int inside_function_def;
109 static int skip_this_indent;
110@@ -560,13 +566,15 @@
111      FOR_COM *for_command;
112 {
113   print_for_command_head (for_command);
114-
115   cprintf (";");
116   newline ("do\n");
117+
118   indentation += indentation_amount;
119   make_command_string_internal (for_command->action);
120+  PRINT_DEFERRED_HEREDOCS ("");
121   semicolon ();
122   indentation -= indentation_amount;
123+
124   newline ("done");
125 }
126 
127diff -Naur bash-4.1.orig//variables.c bash-4.1/variables.c
128--- bash-4.1.orig//variables.c  2009-11-03 14:13:58.000000000 -0500
129+++ bash-4.1/variables.c        2010-07-25 22:04:42.673839182 -0400
130@@ -3808,6 +3808,11 @@
131 
132   if (tempvar_p (var) && (posixly_correct || (var->attributes & att_propagate)))
133     {
134+      /* Make sure we have a hash table to store the variable in while it is
135+        being propagated down to the global variables table.  Create one if
136+        we have to */
137+      if ((vc_isfuncenv (shell_variables) || vc_istempenv (shell_variables)) && shell_variables->table == 0)
138+       shell_variables->table = hash_create (0);
139       /* XXX - should we set v->context here? */
140       v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0);
141       if (shell_variables == global_variables)
Note: See TracBrowser for help on using the repository browser.