aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shells/bash/Makefile2
-rw-r--r--shells/bash/files/patch-jobs.c21
-rw-r--r--shells/bash/files/patch-subst.c16
-rw-r--r--shells/bash/files/patch-variables.c19
4 files changed, 57 insertions, 1 deletions
diff --git a/shells/bash/Makefile b/shells/bash/Makefile
index 567a2d56422..f3fe985c999 100644
--- a/shells/bash/Makefile
+++ b/shells/bash/Makefile
@@ -7,7 +7,7 @@
PORTNAME= bash
PORTVERSION= 3.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= shells
MASTER_SITES= ${MASTER_SITE_GNU} \
ftp://ftp.cwru.edu/pub/%SUBDIR%/
diff --git a/shells/bash/files/patch-jobs.c b/shells/bash/files/patch-jobs.c
new file mode 100644
index 00000000000..4e5db16b983
--- /dev/null
+++ b/shells/bash/files/patch-jobs.c
@@ -0,0 +1,21 @@
+#
+# Fix pipefail option
+#
+# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00215.html
+#
+--- jobs.c.orig Fri Apr 23 21:28:25 2004
++++ jobs.c Wed Aug 18 14:32:19 2004
+@@ -1778,8 +1778,11 @@
+ if (pipefail_opt)
+ {
+ fail = 0;
+- for (p = jobs[job]->pipe; p->next != jobs[job]->pipe; p = p->next)
+- if (p->status != EXECUTION_SUCCESS) fail = p->status;
++ p = jobs[job]->pipe;
++ do {
++ if (p->status != EXECUTION_SUCCESS) fail = p->status;
++ p=p->next;
++ } while(p!=jobs[job]->pipe);
+ return fail;
+ }
+
diff --git a/shells/bash/files/patch-subst.c b/shells/bash/files/patch-subst.c
new file mode 100644
index 00000000000..d7687e24301
--- /dev/null
+++ b/shells/bash/files/patch-subst.c
@@ -0,0 +1,16 @@
+#
+# Fix broken array expansion
+#
+# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00192.html
+#
+--- subst.c.orig Sun Jul 4 13:56:13 2004
++++ subst.c Thu Aug 12 13:36:17 2004
+@@ -4891,7 +4891,7 @@
+ if (*e1p < 0) /* negative offsets count from end */
+ *e1p += len;
+
+- if (*e1p >= len || *e1p < 0)
++ if (*e1p > len || *e1p < 0)
+ return (-1);
+
+ #if defined (ARRAY_VARS)
diff --git a/shells/bash/files/patch-variables.c b/shells/bash/files/patch-variables.c
new file mode 100644
index 00000000000..ac4bb07c3e3
--- /dev/null
+++ b/shells/bash/files/patch-variables.c
@@ -0,0 +1,19 @@
+#
+# Fix segmentation fault in unset typeset array variable
+#
+# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00190.html
+#
+--- variables.c.orig Sun Jul 4 13:57:26 2004
++++ variables.c Wed Aug 4 15:28:04 2004
+@@ -1599,7 +1599,10 @@
+ /* local foo; local foo; is a no-op. */
+ old_var = find_variable (name);
+ if (old_var && local_p (old_var) && old_var->context == variable_context)
+- return (old_var);
++ {
++ VUNSETATTR (old_var, att_invisible);
++ return (old_var);
++ }
+
+ was_tmpvar = old_var && tempvar_p (old_var);
+ if (was_tmpvar)