Changeset b35707a


Ignore:
Timestamp:
Dec 29, 2008, 8:04:33 PM (15 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
077f768
Parents:
022cd24
Message:

Updated Bash Patch to -9

Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • BOOK/introduction/common/changelog.xml

    r022cd24 rb35707a  
    5353        <listitem>
    5454          <para>[Jim] - Updated Linux to 2.6.28.</para>
     55        </listitem>
     56        <listitem>
     57          <para>[Jim] - Updated Bash Patch to -9.</para>
    5558        </listitem>
    5659      </itemizedlist>
  • BOOK/patches.ent

    r022cd24 rb35707a  
    55<!-- Start of Common Patches -->
    66
    7 <!ENTITY bash-fixes-patch "bash-&bash-version;-fixes-8.patch">
    8 <!ENTITY bash-fixes-patch-md5 "9f57c9bd5d7278529a9b13d8fc36a02e">
    9 <!ENTITY bash-fixes-patch-size "416 KB">
     7<!ENTITY bash-fixes-patch "bash-&bash-version;-fixes-9.patch">
     8<!ENTITY bash-fixes-patch-md5 "f95ef1f0cce20d865f05a48f31b152ad">
     9<!ENTITY bash-fixes-patch-size "424 KB">
    1010
    1111<!ENTITY binutils-branch_update-patch "binutils-&binutils-version;-branch_update-1.patch">
  • patches/bash-3.2-fixes-9.patch

    r022cd24 rb35707a  
    11Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
    2 Date: 06-18-2008
     2Date: 12-20-2008
    33Initial Package Version: 3.2
    44Origin: Upstream
    55Upstream Status: Applied
    6 Description: Contains all upstream patches up to 3.2-039
     6Description: Contains all upstream patches up to 3.2-048
    77
    88diff -Naur bash-3.2.orig/array.c bash-3.2/array.c
    9 --- bash-3.2.orig/array.c       2005-06-01 16:39:22.000000000 -0400
    10 +++ bash-3.2/array.c    2008-06-18 06:46:19.000000000 -0400
     9--- bash-3.2.orig/array.c       2005-06-01 13:39:22.000000000 -0700
     10+++ bash-3.2/array.c    2008-12-20 07:00:08.000000000 -0800
    1111@@ -120,7 +120,6 @@
    1212        return(a1);
     
    105105                ifs = getifs();
    106106                sifs[0] = ifs ? *ifs : '\0';
     107@@ -655,7 +683,7 @@
     108                is = inttostr (element_index(ae), indstr, sizeof(indstr));
     109                valstr = element_value (ae) ? sh_double_quote (element_value(ae))
     110                                            : (char *)NULL;
     111-               elen = STRLEN (indstr) + 8 + STRLEN (valstr);
     112+               elen = STRLEN (is) + 8 + STRLEN (valstr);
     113                RESIZE_MALLOCED_BUFFER (result, rlen, (elen + 1), rsize, rsize);
     114 
     115                result[rlen++] = '[';
    107116diff -Naur bash-3.2.orig/array.h bash-3.2/array.h
    108 --- bash-3.2.orig/array.h       2003-06-01 15:50:30.000000000 -0400
    109 +++ bash-3.2/array.h    2008-06-18 06:46:19.000000000 -0400
     117--- bash-3.2.orig/array.h       2003-06-01 12:50:30.000000000 -0700
     118+++ bash-3.2/array.h    2008-12-20 06:59:28.000000000 -0800
    110119@@ -55,6 +55,7 @@
    111120 extern ARRAY_ELEMENT *array_unshift_element __P((ARRAY *));
     
    117126 extern char    *array_patsub __P((ARRAY *, char *, char *, int));
    118127diff -Naur bash-3.2.orig/arrayfunc.c bash-3.2/arrayfunc.c
    119 --- bash-3.2.orig/arrayfunc.c   2006-07-27 09:37:59.000000000 -0400
    120 +++ bash-3.2/arrayfunc.c        2008-06-18 06:46:30.000000000 -0400
     128--- bash-3.2.orig/arrayfunc.c   2006-07-27 06:37:59.000000000 -0700
     129+++ bash-3.2/arrayfunc.c        2008-12-20 06:59:57.000000000 -0800
    121130@@ -618,6 +618,8 @@
    122131   if (expok == 0)
     
    137146        {
    138147          err_badarraysub (s);
     148diff -Naur bash-3.2.orig/bashhist.c bash-3.2/bashhist.c
     149--- bash-3.2.orig/bashhist.c    2005-12-26 10:31:16.000000000 -0800
     150+++ bash-3.2/bashhist.c 2008-12-20 07:00:10.000000000 -0800
     151@@ -80,6 +80,7 @@
     152    list.  This is different than the user-controlled behaviour; this
     153    becomes zero when we read lines from a file, for example. */
     154 int remember_on_history = 1;
     155+int enable_history_list = 1;   /* value for `set -o history' */
     156 
     157 /* The number of lines that Bash has added to this history session.  The
     158    difference between the number of the top element in the history list
     159@@ -234,7 +235,7 @@
     160   history_expansion = interact != 0;
     161   history_expansion_inhibited = 1;
     162 #endif
     163-  remember_on_history = interact != 0;
     164+  remember_on_history = enable_history_list = interact != 0;
     165   history_inhibit_expansion_function = bash_history_inhibit_expansion;
     166 }
     167 
     168diff -Naur bash-3.2.orig/bashhist.h bash-3.2/bashhist.h
     169--- bash-3.2.orig/bashhist.h    2005-07-01 12:44:41.000000000 -0700
     170+++ bash-3.2/bashhist.h 2008-12-20 07:00:10.000000000 -0800
     171@@ -31,6 +31,9 @@
     172 #define HC_IGNBOTH     (HC_IGNSPACE|HC_IGNDUPS)
     173 
     174 extern int remember_on_history;
     175+extern int enable_history_list;                /* value for `set -o history' */
     176+extern int literal_history;            /* controlled by `shopt lithist' */
     177+extern int force_append_history;
     178 extern int history_lines_this_session;
     179 extern int history_lines_in_file;
     180 extern int history_expansion;
    139181diff -Naur bash-3.2.orig/bashline.c bash-3.2/bashline.c
    140 --- bash-3.2.orig/bashline.c    2006-07-29 16:39:30.000000000 -0400
    141 +++ bash-3.2/bashline.c 2008-06-18 06:46:32.000000000 -0400
     182--- bash-3.2.orig/bashline.c    2006-07-29 13:39:30.000000000 -0700
     183+++ bash-3.2/bashline.c 2008-12-20 07:00:04.000000000 -0800
    142184@@ -2357,7 +2357,7 @@
    143185   if (should_expand_dirname) 
     
    150192          *dirname = string_list (wl);
    151193diff -Naur bash-3.2.orig/builtins/common.c bash-3.2/builtins/common.c
    152 --- bash-3.2.orig/builtins/common.c     2006-07-27 09:39:51.000000000 -0400
    153 +++ bash-3.2/builtins/common.c  2008-06-18 06:46:23.000000000 -0400
     194--- bash-3.2.orig/builtins/common.c     2006-07-27 06:39:51.000000000 -0700
     195+++ bash-3.2/builtins/common.c  2008-12-20 06:59:37.000000000 -0800
    154196@@ -1,4 +1,4 @@
    155197-/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
     
    190232        {
    191233          fprintf (stderr, _("%s: error retrieving current directory: %s: %s\n"),
     234diff -Naur bash-3.2.orig/builtins/evalstring.c bash-3.2/builtins/evalstring.c
     235--- bash-3.2.orig/builtins/evalstring.c 2006-07-28 12:12:16.000000000 -0700
     236+++ bash-3.2/builtins/evalstring.c      2008-12-20 07:00:21.000000000 -0800
     237@@ -67,6 +67,14 @@
     238 
     239 static int cat_file __P((REDIRECT *));
     240 
     241+#if defined (HISTORY)
     242+static void
     243+set_history_remembering ()
     244+{
     245+  remember_on_history = enable_history_list;
     246+}
     247+#endif
     248+
     249 /* How to force parse_and_execute () to clean up after itself. */
     250 void
     251 parse_and_execute_cleanup ()
     252@@ -115,7 +123,10 @@
     253   lreset = flags & SEVAL_RESETLINE;
     254 
     255 #if defined (HISTORY)
     256-  unwind_protect_int (remember_on_history);    /* can be used in scripts */
     257+  if (parse_and_execute_level == 0)
     258+    add_unwind_protect (set_history_remembering, (char *)NULL);
     259+  else
     260+    unwind_protect_int (remember_on_history);  /* can be used in scripts */
     261 #  if defined (BANG_HISTORY)
     262   if (interactive_shell)
     263     {
     264@@ -237,6 +248,7 @@
     265               *   parse_and_execute has not been called recursively AND
     266               *   we're not running a trap AND
     267               *   we have parsed the full command (string == '\0') AND
     268+              *   we're not going to run the exit trap AND
     269               *   we have a simple command without redirections AND
     270               *   the command is not being timed AND
     271               *   the command's return status is not being inverted
     272@@ -247,7 +259,8 @@
     273                  running_trap == 0 &&
     274                  *bash_input.location.string == '\0' &&
     275                  command->type == cm_simple &&
     276-                 !command->redirects && !command->value.Simple->redirects &&
     277+                 signal_is_trapped (EXIT_TRAP) == 0 &&
     278+                 command->redirects == 0 && command->value.Simple->redirects == 0 &&
     279                  ((command->flags & CMD_TIME_PIPELINE) == 0) &&
     280                  ((command->flags & CMD_INVERT_RETURN) == 0))
     281                {
    192282diff -Naur bash-3.2.orig/builtins/printf.def bash-3.2/builtins/printf.def
    193 --- bash-3.2.orig/builtins/printf.def   2006-09-18 08:48:42.000000000 -0400
    194 +++ bash-3.2/builtins/printf.def        2008-06-18 06:46:18.000000000 -0400
     283--- bash-3.2.orig/builtins/printf.def   2006-09-18 05:48:42.000000000 -0700
     284+++ bash-3.2/builtins/printf.def        2008-12-20 06:59:25.000000000 -0800
    195285@@ -1,7 +1,7 @@
    196286 This file is printf.def, from which is created printf.c.
     
    238328 static int tescape __P((char *, char *, int *));
    239329diff -Naur bash-3.2.orig/builtins/read.def bash-3.2/builtins/read.def
    240 --- bash-3.2.orig/builtins/read.def     2006-09-19 08:45:48.000000000 -0400
    241 +++ bash-3.2/builtins/read.def  2008-06-18 06:46:33.000000000 -0400
     330--- bash-3.2.orig/builtins/read.def     2006-09-19 05:45:48.000000000 -0700
     331+++ bash-3.2/builtins/read.def  2008-12-20 07:00:05.000000000 -0800
    242332@@ -127,14 +127,14 @@
    243333      WORD_LIST *list;
     
    337427     VUNSETATTR (var, att_invisible);
    338428   xfree (orig_input_string);
     429diff -Naur bash-3.2.orig/builtins/set.def bash-3.2/builtins/set.def
     430--- bash-3.2.orig/builtins/set.def      2006-07-27 06:41:43.000000000 -0700
     431+++ bash-3.2/builtins/set.def   2008-12-20 07:00:10.000000000 -0800
     432@@ -189,7 +189,7 @@
     433   { "histexpand", 'H', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL  },
     434 #endif /* BANG_HISTORY */
     435 #if defined (HISTORY)
     436-  { "history",   '\0', &remember_on_history, bash_set_history, (setopt_get_func_t *)NULL },
     437+  { "history",   '\0', &enable_history_list, bash_set_history, (setopt_get_func_t *)NULL },
     438 #endif
     439   { "ignoreeof", '\0', &ignoreeof, set_ignoreeof, (setopt_get_func_t *)NULL },
     440   { "interactive-comments", '\0', &interactive_comments, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
     441@@ -381,13 +381,17 @@
     442 {
     443   if (on_or_off == FLAG_ON)
     444     {
     445+      enable_history_list = 1;
     446       bash_history_enable ();
     447       if (history_lines_this_session == 0)
     448        load_history ();
     449     }
     450   else
     451-    bash_history_disable ();
     452-  return (1 - remember_on_history);
     453+    {
     454+      enable_history_list = 0;
     455+      bash_history_disable ();
     456+    }
     457+  return (1 - enable_history_list);
     458 }
     459 #endif
     460 
     461@@ -565,7 +569,7 @@
     462 reset_shell_options ()
     463 {
     464 #if defined (HISTORY)
     465-  remember_on_history = 1;
     466+  remember_on_history = enable_history_list = 1;
     467 #endif
     468   ignoreeof = 0;
     469 }
    339470diff -Naur bash-3.2.orig/builtins/shopt.def bash-3.2/builtins/shopt.def
    340 --- bash-3.2.orig/builtins/shopt.def    2005-02-19 17:25:03.000000000 -0500
    341 +++ bash-3.2/builtins/shopt.def 2008-06-18 06:46:33.000000000 -0400
     471--- bash-3.2.orig/builtins/shopt.def    2005-02-19 14:25:03.000000000 -0800
     472+++ bash-3.2/builtins/shopt.def 2008-12-20 07:00:07.000000000 -0800
    342473@@ -101,11 +101,14 @@
    343474 
     
    383514 
    384515diff -Naur bash-3.2.orig/config-bot.h bash-3.2/config-bot.h
    385 --- bash-3.2.orig/config-bot.h  2006-09-12 16:43:04.000000000 -0400
    386 +++ bash-3.2/config-bot.h       2008-06-18 06:46:18.000000000 -0400
     516--- bash-3.2.orig/config-bot.h  2006-09-12 13:43:04.000000000 -0700
     517+++ bash-3.2/config-bot.h       2008-12-20 06:59:23.000000000 -0800
    387518@@ -1,7 +1,7 @@
    388519 /* config-bot.h */
     
    410541 
    411542diff -Naur bash-3.2.orig/config.h.in bash-3.2/config.h.in
    412 --- bash-3.2.orig/config.h.in   2006-09-12 16:00:54.000000000 -0400
    413 +++ bash-3.2/config.h.in        2008-06-18 06:46:18.000000000 -0400
     543--- bash-3.2.orig/config.h.in   2006-09-12 13:00:54.000000000 -0700
     544+++ bash-3.2/config.h.in        2008-12-20 06:59:25.000000000 -0800
    414545@@ -1,6 +1,6 @@
    415546 /* config.h -- Configuration file for bash. */
     
    440571 
    441572diff -Naur bash-3.2.orig/configure bash-3.2/configure
    442 --- bash-3.2.orig/configure     2006-09-26 11:06:01.000000000 -0400
    443 +++ bash-3.2/configure  2008-06-18 06:46:26.000000000 -0400
     573--- bash-3.2.orig/configure     2006-09-26 08:06:01.000000000 -0700
     574+++ bash-3.2/configure  2008-12-20 06:59:47.000000000 -0800
    444575@@ -4871,7 +4871,7 @@
    445576                # static version specified as -llibname to override the
     
    462593                case "`uname -r`" in
    463594diff -Naur bash-3.2.orig/configure.in bash-3.2/configure.in
    464 --- bash-3.2.orig/configure.in  2006-09-26 11:05:45.000000000 -0400
    465 +++ bash-3.2/configure.in       2008-06-18 06:46:26.000000000 -0400
     595--- bash-3.2.orig/configure.in  2006-09-26 08:05:45.000000000 -0700
     596+++ bash-3.2/configure.in       2008-12-20 06:59:46.000000000 -0800
    466597@@ -5,7 +5,7 @@
    467598 dnl
     
    493624                case "`uname -r`" in
    494625diff -Naur bash-3.2.orig/doc/bash.1 bash-3.2/doc/bash.1
    495 --- bash-3.2.orig/doc/bash.1    2006-10-03 08:54:26.000000000 -0400
    496 +++ bash-3.2/doc/bash.1 2008-06-18 06:46:33.000000000 -0400
     626--- bash-3.2.orig/doc/bash.1    2006-10-03 05:54:26.000000000 -0700
     627+++ bash-3.2/doc/bash.1 2008-12-20 07:00:07.000000000 -0800
    497628@@ -7977,6 +7977,12 @@
    498629 command in the same history entry.  This allows
     
    509640 .B bash
    510641diff -Naur bash-3.2.orig/doc/bashref.texi bash-3.2/doc/bashref.texi
    511 --- bash-3.2.orig/doc/bashref.texi      2006-09-28 10:25:28.000000000 -0400
    512 +++ bash-3.2/doc/bashref.texi   2008-06-18 06:46:33.000000000 -0400
     642--- bash-3.2.orig/doc/bashref.texi      2006-09-28 07:25:28.000000000 -0700
     643+++ bash-3.2/doc/bashref.texi   2008-12-20 07:00:07.000000000 -0800
    513644@@ -3598,6 +3598,11 @@
    514645 command in the same history entry.  This allows
     
    524655 the results of filename expansion.
    525656diff -Naur bash-3.2.orig/doc/bashref.texi.orig bash-3.2/doc/bashref.texi.orig
    526 --- bash-3.2.orig/doc/bashref.texi.orig 1969-12-31 19:00:00.000000000 -0500
    527 +++ bash-3.2/doc/bashref.texi.orig      2006-09-28 10:25:28.000000000 -0400
     657--- bash-3.2.orig/doc/bashref.texi.orig 1969-12-31 16:00:00.000000000 -0800
     658+++ bash-3.2/doc/bashref.texi.orig      2006-09-28 07:25:28.000000000 -0700
    528659@@ -0,0 +1,7422 @@
    529660+\input texinfo.tex @c -*- texinfo -*-
     
    79508081+@bye
    79518082diff -Naur bash-3.2.orig/execute_cmd.c bash-3.2/execute_cmd.c
    7952 --- bash-3.2.orig/execute_cmd.c 2006-08-26 00:23:17.000000000 -0400
    7953 +++ bash-3.2/execute_cmd.c      2008-06-18 06:46:33.000000000 -0400
     8083--- bash-3.2.orig/execute_cmd.c 2006-08-25 21:23:17.000000000 -0700
     8084+++ bash-3.2/execute_cmd.c      2008-12-20 07:00:16.000000000 -0800
    79548085@@ -1,6 +1,6 @@
    79558086 /* execute_cmd.c -- Execute a COMMAND structure. */
     
    79608091    This file is part of GNU Bash, the Bourne Again SHell.
    79618092 
    7962 @@ -614,7 +614,7 @@
     8093@@ -501,8 +501,15 @@
     8094   volatile int last_pid;
     8095   volatile int save_line_number;
     8096 
     8097+#if 0
     8098   if (command == 0 || breaking || continuing || read_but_dont_execute)
     8099     return (EXECUTION_SUCCESS);
     8100+#else
     8101+  if (breaking || continuing)
     8102+    return (last_command_exit_value);
     8103+  if (command == 0 || read_but_dont_execute)
     8104+    return (EXECUTION_SUCCESS);
     8105+#endif
     8106 
     8107   QUIT;
     8108   run_pending_traps ();
     8109@@ -614,7 +621,7 @@
    79638110       cleanup_redirects (redirection_undo_list);
    79648111       redirection_undo_list = (REDIRECT *)NULL;
     
    79698116 
    79708117   if (redirection_undo_list)
    7971 @@ -2546,7 +2546,8 @@
     8118@@ -2546,7 +2553,8 @@
    79728119       arg1 = cond_expand_word (cond->left->op, 0);
    79738120       if (arg1 == 0)
     
    79798126        arg2 = nullstr;
    79808127 
    7981 @@ -3050,6 +3051,11 @@
     8128@@ -3050,6 +3058,11 @@
    79828129   if (command_line == 0)
    79838130     command_line = savestring (the_printed_command_except_trap);
     
    79918138                        pipe_in, pipe_out, async, fds_to_close,
    79928139                        simple_command->flags);
    7993 @@ -3875,6 +3881,8 @@
     8140@@ -3875,6 +3888,8 @@
    79948141     shell_variables = shell_variables->down;
    79958142 
     
    80018148   variable_context = return_catch_flag = 0;
    80028149diff -Naur bash-3.2.orig/expr.c bash-3.2/expr.c
    8003 --- bash-3.2.orig/expr.c        2005-12-28 17:47:03.000000000 -0500
    8004 +++ bash-3.2/expr.c     2008-06-18 06:46:28.000000000 -0400
     8150--- bash-3.2.orig/expr.c        2005-12-28 14:47:03.000000000 -0800
     8151+++ bash-3.2/expr.c     2008-12-20 07:00:12.000000000 -0800
    80058152@@ -286,6 +286,8 @@
    80068153       free (expr_stack[expr_depth]);
     
    80208167   FASTCOPY (evalbuf, oevalbuf, sizeof (evalbuf));
    80218168 
    8022 @@ -929,6 +932,7 @@
     8169@@ -517,7 +520,8 @@
     8170          set_noeval = 1;
     8171          noeval++;
     8172        }
     8173-      val2 = explor ();
     8174+
     8175+      val2 = expcond ();
     8176       if (set_noeval)
     8177        noeval--;
     8178       rval = cval ? val1 : val2;
     8179@@ -929,6 +933,7 @@
    80238180       if (interactive_shell)
    80248181        {
     
    80298186       else
    80308187diff -Naur bash-3.2.orig/findcmd.c bash-3.2/findcmd.c
    8031 --- bash-3.2.orig/findcmd.c     2005-08-17 16:49:54.000000000 -0400
    8032 +++ bash-3.2/findcmd.c  2008-06-18 06:46:16.000000000 -0400
     8188--- bash-3.2.orig/findcmd.c     2005-08-17 13:49:54.000000000 -0700
     8189+++ bash-3.2/findcmd.c  2008-12-20 06:59:18.000000000 -0800
    80338190@@ -308,7 +308,7 @@
    80348191   if (hashed_file && (posixly_correct || check_hashed_filenames))
     
    80418198          free (hashed_file);
    80428199diff -Naur bash-3.2.orig/jobs.c bash-3.2/jobs.c
    8043 --- bash-3.2.orig/jobs.c        2006-07-29 16:40:48.000000000 -0400
    8044 +++ bash-3.2/jobs.c     2008-06-18 06:46:31.000000000 -0400
     8200--- bash-3.2.orig/jobs.c        2006-07-29 13:40:48.000000000 -0700
     8201+++ bash-3.2/jobs.c     2008-12-20 07:00:00.000000000 -0800
    80458202@@ -250,6 +250,7 @@
    80468203 static int job_exit_signal __P((int));
     
    82008357          signal handler path */
    82018358diff -Naur bash-3.2.orig/lib/readline/complete.c bash-3.2/lib/readline/complete.c
    8202 --- bash-3.2.orig/lib/readline/complete.c       2006-07-28 11:35:49.000000000 -0400
    8203 +++ bash-3.2/lib/readline/complete.c    2008-06-18 06:46:22.000000000 -0400
     8359--- bash-3.2.orig/lib/readline/complete.c       2006-07-28 08:35:49.000000000 -0700
     8360+++ bash-3.2/lib/readline/complete.c    2008-12-20 06:59:36.000000000 -0800
    82048361@@ -428,7 +428,7 @@
    82058362        return (1);
     
    82128369        return (2);
    82138370diff -Naur bash-3.2.orig/lib/readline/display.c bash-3.2/lib/readline/display.c
    8214 --- bash-3.2.orig/lib/readline/display.c        2006-09-14 14:20:12.000000000 -0400
    8215 +++ bash-3.2/lib/readline/display.c     2008-06-18 06:46:29.000000000 -0400
     8371--- bash-3.2.orig/lib/readline/display.c        2006-09-14 11:20:12.000000000 -0700
     8372+++ bash-3.2/lib/readline/display.c     2008-12-20 07:00:15.000000000 -0800
    82168373@@ -391,14 +391,14 @@
    82178374       t = ++p;
     
    82578414 #if defined (HANDLE_MULTIBYTE)   
    82588415 #define CHECK_LPOS() \
    8259 @@ -1036,7 +1048,7 @@
     8416@@ -898,6 +910,10 @@
     8417             second and subsequent lines start at inv_lbreaks[N], offset by
     8418             OFFSET (which has already been calculated above).  */
     8419 
     8420+#define INVIS_FIRST()  (prompt_physical_chars > _rl_screenwidth ? prompt_invis_chars_first_line : wrap_offset)
     8421+#define WRAP_OFFSET(line, offset)  ((line == 0) \
     8422+                                       ? (offset ? INVIS_FIRST() : 0) \
     8423+                                       : ((line == prompt_last_screen_line) ? wrap_offset-prompt_invis_chars_first_line : 0))
     8424 #define W_OFFSET(line, offset) ((line) == 0 ? offset : 0)
     8425 #define VIS_LLEN(l)    ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l]))
     8426 #define INV_LLEN(l)    (inv_lbreaks[l+1] - inv_lbreaks[l])
     8427@@ -932,7 +948,13 @@
     8428                  _rl_last_c_pos != o_cpos &&
     8429                  _rl_last_c_pos > wrap_offset &&
     8430                  o_cpos < prompt_last_invisible)
     8431-               _rl_last_c_pos -= wrap_offset;
     8432+               _rl_last_c_pos -= prompt_invis_chars_first_line;        /* XXX - was wrap_offset */
     8433+             else if (linenum == prompt_last_screen_line && prompt_physical_chars > _rl_screenwidth &&
     8434+                       (MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
     8435+                       cpos_adjusted == 0 &&
     8436+                       _rl_last_c_pos != o_cpos &&
     8437+                       _rl_last_c_pos > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line))
     8438+               _rl_last_c_pos -= (wrap_offset-prompt_invis_chars_first_line);
     8439                 
     8440              /* If this is the line with the prompt, we might need to
     8441                 compensate for invisible characters in the new line. Do
     8442@@ -1036,7 +1058,7 @@
    82608443                tx = _rl_col_width (&visible_line[pos], 0, nleft) - visible_wrap_offset;
    82618444              else
     
    82668449                  _rl_backspace (_rl_last_c_pos - tx);  /* XXX */
    82678450                  _rl_last_c_pos = tx;
    8268 @@ -1192,7 +1204,7 @@
     8451@@ -1192,7 +1214,7 @@
    82698452      int current_line, omax, nmax, inv_botlin;
    82708453 {
    82718454   register char *ofd, *ols, *oe, *nfd, *nls, *ne;
    82728455-  int temp, lendiff, wsatend, od, nd;
    8273 +  int temp, lendiff, wsatend, od, nd, o_cpos;
     8456+  int temp, lendiff, wsatend, od, nd, twidth, o_cpos;
    82748457   int current_invis_chars;
    82758458   int col_lendiff, col_temp;
    82768459 #if defined (HANDLE_MULTIBYTE)
    8277 @@ -1453,6 +1465,8 @@
     8460@@ -1208,7 +1230,7 @@
     8461   if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
     8462     temp = _rl_last_c_pos;
     8463   else
     8464-    temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset);
     8465+    temp = _rl_last_c_pos - WRAP_OFFSET (_rl_last_v_pos, visible_wrap_offset);
     8466   if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode
     8467        && _rl_last_v_pos == current_line - 1)
     8468     {
     8469@@ -1453,6 +1475,8 @@
    82788470        _rl_last_c_pos = lendiff;
    82798471     }
     
    82848476      cursor postion in multibyte mode, but a buffer index when not in a
    82858477      multibyte locale. */
    8286 @@ -1462,7 +1476,9 @@
     8478@@ -1462,7 +1486,9 @@
    82878479   /* We need to indicate that the cursor position is correct in the presence of
    82888480      invisible characters in the prompt string.  Let's see if setting this when
     
    82958487 #endif
    82968488 #endif
    8297 @@ -1506,11 +1522,31 @@
     8489@@ -1506,11 +1532,31 @@
    82988490     {
    82998491       /* Non-zero if we're increasing the number of lines. */
     
    83288520          /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and
    83298521             _rl_horizontal_scroll_mode == 1, inserting the characters with
    8330 @@ -1533,11 +1569,16 @@
     8522@@ -1533,11 +1579,16 @@
    83318523            }
    83328524          else
     
    83488540            }
    83498541          /* Copy (new) chars to screen from first diff to last match. */
    8350 @@ -1586,8 +1627,22 @@
     8542@@ -1545,15 +1596,15 @@
     8543          if ((temp - lendiff) > 0)
     8544            {
     8545              _rl_output_some_chars (nfd + lendiff, temp - lendiff);
     8546-#if 1
     8547             /* XXX -- this bears closer inspection.  Fixes a redisplay bug
     8548                reported against bash-3.0-alpha by Andreas Schwab involving
     8549                multibyte characters and prompt strings with invisible
     8550                characters, but was previously disabled. */
     8551-             _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
     8552-#else
     8553-             _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff);
     8554-#endif
     8555+             if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
     8556+               twidth = _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
     8557+             else
     8558+               twidth = temp - lendiff;
     8559+             _rl_last_c_pos += twidth;
     8560            }
     8561        }
     8562       else
     8563@@ -1586,8 +1637,22 @@
    83518564          temp = nls - nfd;
    83528565          if (temp > 0)
     
    83728585        }
    83738586       /* Otherwise, print over the existing material. */
    8374 @@ -1595,8 +1650,20 @@
     8587@@ -1595,8 +1660,20 @@
    83758588        {
    83768589          if (temp > 0)
     
    83938606          lendiff = (oe - old) - (ne - new);
    83948607          if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
    8395 @@ -1732,7 +1799,10 @@
     8608@@ -1721,7 +1798,7 @@
     8609   int woff;                    /* number of invisible chars on current line */
     8610   int cpos, dpos;              /* current and desired cursor positions */
     8611 
     8612-  woff = W_OFFSET (_rl_last_v_pos, wrap_offset);
     8613+  woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
     8614   cpos = _rl_last_c_pos;
     8615 #if defined (HANDLE_MULTIBYTE)
     8616   /* If we have multibyte characters, NEW is indexed by the buffer point in
     8617@@ -1732,7 +1809,14 @@
    83968618   if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
    83978619     {
     
    84018623+        prompt string, since they're both buffer indices and DPOS is a
    84028624+        desired display position. */
    8403 +      if (new > prompt_last_invisible)         /* XXX - don't use woff here */
     8625+      if ((new > prompt_last_invisible) ||             /* XXX - don't use woff here */
     8626+         (prompt_physical_chars > _rl_screenwidth &&
     8627+          _rl_last_v_pos == prompt_last_screen_line &&
     8628+          wrap_offset != woff &&
     8629+          new > (prompt_last_invisible-_rl_screenwidth-wrap_offset)))
    84048630        {
    84058631          dpos -= woff;
    84068632          /* Since this will be assigned to _rl_last_c_pos at the end (more
    8407 @@ -2380,6 +2450,8 @@
     8633@@ -2380,6 +2464,8 @@
    84088634 
    84098635   if (end <= start)
     
    84158641 
    84168642diff -Naur bash-3.2.orig/lib/readline/display.c.orig bash-3.2/lib/readline/display.c.orig
    8417 --- bash-3.2.orig/lib/readline/display.c.orig   1969-12-31 19:00:00.000000000 -0500
    8418 +++ bash-3.2/lib/readline/display.c.orig        2008-06-18 06:46:27.000000000 -0400
     8643--- bash-3.2.orig/lib/readline/display.c.orig   1969-12-31 16:00:00.000000000 -0800
     8644+++ bash-3.2/lib/readline/display.c.orig        2008-12-20 06:59:50.000000000 -0800
    84198645@@ -0,0 +1,2518 @@
    84208646+/* display.c -- readline redisplay facility. */
     
    1093711163+#endif /* HANDLE_MULTIBYTE */
    1093811164diff -Naur bash-3.2.orig/lib/readline/input.c bash-3.2/lib/readline/input.c
    10939 --- bash-3.2.orig/lib/readline/input.c  2006-08-16 15:15:16.000000000 -0400
    10940 +++ bash-3.2/lib/readline/input.c       2008-06-18 06:46:29.000000000 -0400
     11165--- bash-3.2.orig/lib/readline/input.c  2006-08-16 12:15:16.000000000 -0700
     11166+++ bash-3.2/lib/readline/input.c       2008-12-20 06:59:56.000000000 -0800
    1094111167@@ -133,8 +133,11 @@
    1094211168     return (0);
     
    1102311249       memset (&ps, 0, sizeof (mbstate_t));
    1102411250diff -Naur bash-3.2.orig/lib/readline/isearch.c bash-3.2/lib/readline/isearch.c
    11025 --- bash-3.2.orig/lib/readline/isearch.c        2005-12-26 17:18:53.000000000 -0500
    11026 +++ bash-3.2/lib/readline/isearch.c     2008-06-18 06:46:22.000000000 -0400
     11251--- bash-3.2.orig/lib/readline/isearch.c        2005-12-26 14:18:53.000000000 -0800
     11252+++ bash-3.2/lib/readline/isearch.c     2008-12-20 06:59:36.000000000 -0800
    1102711253@@ -327,8 +327,15 @@
    1102811254   rl_command_func_t *f;
     
    1104411270       f = _rl_keymap[c].function;
    1104511271diff -Naur bash-3.2.orig/lib/readline/misc.c bash-3.2/lib/readline/misc.c
    11046 --- bash-3.2.orig/lib/readline/misc.c   2005-12-26 17:20:46.000000000 -0500
    11047 +++ bash-3.2/lib/readline/misc.c        2008-06-18 06:46:22.000000000 -0400
     11272--- bash-3.2.orig/lib/readline/misc.c   2005-12-26 14:20:46.000000000 -0800
     11273+++ bash-3.2/lib/readline/misc.c        2008-12-20 06:59:36.000000000 -0800
    1104811274@@ -146,6 +146,8 @@
    1104911275          rl_restore_prompt ();
     
    1105611282     }
    1105711283diff -Naur bash-3.2.orig/lib/readline/readline.c bash-3.2/lib/readline/readline.c
    11058 --- bash-3.2.orig/lib/readline/readline.c       2006-08-16 15:00:36.000000000 -0400
    11059 +++ bash-3.2/lib/readline/readline.c    2008-06-18 06:46:22.000000000 -0400
     11284--- bash-3.2.orig/lib/readline/readline.c       2006-08-16 12:00:36.000000000 -0700
     11285+++ bash-3.2/lib/readline/readline.c    2008-12-20 06:59:36.000000000 -0800
    1106011286@@ -645,6 +645,11 @@
    1106111287   if ((cxt->flags & KSEQ_DISPATCHED) == 0)
     
    1107111297     }
    1107211298diff -Naur bash-3.2.orig/lib/readline/text.c bash-3.2/lib/readline/text.c
    11073 --- bash-3.2.orig/lib/readline/text.c   2006-07-28 11:55:27.000000000 -0400
    11074 +++ bash-3.2/lib/readline/text.c        2008-06-18 06:46:22.000000000 -0400
     11299--- bash-3.2.orig/lib/readline/text.c   2006-07-28 08:55:27.000000000 -0700
     11300+++ bash-3.2/lib/readline/text.c        2008-12-20 06:59:36.000000000 -0800
    1107511301@@ -857,6 +857,9 @@
    1107611302   c = rl_read_key ();
     
    1110411330   else
    1110511331diff -Naur bash-3.2.orig/lib/readline/vi_mode.c bash-3.2/lib/readline/vi_mode.c
    11106 --- bash-3.2.orig/lib/readline/vi_mode.c        2006-07-29 16:42:28.000000000 -0400
    11107 +++ bash-3.2/lib/readline/vi_mode.c     2008-06-18 06:46:22.000000000 -0400
     11332--- bash-3.2.orig/lib/readline/vi_mode.c        2006-07-29 13:42:28.000000000 -0700
     11333+++ bash-3.2/lib/readline/vi_mode.c     2008-12-20 06:59:36.000000000 -0800
    1110811334@@ -886,6 +886,13 @@
    1110911335   RL_SETSTATE(RL_STATE_MOREINPUT);
     
    1123411460       return -1;
    1123511461diff -Naur bash-3.2.orig/lib/sh/getcwd.c bash-3.2/lib/sh/getcwd.c
    11236 --- bash-3.2.orig/lib/sh/getcwd.c       2004-07-21 17:15:19.000000000 -0400
    11237 +++ bash-3.2/lib/sh/getcwd.c    2008-06-18 06:46:31.000000000 -0400
     11462--- bash-3.2.orig/lib/sh/getcwd.c       2004-07-21 14:15:19.000000000 -0700
     11463+++ bash-3.2/lib/sh/getcwd.c    2008-12-20 06:59:59.000000000 -0800
    1123811464@@ -251,19 +251,21 @@
    1123911465 
     
    1126711493 
    1126811494diff -Naur bash-3.2.orig/lib/sh/snprintf.c bash-3.2/lib/sh/snprintf.c
    11269 --- bash-3.2.orig/lib/sh/snprintf.c     2006-04-06 09:48:40.000000000 -0400
    11270 +++ bash-3.2/lib/sh/snprintf.c  2008-06-18 06:46:17.000000000 -0400
     11495--- bash-3.2.orig/lib/sh/snprintf.c     2006-04-06 06:48:40.000000000 -0700
     11496+++ bash-3.2/lib/sh/snprintf.c  2008-12-20 06:59:20.000000000 -0800
    1127111497@@ -471,6 +471,8 @@
    1127211498          10^x ~= r
     
    1139611622                 * is in the range or [-4,p] exclusively
    1139711623diff -Naur bash-3.2.orig/parse.y bash-3.2/parse.y
    11398 --- bash-3.2.orig/parse.y       2006-09-19 16:37:21.000000000 -0400
    11399 +++ bash-3.2/parse.y    2008-06-18 06:46:32.000000000 -0400
     11624--- bash-3.2.orig/parse.y       2006-09-19 13:37:21.000000000 -0700
     11625+++ bash-3.2/parse.y    2008-12-20 07:00:04.000000000 -0800
    1140011626@@ -1029,6 +1029,7 @@
    1140111627 #define PST_CMDTOKEN   0x1000          /* command token OK - unused */
     
    1152811754       dispose_words (list);
    1152911755diff -Naur bash-3.2.orig/patchlevel.h bash-3.2/patchlevel.h
    11530 --- bash-3.2.orig/patchlevel.h  2006-04-13 08:31:04.000000000 -0400
    11531 +++ bash-3.2/patchlevel.h       2008-06-18 06:46:33.000000000 -0400
     11756--- bash-3.2.orig/patchlevel.h  2006-04-13 05:31:04.000000000 -0700
     11757+++ bash-3.2/patchlevel.h       2008-12-20 07:00:21.000000000 -0800
    1153211758@@ -25,6 +25,6 @@
    1153311759    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
     
    1153511761 
    1153611762-#define PATCHLEVEL 0
    11537 +#define PATCHLEVEL 39
     11763+#define PATCHLEVEL 48
    1153811764 
    1153911765 #endif /* _PATCHLEVEL_H_ */
    1154011766diff -Naur bash-3.2.orig/pathexp.c bash-3.2/pathexp.c
    11541 --- bash-3.2.orig/pathexp.c     2002-05-06 13:43:05.000000000 -0400
    11542 +++ bash-3.2/pathexp.c  2008-06-18 06:46:17.000000000 -0400
     11767--- bash-3.2.orig/pathexp.c     2002-05-06 10:43:05.000000000 -0700
     11768+++ bash-3.2/pathexp.c  2008-12-20 06:59:21.000000000 -0800
    1154311769@@ -1,6 +1,6 @@
    1154411770 /* pathexp.c -- The shell interface to the globbing library. */
     
    1159311819          if (pathname[i] == '\0')
    1159411820diff -Naur bash-3.2.orig/pathexp.h bash-3.2/pathexp.h
    11595 --- bash-3.2.orig/pathexp.h     2005-02-19 17:23:18.000000000 -0500
    11596 +++ bash-3.2/pathexp.h  2008-06-18 06:46:17.000000000 -0400
     11821--- bash-3.2.orig/pathexp.h     2005-02-19 14:23:18.000000000 -0800
     11822+++ bash-3.2/pathexp.h  2008-12-20 06:59:21.000000000 -0800
    1159711823@@ -1,6 +1,6 @@
    1159811824 /* pathexp.h -- The shell interface to the globbing library. */
     
    1161211838 /* Flags to OR with other flag args to strmatch() to enabled the extended
    1161311839diff -Naur bash-3.2.orig/po/ru.po bash-3.2/po/ru.po
    11614 --- bash-3.2.orig/po/ru.po      2006-01-10 17:51:03.000000000 -0500
    11615 +++ bash-3.2/po/ru.po   2008-06-18 06:46:13.000000000 -0400
     11840--- bash-3.2.orig/po/ru.po      2006-01-10 14:51:03.000000000 -0800
     11841+++ bash-3.2/po/ru.po   2008-12-20 06:59:08.000000000 -0800
    1161611842@@ -12,7 +12,7 @@
    1161711843 "Last-Translator: Evgeniy Dushistov <dushistov@mail.ru>\n"
     
    1162411850 
    1162511851diff -Naur bash-3.2.orig/shell.h bash-3.2/shell.h
    11626 --- bash-3.2.orig/shell.h       2003-06-01 15:04:36.000000000 -0400
    11627 +++ bash-3.2/shell.h    2008-06-18 06:46:33.000000000 -0400
     11852--- bash-3.2.orig/shell.h       2003-06-01 12:04:36.000000000 -0700
     11853+++ bash-3.2/shell.h    2008-12-20 07:00:07.000000000 -0800
    1162811854@@ -89,6 +89,7 @@
    1162911855 extern int executing, login_shell;
     
    1163511861    to close, and the size of that structure.  Used in execute_cmd.c. */
    1163611862diff -Naur bash-3.2.orig/sig.c bash-3.2/sig.c
    11637 --- bash-3.2.orig/sig.c 2006-01-25 14:57:59.000000000 -0500
    11638 +++ bash-3.2/sig.c      2008-06-18 06:46:23.000000000 -0400
     11863--- bash-3.2.orig/sig.c 2006-01-25 11:57:59.000000000 -0800
     11864+++ bash-3.2/sig.c      2008-12-20 06:59:37.000000000 -0800
    1163911865@@ -350,6 +350,25 @@
    1164011866 #undef XSIG
     
    1166411890 throw_to_top_level ()
    1166511891diff -Naur bash-3.2.orig/sig.h bash-3.2/sig.h
    11666 --- bash-3.2.orig/sig.h 2006-01-25 14:50:27.000000000 -0500
    11667 +++ bash-3.2/sig.h      2008-06-18 06:46:23.000000000 -0400
     11892--- bash-3.2.orig/sig.h 2006-01-25 11:50:27.000000000 -0800
     11893+++ bash-3.2/sig.h      2008-12-20 06:59:37.000000000 -0800
    1166811894@@ -121,6 +121,7 @@
    1166911895 extern void initialize_signals __P((int));
     
    1167511901 
    1167611902diff -Naur bash-3.2.orig/subst.c bash-3.2/subst.c
    11677 --- bash-3.2.orig/subst.c       2006-09-19 08:35:09.000000000 -0400
    11678 +++ bash-3.2/subst.c    2008-06-18 06:46:32.000000000 -0400
     11903--- bash-3.2.orig/subst.c       2006-09-19 05:35:09.000000000 -0700
     11904+++ bash-3.2/subst.c    2008-12-20 07:00:19.000000000 -0800
    1167911905@@ -4,7 +4,7 @@
    1168011906 /* ``Have a little faith, there's magic in the night.  You ain't a
     
    1168611912    This file is part of GNU Bash, the Bourne Again SHell.
    1168711913 
     11914@@ -137,7 +137,7 @@
     11915 /* Extern functions and variables from different files. */
     11916 extern int last_command_exit_value, last_command_exit_signal;
     11917 extern int subshell_environment;
     11918-extern int subshell_level;
     11919+extern int subshell_level, parse_and_execute_level;
     11920 extern int eof_encountered;
     11921 extern int return_catch_flag, return_catch_value;
     11922 extern pid_t dollar_dollar_pid;
    1168811923@@ -1278,7 +1278,7 @@
    1168911924     {
     
    1189912134     }
    1190012135   else
     12136@@ -4763,7 +4812,7 @@
     12137   else
     12138     t = (ind == 0) ? value_cell (var) : (char *)NULL;
     12139 
     12140-  len = STRLEN (t);
     12141+  len = MB_STRLEN (t);
     12142   return (len);
     12143 }
     12144 #endif /* ARRAY_VARS */
    1190112145@@ -4860,10 +4909,11 @@
    1190212146   char *temp, *tt;
     
    1199412238 #endif
    1199512239     }
    11996 @@ -7607,6 +7672,8 @@
     12240@@ -7607,6 +7672,10 @@
    1199712241   expand_no_split_dollar_star = 0;     /* XXX */
    1199812242   expanding_redir = 0;
    1199912243 
    12000 +  top_level_cleanup ();                        /* from sig.c */
     12244+  if (parse_and_execute_level == 0)
     12245+    top_level_cleanup ();                      /* from sig.c */
     12246+
    1200112247+
    1200212248   jump_to_top_level (v);
    1200312249 }
    1200412250 
    12005 @@ -7824,7 +7891,7 @@
     12251@@ -7824,7 +7893,7 @@
    1200612252          else if (fail_glob_expansion != 0)
    1200712253            {
     
    1201312259            {
    1201412260diff -Naur bash-3.2.orig/subst.h bash-3.2/subst.h
    12015 --- bash-3.2.orig/subst.h       2006-09-19 08:34:41.000000000 -0400
    12016 +++ bash-3.2/subst.h    2008-06-18 06:46:32.000000000 -0400
     12261--- bash-3.2.orig/subst.h       2006-09-19 05:34:41.000000000 -0700
     12262+++ bash-3.2/subst.h    2008-12-20 07:00:04.000000000 -0800
    1201712263@@ -135,7 +135,7 @@
    1201812264 extern WORD_LIST *expand_string_assignment __P((char *, int));
     
    1203312279 extern WORD_LIST *list_string_with_quotes __P((char *));
    1203412280diff -Naur bash-3.2.orig/tests/new-exp.right bash-3.2/tests/new-exp.right
    12035 --- bash-3.2.orig/tests/new-exp.right   2006-08-10 12:00:00.000000000 -0400
    12036 +++ bash-3.2/tests/new-exp.right        2008-06-18 06:46:14.000000000 -0400
     12281--- bash-3.2.orig/tests/new-exp.right   2006-08-10 09:00:00.000000000 -0700
     12282+++ bash-3.2/tests/new-exp.right        2008-12-20 06:59:12.000000000 -0800
    1203712283@@ -430,7 +430,7 @@
    1203812284 Case06---1---A B C::---
     
    1204512291 argv[3] = <c>
    1204612292diff -Naur bash-3.2.orig/tests/shopt.right bash-3.2/tests/shopt.right
    12047 --- bash-3.2.orig/tests/shopt.right     2005-02-19 17:46:09.000000000 -0500
    12048 +++ bash-3.2/tests/shopt.right  2008-06-18 06:46:33.000000000 -0400
     12293--- bash-3.2.orig/tests/shopt.right     2005-02-19 14:46:09.000000000 -0800
     12294+++ bash-3.2/tests/shopt.right  2008-12-20 07:00:07.000000000 -0800
    1204912295@@ -6,6 +6,7 @@
    1205012296 shopt -u checkhash
     
    1207212318 extdebug               off
    1207312319diff -Naur bash-3.2.orig/variables.c bash-3.2/variables.c
    12074 --- bash-3.2.orig/variables.c   2006-09-08 13:33:32.000000000 -0400
    12075 +++ bash-3.2/variables.c        2008-06-18 06:46:23.000000000 -0400
     12320--- bash-3.2.orig/variables.c   2006-09-08 10:33:32.000000000 -0700
     12321+++ bash-3.2/variables.c        2008-12-20 07:00:13.000000000 -0800
    1207612322@@ -1821,11 +1821,17 @@
    1207712323          oval = value_cell (var);
     
    1209412340        rval += lval;
    1209512341       retval = itos (rval);
     12342@@ -3452,9 +3458,11 @@
     12343       if (shell_variables == global_variables)
     12344        var->attributes &= ~(att_tempvar|att_propagate);
     12345       else
     12346-        shell_variables->flags |= VC_HASTMPVAR;
     12347+       shell_variables->flags |= VC_HASTMPVAR;
     12348       v->attributes |= var->attributes;
     12349     }
     12350+  else
     12351+    stupidly_hack_special_variables (var->name);       /* XXX */
     12352 
     12353   dispose_variable (var);
     12354 }
     12355@@ -3541,6 +3549,8 @@
     12356        var->attributes &= ~att_propagate;
     12357       v->attributes |= var->attributes;
     12358     }
     12359+  else
     12360+    stupidly_hack_special_variables (var->name);       /* XXX */
     12361 
     12362   dispose_variable (var);
     12363 }
    1209612364diff -Naur bash-3.2.orig/version.c bash-3.2/version.c
    12097 --- bash-3.2.orig/version.c     2005-05-16 11:58:34.000000000 -0400
    12098 +++ bash-3.2/version.c  2008-06-18 06:46:33.000000000 -0400
     12365--- bash-3.2.orig/version.c     2005-05-16 08:58:34.000000000 -0700
     12366+++ bash-3.2/version.c  2008-12-20 07:00:07.000000000 -0800
    1209912367@@ -43,6 +43,9 @@
    1210012368 #endif
Note: See TracChangeset for help on using the changeset viewer.