aboutsummaryrefslogtreecommitdiffstats
path: root/bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash')
-rw-r--r--bash/bash-2.05b/bash205b-001.patch15
-rw-r--r--bash/bash-2.05b/bash205b-002.patch10
-rw-r--r--bash/bash-2.05b/bash205b-003.patch39
-rw-r--r--bash/bash-2.05b/bash205b-004.patch22
-rw-r--r--bash/bash-2.05b/bash205b-005.patch68
-rw-r--r--bash/bash-2.05b/bash205b-006.patch90
-rw-r--r--bash/bash-2.05b/bash205b-007.patch31
-rw-r--r--bash/bash-2.05b/bashbug-editor.patch10
-rw-r--r--bash/bash-2.05b/builtins-shift.patch11
-rw-r--r--bash/bash-2.05b/deb-bash-config.patch45
-rw-r--r--bash/bash-2.05b/deb-examples.patch9
-rw-r--r--bash/bash-2.05b/execute-cmd.patch102
-rw-r--r--bash/bash-2.05b/gcc34.patch16
-rw-r--r--bash/bash-2.05b/mailcheck.patch82
-rw-r--r--bash/bash-2.05b/man-arithmetic.patch12
-rw-r--r--bash/bash-2.05b/man-bashrc.patch62
-rw-r--r--bash/bash-2.05b/man-fignore.patch13
-rw-r--r--bash/bash-2.05b/privmode.patch11
-rw-r--r--bash/bash-2.05b/rbash-login-shell.patch20
-rw-r--r--bash/bash-2.05b/rbash-manpage.patch10
-rw-r--r--bash/bash-2.05b/report-155436.patch11
-rw-r--r--bash/bash-2.05b/rl-8bit-init.patch12
-rw-r--r--bash/bash-2.05b/rl-del-backspace-policy.patch28
-rw-r--r--bash/bash-2.05b/rl-examples.patch24
-rw-r--r--bash/bash-2.05b/rl-inputrc.patch70
-rw-r--r--bash/bash-2.05b/rl-slow-multibyte.patch49
-rw-r--r--bash/bash-2.05b/s390-build.patch46
-rw-r--r--bash/bash-2.05b/suspend-segfault.patch11
-rw-r--r--bash/bash-2.05b/various.patch10
29 files changed, 939 insertions, 0 deletions
diff --git a/bash/bash-2.05b/bash205b-001.patch b/bash/bash-2.05b/bash205b-001.patch
index e69de29bb2..2497130f9e 100644
--- a/bash/bash-2.05b/bash205b-001.patch
+++ b/bash/bash-2.05b/bash205b-001.patch
@@ -0,0 +1,15 @@
+*** ../bash-2.05b/lib/readline/bind.c Thu Jan 24 11:15:52 2002
+--- lib/readline/bind.c Wed Jul 31 09:11:18 2002
+***************
+*** 312,316 ****
+ and the function bound to `a' to be executed when the user
+ types `abx', leaving `bx' in the input queue. */
+! if (k.function /* && k.type == ISFUNC */)
+ {
+ map[ANYOTHERKEY] = k;
+--- 312,316 ----
+ and the function bound to `a' to be executed when the user
+ types `abx', leaving `bx' in the input queue. */
+! if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR))
+ {
+ map[ANYOTHERKEY] = k;
diff --git a/bash/bash-2.05b/bash205b-002.patch b/bash/bash-2.05b/bash205b-002.patch
index e69de29bb2..42f31715e6 100644
--- a/bash/bash-2.05b/bash205b-002.patch
+++ b/bash/bash-2.05b/bash205b-002.patch
@@ -0,0 +1,10 @@
+*** ../bash-2.05b/lib/readline/readline.c Wed Mar 13 17:10:46 2002
+--- lib/readline/readline.c Tue Jul 30 17:46:44 2002
+***************
+*** 685,688 ****
+--- 685,689 ----
+ #if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
++ key != ANYOTHERKEY &&
+ _rl_vi_textmod_command (key))
+ _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
diff --git a/bash/bash-2.05b/bash205b-003.patch b/bash/bash-2.05b/bash205b-003.patch
index e69de29bb2..020248b873 100644
--- a/bash/bash-2.05b/bash205b-003.patch
+++ b/bash/bash-2.05b/bash205b-003.patch
@@ -0,0 +1,39 @@
+*** ../bash-2.05b/bashline.c Tue May 7 15:52:42 2002
+--- bashline.c Sat Aug 3 11:40:16 2002
+***************
+*** 1045,1049 ****
+--- 1045,1052 ----
+ else
+ {
++ #define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && *(x) != '~' && test_for_directory (x))
++
+ matches = rl_completion_matches (text, command_word_completion_function);
++
+ /* If we are attempting command completion and nothing matches, we
+ do not want readline to perform filename completion for us. We
+***************
+*** 1053,1057 ****
+ if (matches == (char **)NULL)
+ rl_ignore_some_completions_function = bash_ignore_filenames;
+! else if (matches[1] == 0 && *matches[0] != '/')
+ /* Turn off rl_filename_completion_desired so readline doesn't
+ append a slash if there is a directory with the same name
+--- 1056,1060 ----
+ if (matches == (char **)NULL)
+ rl_ignore_some_completions_function = bash_ignore_filenames;
+! else if (matches[1] == 0 && CMD_IS_DIR(matches[0]))
+ /* Turn off rl_filename_completion_desired so readline doesn't
+ append a slash if there is a directory with the same name
+***************
+*** 1062,1066 ****
+ conflict. */
+ rl_filename_completion_desired = 0;
+! else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && *matches[0] != '/')
+ /* There are multiple instances of the same match (duplicate
+ completions haven't yet been removed). In this case, all of
+--- 1065,1069 ----
+ conflict. */
+ rl_filename_completion_desired = 0;
+! else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && CMD_IS_DIR (matches[0]))
+ /* There are multiple instances of the same match (duplicate
+ completions haven't yet been removed). In this case, all of
diff --git a/bash/bash-2.05b/bash205b-004.patch b/bash/bash-2.05b/bash205b-004.patch
index e69de29bb2..10a8713446 100644
--- a/bash/bash-2.05b/bash205b-004.patch
+++ b/bash/bash-2.05b/bash205b-004.patch
@@ -0,0 +1,22 @@
+*** ../bash-2.05b/subst.c Mon Jun 24 07:59:45 2002
+--- subst.c Sat Aug 17 17:28:46 2002
+***************
+*** 1639,1647 ****
+ /* This performs word splitting and quoted null character removal on
+ STRING. */
+! #if 0
+! #define issep(c) ((separators)[1] ? (member ((c), separators)) : (c) == (separators)[0])
+! #else
+! #define issep(c) ((separators)[1] ? isifs(c) : (c) == (separators)[0])
+! #endif
+
+ WORD_LIST *
+--- 1639,1646 ----
+ /* This performs word splitting and quoted null character removal on
+ STRING. */
+! #define issep(c) \
+! (((separators)[0]) ? ((separators)[1] ? isifs(c) \
+! : (c) == (separators)[0]) \
+! : 0)
+
+ WORD_LIST *
diff --git a/bash/bash-2.05b/bash205b-005.patch b/bash/bash-2.05b/bash205b-005.patch
index e69de29bb2..366477744b 100644
--- a/bash/bash-2.05b/bash205b-005.patch
+++ b/bash/bash-2.05b/bash205b-005.patch
@@ -0,0 +1,68 @@
+*** ../bash-2.05b/lib/readline/mbutil.c Tue Jun 4 11:54:29 2002
+--- lib/readline/mbutil.c Mon Aug 5 11:20:39 2002
+***************
+*** 206,210 ****
+ {
+ /* shorted to compose multibyte char */
+! memset (ps, 0, sizeof(mbstate_t));
+ return -2;
+ }
+--- 206,211 ----
+ {
+ /* shorted to compose multibyte char */
+! if (ps)
+! memset (ps, 0, sizeof(mbstate_t));
+ return -2;
+ }
+***************
+*** 213,217 ****
+ /* invalid to compose multibyte char */
+ /* initialize the conversion state */
+! memset (ps, 0, sizeof(mbstate_t));
+ return -1;
+ }
+--- 214,219 ----
+ /* invalid to compose multibyte char */
+ /* initialize the conversion state */
+! if (ps)
+! memset (ps, 0, sizeof(mbstate_t));
+ return -1;
+ }
+***************
+*** 226,232 ****
+ int
+ _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
+! char *buf1, *buf2;
+! mbstate_t *ps1, *ps2;
+! int pos1, pos2;
+ {
+ int i, w1, w2;
+--- 228,237 ----
+ int
+ _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
+! char *buf1;
+! int pos1;
+! mbstate_t *ps1;
+! char *buf2;
+! int pos2;
+! mbstate_t *ps2;
+ {
+ int i, w1, w2;
+***************
+*** 277,282 ****
+ /* clear the state of the byte sequence, because
+ in this case effect of mbstate is undefined */
+! memset (ps, 0, sizeof (mbstate_t));
+ }
+ else
+ pos += tmp;
+--- 282,290 ----
+ /* clear the state of the byte sequence, because
+ in this case effect of mbstate is undefined */
+! if (ps)
+! memset (ps, 0, sizeof (mbstate_t));
+ }
++ else if (tmp == 0)
++ pos++;
+ else
+ pos += tmp;
diff --git a/bash/bash-2.05b/bash205b-006.patch b/bash/bash-2.05b/bash205b-006.patch
index e69de29bb2..2642f5173f 100644
--- a/bash/bash-2.05b/bash205b-006.patch
+++ b/bash/bash-2.05b/bash205b-006.patch
@@ -0,0 +1,90 @@
+*** ../bash-2.05b/lib/readline/display.c Tue Jun 4 10:54:47 2002
+--- lib/readline/display.c Fri Sep 13 16:22:57 2002
+***************
+*** 71,75 ****
+
+ #if defined (HANDLE_MULTIBYTE)
+! static int _rl_col_width PARAMS((char *, int, int));
+ static int *_rl_wrapped_line;
+ #else
+--- 71,75 ----
+
+ #if defined (HANDLE_MULTIBYTE)
+! static int _rl_col_width PARAMS((const char *, int, int));
+ static int *_rl_wrapped_line;
+ #else
+***************
+*** 1349,1355 ****
+ _rl_output_some_chars (nfd + lendiff, temp - lendiff);
+ #if 0
+- _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff) - col_lendiff;
+- #else
+ _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
+ #endif
+ }
+--- 1349,1355 ----
+ _rl_output_some_chars (nfd + lendiff, temp - lendiff);
+ #if 0
+ _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
++ #else
++ _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff);
+ #endif
+ }
+***************
+*** 1511,1516 ****
+ /* If we have multibyte characters, NEW is indexed by the buffer point in
+ a multibyte string, but _rl_last_c_pos is the display position. In
+! this case, NEW's display position is not obvious. */
+! if ((MB_CUR_MAX == 1 || rl_byte_oriented ) && _rl_last_c_pos == new) return;
+ #else
+ if (_rl_last_c_pos == new) return;
+--- 1511,1523 ----
+ /* If we have multibyte characters, NEW is indexed by the buffer point in
+ a multibyte string, but _rl_last_c_pos is the display position. In
+! this case, NEW's display position is not obvious and must be
+! calculated. */
+! if (MB_CUR_MAX == 1 || rl_byte_oriented)
+! {
+! if (_rl_last_c_pos == new)
+! return;
+! }
+! else if (_rl_last_c_pos == _rl_col_width (data, 0, new))
+! return;
+ #else
+ if (_rl_last_c_pos == new) return;
+***************
+*** 1595,1603 ****
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+! {
+! tputs (_rl_term_cr, 1, _rl_output_character_function);
+! for (i = 0; i < new; i++)
+! putc (data[i], rl_outstream);
+! }
+ else
+ _rl_backspace (_rl_last_c_pos - new);
+--- 1602,1606 ----
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+! _rl_backspace (_rl_last_c_pos - _rl_col_width (data, 0, new));
+ else
+ _rl_backspace (_rl_last_c_pos - new);
+***************
+*** 2118,2122 ****
+ static int
+ _rl_col_width (str, start, end)
+! char *str;
+ int start, end;
+ {
+--- 2121,2125 ----
+ static int
+ _rl_col_width (str, start, end)
+! const char *str;
+ int start, end;
+ {
+***************
+*** 2194,2196 ****
+ }
+ #endif /* HANDLE_MULTIBYTE */
+-
+--- 2197,2198 ----
diff --git a/bash/bash-2.05b/bash205b-007.patch b/bash/bash-2.05b/bash205b-007.patch
index e69de29bb2..c23df47e05 100644
--- a/bash/bash-2.05b/bash205b-007.patch
+++ b/bash/bash-2.05b/bash205b-007.patch
@@ -0,0 +1,31 @@
+*** ../bash-2.05b/lib/readline/vi_mode.c Thu May 23 13:27:58 2002
+--- lib/readline/vi_mode.c Tue Feb 4 15:11:07 2003
+***************
+*** 681,685 ****
+ {
+ wchar_t wc;
+! char mb[MB_LEN_MAX];
+ mbstate_t ps;
+
+--- 681,686 ----
+ {
+ wchar_t wc;
+! char mb[MB_LEN_MAX+1];
+! int mblen;
+ mbstate_t ps;
+
+***************
+*** 704,708 ****
+ if (wc)
+ {
+! wctomb (mb, wc);
+ rl_begin_undo_group ();
+ rl_delete (1, 0);
+--- 705,711 ----
+ if (wc)
+ {
+! mblen = wctomb (mb, wc);
+! if (mblen >= 0)
+! mb[mblen] = '\0';
+ rl_begin_undo_group ();
+ rl_delete (1, 0);
diff --git a/bash/bash-2.05b/bashbug-editor.patch b/bash/bash-2.05b/bashbug-editor.patch
index e69de29bb2..6a385bdc8e 100644
--- a/bash/bash-2.05b/bashbug-editor.patch
+++ b/bash/bash-2.05b/bashbug-editor.patch
@@ -0,0 +1,10 @@
+--- ./support/bashbug.sh~ Mon Nov 27 17:15:21 2000
++++ ./support/bashbug.sh Tue Feb 6 18:54:48 2001
+@@ -98,6 +98,7 @@
+ esac ;;
+ esac
+
++BUGBASH="${BUGBASH},bash@packages.debian.org"
+ BUGADDR="${1-$BUGBASH}"
+
+ if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
diff --git a/bash/bash-2.05b/builtins-shift.patch b/bash/bash-2.05b/builtins-shift.patch
index e69de29bb2..67d0c51c7a 100644
--- a/bash/bash-2.05b/builtins-shift.patch
+++ b/bash/bash-2.05b/builtins-shift.patch
@@ -0,0 +1,11 @@
+--- builtins/shift.def.orig 2002-10-22 01:05:10.000000000 -0400
++++ builtins/shift.def 2002-10-22 01:05:06.000000000 -0400
+@@ -68,7 +68,7 @@
+ else if (times > number_of_args ())
+ {
+ if (print_shift_error)
+- sh_erange (list->word->word, "shift count");
++ sh_erange (list ? list->word->word : NULL, "shift count");
+ return (EXECUTION_FAILURE);
+ }
+
diff --git a/bash/bash-2.05b/deb-bash-config.patch b/bash/bash-2.05b/deb-bash-config.patch
index e69de29bb2..0bbb365e63 100644
--- a/bash/bash-2.05b/deb-bash-config.patch
+++ b/bash/bash-2.05b/deb-bash-config.patch
@@ -0,0 +1,45 @@
+--- bash-2.05a.orig/config-top.h Wed Oct 24 19:28:49 2001
++++ bash-2.05a/config-top.h Fri Nov 2 11:16:00 2001
+@@ -29,19 +29,19 @@
+
+ /* Define DONT_REPORT_SIGPIPE if you don't want to see `Broken pipe' messages
+ when a job like `cat jobs.c | exit 1' is executed. */
+-/* #define DONT_REPORT_SIGPIPE */
++#define DONT_REPORT_SIGPIPE
+
+ /* The default value of the PATH variable. */
+ #ifndef DEFAULT_PATH_VALUE
+ #define DEFAULT_PATH_VALUE \
+- "/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:."
++ "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+ #endif
+
+ /* The value for PATH when invoking `command -p'. This is only used when
+ the Posix.2 confstr () function, or CS_PATH define are not present. */
+ #ifndef STANDARD_UTILS_PATH
+ #define STANDARD_UTILS_PATH \
+- "/bin:/usr/bin:/usr/ucb:/sbin:/usr/sbin:/etc:/usr/etc"
++ "/bin:/usr/bin:/sbin:/usr/sbin"
+ #endif
+
+ /* Default primary and secondary prompt strings. */
+@@ -49,15 +49,15 @@
+ #define SPROMPT "> "
+
+ /* System-wide .bashrc file for interactive shells. */
+-/* #define SYS_BASHRC "/etc/bash.bashrc" */
++#define SYS_BASHRC "/etc/bash.bashrc"
+
+ /* System-wide .bash_logout for login shells. */
+-/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
++#define SYS_BASH_LOGOUT "/etc/bash.bash_logout"
+
+ /* Define this to make non-interactive shells begun with argv[0][0] == '-'
+ run the startup files when not in posix mode. */
+-/* #define NON_INTERACTIVE_LOGIN_SHELLS */
++#define NON_INTERACTIVE_LOGIN_SHELLS
+
+ /* Define this if you want bash to try to check whether it's being run by
+ sshd and source the .bashrc if so (like the rshd behavior). */
+-/* #define SSH_SOURCE_BASHRC */
++#define SSH_SOURCE_BASHRC
diff --git a/bash/bash-2.05b/deb-examples.patch b/bash/bash-2.05b/deb-examples.patch
index e69de29bb2..336c815bdd 100644
--- a/bash/bash-2.05b/deb-examples.patch
+++ b/bash/bash-2.05b/deb-examples.patch
@@ -0,0 +1,9 @@
+--- ./examples/loadables/README.orig Thu May 7 20:31:34 1998
++++ ./examples/loadables/README Thu Nov 11 20:32:57 1999
+@@ -31,3 +31,6 @@
+ the canonical example. There is no real `builtin writers' programming
+ guide'. The file template.c provides a template to use for creating
+ new loadable builtins.
++
++On Debian GNU/Linux systems, the bash headers are in /usr/include/bash.
++The appropriate options are already set in the example Makefile.
diff --git a/bash/bash-2.05b/execute-cmd.patch b/bash/bash-2.05b/execute-cmd.patch
index e69de29bb2..6c5ce656ee 100644
--- a/bash/bash-2.05b/execute-cmd.patch
+++ b/bash/bash-2.05b/execute-cmd.patch
@@ -0,0 +1,102 @@
+--- src/execute_cmd.c~ 2002-03-18 19:24:22.000000000 +0100
++++ src/execute_cmd.c 2003-05-25 22:08:02.000000000 +0200
+@@ -286,12 +286,18 @@
+ {
+ if (currently_executing_command->type == cm_simple)
+ return currently_executing_command->value.Simple->line;
++#if defined (COND_COMMAND)
+ else if (currently_executing_command->type == cm_cond)
+ return currently_executing_command->value.Cond->line;
++#endif
++#if defined (DPAREN_ARITHMETIC)
+ else if (currently_executing_command->type == cm_arith)
+ return currently_executing_command->value.Arith->line;
++#endif
++#if defined (ARITH_FOR_COMMAND)
+ else if (currently_executing_command->type == cm_arith_for)
+ return currently_executing_command->value.ArithFor->line;
++#endif
+ else
+ return line_number;
+ }
+@@ -801,7 +807,7 @@
+ exec_result = execute_cond_command (command->value.Cond);
+ break;
+ #endif
+-
++
+ case cm_function_def:
+ exec_result = execute_intern_function (command->value.Function_def->name,
+ command->value.Function_def->command);
+@@ -916,7 +922,7 @@
+ characters after the decimal point, the optional `l' means to format
+ using minutes and seconds (MMmNN[.FF]s), like the `times' builtin',
+ and the last character is one of
+-
++
+ R number of seconds of `real' time
+ U number of seconds of `user' time
+ S number of seconds of `system' time
+@@ -2351,7 +2357,7 @@
+ #if 0
+ debug_print_cond_command (cond_command);
+ #endif
+- last_command_exit_value = result = execute_cond_node (cond_command);
++ last_command_exit_value = result = execute_cond_node (cond_command);
+ return (result);
+ }
+ #endif /* COND_COMMAND */
+@@ -2808,7 +2814,7 @@
+ push_scope (VC_BLTNENV, temporary_env);
+ if (subshell == 0)
+ add_unwind_protect (pop_scope, "1");
+- temporary_env = (HASH_TABLE *)NULL;
++ temporary_env = (HASH_TABLE *)NULL;
+ }
+ }
+
+@@ -2881,7 +2887,7 @@
+
+ debug_trap = TRAP_STRING(DEBUG_TRAP);
+ error_trap = TRAP_STRING(ERROR_TRAP);
+-
++
+ /* The order of the unwind protects for debug_trap and error_trap is
+ important here! unwind-protect commands are run in reverse order
+ of registration. If this causes problems, take out the xfree
+@@ -2960,7 +2966,7 @@
+ bitmap = new_fd_bitmap (FD_BITMAP_DEFAULT_SIZE);
+ begin_unwind_frame ("execute-shell-function");
+ add_unwind_protect (dispose_fd_bitmap, (char *)bitmap);
+-
++
+ ret = execute_function (var, words, 0, bitmap, 0, 0);
+
+ dispose_fd_bitmap (bitmap);
+@@ -3115,7 +3121,7 @@
+ if (saved_undo_list)
+ dispose_redirects (saved_undo_list);
+ redirection_undo_list = exec_redirection_undo_list;
+- saved_undo_list = exec_redirection_undo_list = (REDIRECT *)NULL;
++ saved_undo_list = exec_redirection_undo_list = (REDIRECT *)NULL;
+ discard_unwind_frame ("saved_redirects");
+ }
+
+@@ -3363,7 +3369,7 @@
+ /* If there is more text on the line, then it is an argument for the
+ interpreter. */
+
+- if (STRINGCHAR(i))
++ if (STRINGCHAR(i))
+ {
+ for (start = i; STRINGCHAR(i); i++)
+ ;
+@@ -3458,7 +3464,7 @@
+ len = -1; \
+ } \
+ while (0)
+-
++
+ /* Call execve (), handling interpreting shell scripts, and handling
+ exec failures. */
+ int
diff --git a/bash/bash-2.05b/gcc34.patch b/bash/bash-2.05b/gcc34.patch
index e69de29bb2..76fcd55ae0 100644
--- a/bash/bash-2.05b/gcc34.patch
+++ b/bash/bash-2.05b/gcc34.patch
@@ -0,0 +1,16 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- bash-2.05b/lib/malloc/malloc.c~gcc34
++++ bash-2.05b/lib/malloc/malloc.c
+@@ -878,7 +878,7 @@
+ nextf[nunits] = p;
+ busy[nunits] = 0;
+
+-free_return:
++free_return:;
+
+ #ifdef MALLOC_STATS
+ _mstats.nmalloc[nunits]--;
diff --git a/bash/bash-2.05b/mailcheck.patch b/bash/bash-2.05b/mailcheck.patch
index e69de29bb2..66c76ef23f 100644
--- a/bash/bash-2.05b/mailcheck.patch
+++ b/bash/bash-2.05b/mailcheck.patch
@@ -0,0 +1,82 @@
+--- bash-2.05b/mailcheck.c 2002-01-10 14:23:15.000000000 -0500
++++ bash-2.05b.mailcheck/mailcheck.c 2003-07-28 20:58:10.000000000 -0400
+@@ -69,20 +69,40 @@
+
+ static char *parse_mailpath_spec __P((char *));
+
+-/* Returns non-zero if it is time to check mail. */
+-int
+-time_to_check_mail ()
+-{
++intmax_t get_mailcheck(int first_check) {
+ char *temp;
+- time_t now;
+ intmax_t seconds;
++ /* Terrible kluge, but expedient. Purpose is to ensure we don't allow
++ a mail check until after user init files are read. */
++ static int passed_first_check = 0;
++
++ if(first_check)
++ passed_first_check = 1;
++
++ if(!passed_first_check)
++ return -1;
+
+ temp = get_string_value ("MAILCHECK");
+
+ /* Negative number, or non-numbers (such as empty string) cause no
+ checking to take place. */
+ if (temp == 0 || legal_number (temp, &seconds) == 0 || seconds < 0)
+- return (0);
++ return -1;
++
++ return seconds;
++}
++
++/* Returns non-zero if it is time to check mail. */
++int
++time_to_check_mail ()
++{
++ time_t now;
++ intmax_t seconds;
++
++ seconds = get_mailcheck(0);
++
++ if(seconds < 0)
++ return 0;
+
+ now = NOW;
+ /* Time to check if MAILCHECK is explicitly set to zero, or if enough
+--- bash-2.05b/mailcheck.h 1999-08-05 07:21:16.000000000 -0400
++++ bash-2.05b.mailcheck/mailcheck.h 2003-07-28 20:58:10.000000000 -0400
+@@ -29,5 +29,6 @@
+ extern char *make_default_mailpath __P((void));
+ extern void remember_mail_dates __P((void));
+ extern void check_mail __P((void));
++extern intmax_t get_mailcheck __P((int));
+
+ #endif /* _MAILCHECK_H */
+--- bash-2.05b/shell.c 2002-07-01 11:27:11.000000000 -0400
++++ bash-2.05b.mailcheck/shell.c 2003-07-28 20:58:10.000000000 -0400
+@@ -652,7 +652,8 @@
+ if (interactive_shell)
+ {
+ /* Set up for checking for presence of mail. */
+- remember_mail_dates ();
++ if(get_mailcheck(1) >= 0)
++ remember_mail_dates ();
+ reset_mail_timer ();
+
+ #if defined (HISTORY)
+--- bash-2.05b/variables.c 2002-06-25 09:43:33.000000000 -0400
++++ bash-2.05b.mailcheck/variables.c 2003-07-28 20:58:10.000000000 -0400
+@@ -3507,7 +3507,8 @@
+ else
+ {
+ free_mail_files ();
+- remember_mail_dates ();
++ if(get_mailcheck(0) >= 0)
++ remember_mail_dates ();
+ }
+ }
+
diff --git a/bash/bash-2.05b/man-arithmetic.patch b/bash/bash-2.05b/man-arithmetic.patch
index e69de29bb2..978de307ab 100644
--- a/bash/bash-2.05b/man-arithmetic.patch
+++ b/bash/bash-2.05b/man-arithmetic.patch
@@ -0,0 +1,12 @@
+--- doc/bash.1~ Sun Apr 29 23:35:03 2001
++++ doc/bash.1 Sat Jul 21 21:48:33 2001
+@@ -2301,6 +2301,9 @@
+ \fB$((\fP\fIexpression\fP\fB))\fP
+ .RE
+ .PP
++The old format \fB$[\fP\fIexpression\fP\fB]\fP is deprecated and will
++be removed in upcoming versions of bash.
++.PP
+ The
+ .I expression
+ is treated as if it were within double quotes, but a double quote
diff --git a/bash/bash-2.05b/man-bashrc.patch b/bash/bash-2.05b/man-bashrc.patch
index e69de29bb2..36a6e4e6c8 100644
--- a/bash/bash-2.05b/man-bashrc.patch
+++ b/bash/bash-2.05b/man-bashrc.patch
@@ -0,0 +1,62 @@
+--- bash/doc/bash.1~ 2003-11-11 00:09:34.000000000 +0100
++++ bash/doc/bash.1 2004-01-21 07:33:45.000000000 +0100
+@@ -169,7 +169,9 @@
+ .PD
+ Execute commands from
+ .I file
+-instead of the standard personal initialization file
++instead of the system wide initialization file
++.I /etc/bash.bashrc
++and the standard personal initialization file
+ .I ~/.bashrc
+ if the shell is interactive (see
+ .SM
+@@ -200,7 +202,9 @@
+ below).
+ .TP
+ .B \-\-norc
+-Do not read and execute the personal initialization file
++Do not read and execute the system wide initialization file
++.I /etc/bash.bashrc
++and the personal initialization file
+ .I ~/.bashrc
+ if the shell is interactive.
+ This option is on by default if the shell is invoked as
+@@ -308,13 +312,15 @@
+ .PP
+ When an interactive shell that is not a login shell is started,
+ .B bash
+-reads and executes commands from \fI~/.bashrc\fP, if that file exists.
++reads and executes commands from \fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP,
++if these files exist.
+ This may be inhibited by using the
+ .B \-\-norc
+ option.
+ The \fB\-\-rcfile\fP \fIfile\fP option will force
+ .B bash
+-to read and execute commands from \fIfile\fP instead of \fI~/.bashrc\fP.
++to read and execute commands from \fIfile\fP instead of
++\fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP.
+ .PP
+ When
+ .B bash
+@@ -399,7 +405,8 @@
+ If
+ .B bash
+ determines it is being run by \fIrshd\fP, it reads and executes
+-commands from \fI~/.bashrc\fP, if that file exists and is readable.
++commands from \fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP,
++if these files exist and are readable.
+ It will not do this if invoked as \fBsh\fP.
+ The
+ .B \-\-norc
+@@ -8273,6 +8280,9 @@
+ .FN /etc/profile
+ The systemwide initialization file, executed for login shells
+ .TP
++.FN /etc/bash.bashrc
++The systemwide per-interactive-shell startup file
++.TP
+ .FN ~/.bash_profile
+ The personal initialization file, executed for login shells
+ .TP
diff --git a/bash/bash-2.05b/man-fignore.patch b/bash/bash-2.05b/man-fignore.patch
index e69de29bb2..4a38c1e56d 100644
--- a/bash/bash-2.05b/man-fignore.patch
+++ b/bash/bash-2.05b/man-fignore.patch
@@ -0,0 +1,13 @@
+--- doc/bash.1~ Fri May 31 00:45:57 2002
++++ doc/bash.1 Fri May 31 00:48:52 2002
+@@ -1456,7 +1456,9 @@
+ is excluded from the list of matched filenames.
+ A sample value is
+ .if t \f(CW".o:~"\fP.
+-.if n ".o:~".
++.if n ".o:~"
++(Quoting is needed when assigning a value to this variable,
++which contains tildes).
+ .TP
+ .B GLOBIGNORE
+ A colon-separated list of patterns defining the set of filenames to
diff --git a/bash/bash-2.05b/privmode.patch b/bash/bash-2.05b/privmode.patch
index e69de29bb2..479b0bf93c 100644
--- a/bash/bash-2.05b/privmode.patch
+++ b/bash/bash-2.05b/privmode.patch
@@ -0,0 +1,11 @@
+--- bash-2.02.1.orig/shell.c
++++ bash-2.02.1/shell.c
+@@ -378,7 +378,7 @@
+ if (dump_translatable_strings)
+ read_but_dont_execute = 1;
+
+- if (running_setuid && privileged_mode == 0)
++ if (running_setuid && privileged_mode == 0 && act_like_sh == 0)
+ disable_priv_mode ();
+
+ /* Need to get the argument to a -c option processed in the
diff --git a/bash/bash-2.05b/rbash-login-shell.patch b/bash/bash-2.05b/rbash-login-shell.patch
index e69de29bb2..7724ceed31 100644
--- a/bash/bash-2.05b/rbash-login-shell.patch
+++ b/bash/bash-2.05b/rbash-login-shell.patch
@@ -0,0 +1,20 @@
+--- bash-2.05b/shell.c.ORI 2003-01-16 12:23:56.000000000 +0100
++++ bash-2.05b/shell.c 2003-01-16 12:25:52.000000000 +0100
+@@ -1065,7 +1065,7 @@
+ if (restricted)
+ return 1;
+ temp = base_pathname (name);
+- return (STREQ (temp, RESTRICTED_SHELL_NAME));
++ return ( (STREQ (temp, RESTRICTED_SHELL_NAME)) || (STREQ (temp, ("-"RESTRICTED_SHELL_NAME))) );
+ }
+
+ /* Perhaps make this shell a `restricted' one, based on NAME. If the
+@@ -1082,7 +1082,7 @@
+ char *temp;
+
+ temp = base_pathname (name);
+- if (restricted || (STREQ (temp, RESTRICTED_SHELL_NAME)))
++ if (restricted || (STREQ (temp, RESTRICTED_SHELL_NAME)) || (STREQ (temp, ("-"RESTRICTED_SHELL_NAME))) )
+ {
+ set_var_read_only ("PATH");
+ set_var_read_only ("SHELL");
diff --git a/bash/bash-2.05b/rbash-manpage.patch b/bash/bash-2.05b/rbash-manpage.patch
index e69de29bb2..7329fec278 100644
--- a/bash/bash-2.05b/rbash-manpage.patch
+++ b/bash/bash-2.05b/rbash-manpage.patch
@@ -0,0 +1,10 @@
+--- doc/rbash.1~ 1999-11-29 22:30:03.000000000 +0100
++++ doc/rbash.1 2003-02-21 16:15:59.000000000 +0100
+@@ -3,6 +3,6 @@
+ rbash \- restricted bash, see \fBbash\fR(1)
+ .SH RESTRICTED SHELL
+ .nr zY 1
+-.so bash.1
++.so man1/bash.1
+ .SH SEE ALSO
+ bash(1)
diff --git a/bash/bash-2.05b/report-155436.patch b/bash/bash-2.05b/report-155436.patch
index e69de29bb2..9fe34928c7 100644
--- a/bash/bash-2.05b/report-155436.patch
+++ b/bash/bash-2.05b/report-155436.patch
@@ -0,0 +1,11 @@
+--- include/shmbutil.h.orig 2002-08-05 06:26:13.000000000 +0900
++++ include/shmbutil.h 2002-08-05 06:19:37.000000000 +0900
+@@ -120,6 +120,8 @@
+ state = state_bak; \
+ (_i)++; \
+ } \
++ else if (mblength == 0) \
++ (_i)++; \
+ else \
+ (_i) += mblength; \
+ } \
diff --git a/bash/bash-2.05b/rl-8bit-init.patch b/bash/bash-2.05b/rl-8bit-init.patch
index e69de29bb2..d00261b9bf 100644
--- a/bash/bash-2.05b/rl-8bit-init.patch
+++ b/bash/bash-2.05b/rl-8bit-init.patch
@@ -0,0 +1,12 @@
+--- bash-2.05b.orig/lib/readline/nls.c 2001-10-16 03:32:29.000000000 +0900
++++ bash-2.05b/lib/readline/nls.c 2002-10-29 19:07:36.000000000 +0900
+@@ -87,7 +87,8 @@
+ char *t;
+
+ /* Set the LC_CTYPE locale category from environment variables. */
+- t = setlocale (LC_CTYPE, "");
++ // t = setlocale (LC_CTYPE, "");
++ t = setlocale (LC_CTYPE, NULL);
+ if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0))
+ {
+ _rl_meta_flag = 1;
diff --git a/bash/bash-2.05b/rl-del-backspace-policy.patch b/bash/bash-2.05b/rl-del-backspace-policy.patch
index e69de29bb2..3fc449f081 100644
--- a/bash/bash-2.05b/rl-del-backspace-policy.patch
+++ b/bash/bash-2.05b/rl-del-backspace-policy.patch
@@ -0,0 +1,28 @@
+--- lib/readline/terminal.c.orig Mon Mar 4 18:23:09 2002
++++ lib/readline/terminal.c Fri Jul 19 08:25:48 2002
+@@ -148,6 +148,9 @@
+ /* Insert key */
+ static char *_rl_term_kI;
+
++/* The key sequence sent by the Delete key, if any. */
++static char *_rl_term_kD;
++
+ /* Cursor control */
+ static char *_rl_term_vs; /* very visible */
+ static char *_rl_term_ve; /* normal */
+@@ -314,6 +317,7 @@
+ { "ic", &_rl_term_ic },
+ { "im", &_rl_term_im },
+ { "kH", &_rl_term_kH }, /* home down ?? */
++ { "kD", &_rl_term_kD }, /* delete */
+ { "kI", &_rl_term_kI }, /* insert */
+ { "kd", &_rl_term_kd },
+ { "ke", &_rl_term_ke }, /* end keypad mode */
+@@ -496,6 +500,7 @@
+
+ _rl_bind_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */
+ _rl_bind_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
++ _rl_bind_if_unbound (_rl_term_kD, rl_delete); /* Delete */
+
+ _rl_keymap = xkeymap;
+ }
diff --git a/bash/bash-2.05b/rl-examples.patch b/bash/bash-2.05b/rl-examples.patch
index e69de29bb2..a6ea709a9e 100644
--- a/bash/bash-2.05b/rl-examples.patch
+++ b/bash/bash-2.05b/rl-examples.patch
@@ -0,0 +1,24 @@
+--- ./lib/readline/examples/Makefile.orig Fri Nov 26 23:13:35 1999
++++ ./lib/readline/examples/Makefile Fri Nov 26 23:15:19 1999
+@@ -1,8 +1,8 @@
+ # This is the Makefile for the examples subdirectory of readline. -*- text -*-
+ #
+ EXECUTABLES = fileman rltest rl
+-CFLAGS = -g -I../.. -I.. -DREADLINE_LIBRARY
+-LDFLAGS = -g -L..
++CFLAGS = -g
++LDFLAGS = -g
+
+ .c.o:
+ $(CC) $(CFLAGS) -c $<
+--- ./lib/readline/examples/rl.c~ Mon Nov 8 22:22:03 1999
++++ ./lib/readline/examples/rl.c Fri Dec 31 17:34:30 1999
+@@ -11,7 +11,7 @@
+
+ #include <stdio.h>
+ #include <sys/types.h>
+-#include "posixstat.h"
++#include <sys/stat.h>
+
+ #if defined (READLINE_LIBRARY)
+ # include "readline.h"
diff --git a/bash/bash-2.05b/rl-inputrc.patch b/bash/bash-2.05b/rl-inputrc.patch
index e69de29bb2..9f8ec7e77d 100644
--- a/bash/bash-2.05b/rl-inputrc.patch
+++ b/bash/bash-2.05b/rl-inputrc.patch
@@ -0,0 +1,70 @@
+--- readline4-4.2.orig/lib/readline/bind.c Wed Nov 8 18:39:01 2000
++++ readline4-4.2/lib/readline/bind.c Tue Feb 6 18:24:42 2001
+@@ -593,6 +593,9 @@
+ /* The last key bindings file read. */
+ static char *last_readline_init_file = (char *)NULL;
+
++/* Flag to read system init file */
++static int read_system_init_file = 0;
++
+ /* The file we're currently reading key bindings from. */
+ static const char *current_readline_init_file;
+ static int current_readline_init_include_level;
+@@ -670,7 +673,7 @@
+ to the first non-null filename from this list:
+ 1. the filename used for the previous call
+ 2. the value of the shell variable `INPUTRC'
+- 3. ~/.inputrc
++ 3. /etc/inputrc and ~/.inputrc
+ If the file existed and could be opened and read, 0 is returned,
+ otherwise errno is returned. */
+ int
+@@ -681,14 +684,23 @@
+ if (filename == 0)
+ {
+ filename = last_readline_init_file;
+- if (filename == 0)
++ if (filename == 0) {
+ filename = sh_get_env_value ("INPUTRC");
+- if (filename == 0)
++ read_system_init_file = 0;
++ }
++ if (filename == 0) {
+ filename = DEFAULT_INPUTRC;
++ read_system_init_file = 1;
++ }
+ }
+
+- if (*filename == 0)
++ if (*filename == 0) {
+ filename = DEFAULT_INPUTRC;
++ read_system_init_file = 1;
++ }
++
++ if (read_system_init_file)
++ _rl_read_init_file (SYSTEM_INPUTRC, 0);
+
+ #if defined (__MSDOS__)
+ if (_rl_read_init_file (filename, 0) == 0)
+--- readline4-4.2.orig/lib/readline/doc/rluser.texinfo Mon Feb 5 15:38:11 2001
++++ readline4-4.2/lib/readline/doc/rluser.texinfo Tue Feb 6 18:24:42 2001
+@@ -332,7 +332,8 @@
+ @ifclear BashFeatures
+ file is taken from the value of the environment variable @env{INPUTRC}. If
+ @end ifclear
+-that variable is unset, the default is @file{~/.inputrc}.
++that variable is unset, Readline will read both @file{/etc/inputrc} and
++@file{~/.inputrc}.
+
+ When a program which uses the Readline library starts up, the
+ init file is read, and the key bindings are set.
+--- readline4-4.2.orig/lib/readline/rlconf.h Thu Aug 5 14:11:14 1999
++++ readline4-4.2/lib/readline/rlconf.h Tue Feb 6 18:24:42 2001
+@@ -39,6 +39,7 @@
+
+ /* The final, last-ditch effort file name for an init file. */
+ #define DEFAULT_INPUTRC "~/.inputrc"
++#define SYSTEM_INPUTRC "/etc/inputrc"
+
+ /* If defined, expand tabs to spaces. */
+ #define DISPLAY_TABS
diff --git a/bash/bash-2.05b/rl-slow-multibyte.patch b/bash/bash-2.05b/rl-slow-multibyte.patch
index e69de29bb2..9aafe9ea96 100644
--- a/bash/bash-2.05b/rl-slow-multibyte.patch
+++ b/bash/bash-2.05b/rl-slow-multibyte.patch
@@ -0,0 +1,49 @@
+--- bash-2.05b.orig/lib/readline/display.c 2002-06-04 23:54:47.000000000 +0900
++++ bash-2.05b/lib/readline/display.c 2002-12-12 16:31:06.000000000 +0900
+@@ -1129,16 +1129,24 @@
+ memset (&ps_new, 0, sizeof(mbstate_t));
+ memset (&ps_old, 0, sizeof(mbstate_t));
+
+- new_offset = old_offset = 0;
+- for (ofd = old, nfd = new;
+- (ofd - old < omax) && *ofd &&
+- _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); )
+- {
+- old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY);
+- new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY);
+- ofd = old + old_offset;
+- nfd = new + new_offset;
+- }
++ if(omax == nmax && strncmp(new,old,omax) == 0)
++ {
++ ofd = old + omax;
++ nfd = new + nmax;
++ }
++ else
++ {
++ new_offset = old_offset = 0;
++ for (ofd = old, nfd = new;
++ (ofd - old < omax) && *ofd &&
++ _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); )
++ {
++ old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY);
++ new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY);
++ ofd = old + old_offset;
++ nfd = new + new_offset;
++ }
++ }
+ }
+ else
+ #endif
+@@ -1169,8 +1177,9 @@
+ memset (&ps_old, 0, sizeof (mbstate_t));
+ memset (&ps_new, 0, sizeof (mbstate_t));
+
+- _rl_adjust_point (old, ols - old, &ps_old);
+- _rl_adjust_point (new, nls - new, &ps_new);
++ /* these doesn't make sense */
++ /* _rl_adjust_point (old, ols - old, &ps_old); */
++ /* _rl_adjust_point (new, nls - new, &ps_new); */
+
+ if (_rl_compare_chars (old, ols - old, &ps_old, new, nls - new, &ps_new) == 0)
+ break;
diff --git a/bash/bash-2.05b/s390-build.patch b/bash/bash-2.05b/s390-build.patch
index e69de29bb2..15e4203e0c 100644
--- a/bash/bash-2.05b/s390-build.patch
+++ b/bash/bash-2.05b/s390-build.patch
@@ -0,0 +1,46 @@
+*** ../bash-2.05b/parse.y Tue May 21 11:57:30 2002
+--- ./parse.y Thu Sep 26 12:08:19 2002
+***************
+*** 4525,4529 ****
+ set_line_mbstate ()
+ {
+! int i, previ, len;
+ mbstate_t mbs, prevs;
+ size_t mbclen;
+--- 4534,4538 ----
+ set_line_mbstate ()
+ {
+! int i, previ, len, c;
+ mbstate_t mbs, prevs;
+ size_t mbclen;
+***************
+*** 4540,4544 ****
+ mbs = prevs;
+
+! if (shell_input_line[i] == EOF)
+ {
+ int j;
+--- 4549,4554 ----
+ mbs = prevs;
+
+! c = shell_input_line[i];
+! if (c == EOF)
+ {
+ int j;
+***************
+*** 4564,4568 ****
+ else
+ {
+! /* mbrlen doesn't return any other values */
+ }
+
+--- 4574,4582 ----
+ else
+ {
+! /* XXX - what to do if mbrlen returns 0? (null wide character) */
+! int j;
+! for (j = i; j < len; j++)
+! shell_input_line_property[j] = 1;
+! break;
+ }
+
diff --git a/bash/bash-2.05b/suspend-segfault.patch b/bash/bash-2.05b/suspend-segfault.patch
index e69de29bb2..1cc1f45956 100644
--- a/bash/bash-2.05b/suspend-segfault.patch
+++ b/bash/bash-2.05b/suspend-segfault.patch
@@ -0,0 +1,11 @@
+--- bash/builtins/common.c~ 2002-06-28 18:24:31.000000000 +0200
++++ bash/builtins/common.c 2003-10-28 10:30:15.000000000 +0100
+@@ -244,7 +244,7 @@
+ char *s;
+ {
+ if (s)
+- builtin_error ("%s: no job control");
++ builtin_error ("%s: no job control", s);
+ else
+ builtin_error ("no job control");
+ }
diff --git a/bash/bash-2.05b/various.patch b/bash/bash-2.05b/various.patch
index e69de29bb2..fa1a364cab 100644
--- a/bash/bash-2.05b/various.patch
+++ b/bash/bash-2.05b/various.patch
@@ -0,0 +1,10 @@
+--- bash-2.02.1.orig/general.h
++++ bash-2.02.1/general.h
+@@ -21,6 +21,7 @@
+ #if !defined (_GENERAL_H_)
+ #define _GENERAL_H_
+
++#include <sys/types.h>
+ #include "stdc.h"
+
+ #include "bashtypes.h"