Changeset 140d857


Ignore:
Timestamp:
May 24, 2009, 9:15:52 AM (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:
d8c43c9
Parents:
9bf6f51
Message:

Updated Bash Update Patch to 5

Files:
2 edited
1 moved

Legend:

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

    r9bf6f51 r140d857  
    3636    </listitem>
    3737-->
     38
     39    <listitem>
     40      <para>May 24, 2009</para>
     41      <itemizedlist>
     42        <listitem>
     43          <para>[Jim] - Updated Bash Update Patch to 5.</para>
     44        </listitem>
     45      </itemizedlist>
     46    </listitem>
    3847
    3948    <listitem>
  • BOOK/patches.ent

    r9bf6f51 r140d857  
    55<!-- Start of Common Patches -->
    66
    7 <!ENTITY bash-branch_update-patch "bash-&bash-version;-branch_update-4.patch">
    8 <!ENTITY bash-branch_update-patch-md5 "25ff4f245e33902252f7dc97ae04c119">
    9 <!ENTITY bash-branch_update-patch-size "24 KB">
     7<!ENTITY bash-branch_update-patch "bash-&bash-version;-branch_update-5.patch">
     8<!ENTITY bash-branch_update-patch-md5 "4368e89023965440428419a626a902f6">
     9<!ENTITY bash-branch_update-patch-size "34 KB">
    1010
    1111<!ENTITY binutils-branch_update-patch "binutils-&binutils-version;-branch_update-1.patch">
  • patches/bash-4.0-branch_update-5.patch

    r9bf6f51 r140d857  
    11Submitted By: Jim Gifford (jim at cross-lfs dot org)
    2 Date: 04-09-2009
     2Date: 05-24-2009
    33Initial Package Version: 4.0
    44Origin: Upstream
    55Upstream Status: Applied
    6 Description: Contains all upstream patches up to 4.0-017
     6Description: Contains all upstream patches up to 4.0-024
    77
    88diff -Naur bash-4.0.orig/arrayfunc.c bash-4.0/arrayfunc.c
    99--- bash-4.0.orig/arrayfunc.c   2009-01-04 11:32:21.000000000 -0800
    10 +++ bash-4.0/arrayfunc.c        2009-04-09 22:09:24.500045537 -0700
     10+++ bash-4.0/arrayfunc.c        2009-05-24 09:14:10.000000000 -0700
    1111@@ -604,64 +604,7 @@
    1212     }
     
    7777diff -Naur bash-4.0.orig/builtins/declare.def bash-4.0/builtins/declare.def
    7878--- bash-4.0.orig/builtins/declare.def  2009-01-04 11:32:22.000000000 -0800
    79 +++ bash-4.0/builtins/declare.def       2009-04-09 22:09:21.747868696 -0700
     79+++ bash-4.0/builtins/declare.def       2009-05-24 09:14:07.000000000 -0700
    8080@@ -295,6 +295,13 @@
    8181       subscript_start = (char *)NULL;
     
    103103diff -Naur bash-4.0.orig/builtins/exit.def bash-4.0/builtins/exit.def
    104104--- bash-4.0.orig/builtins/exit.def     2009-01-04 11:32:22.000000000 -0800
    105 +++ bash-4.0/builtins/exit.def  2009-04-09 22:09:20.423784047 -0700
     105+++ bash-4.0/builtins/exit.def  2009-05-24 09:14:06.000000000 -0700
    106106@@ -113,7 +113,7 @@
    107107       for (i = stopmsg = 0; i < js.j_jobslots; i++)
     
    115115diff -Naur bash-4.0.orig/builtins/fc.def bash-4.0/builtins/fc.def
    116116--- bash-4.0.orig/builtins/fc.def       2009-01-04 11:32:22.000000000 -0800
    117 +++ bash-4.0/builtins/fc.def    2009-04-09 22:09:34.484684732 -0700
     117+++ bash-4.0/builtins/fc.def    2009-05-24 09:14:20.000000000 -0700
    118118@@ -88,6 +88,7 @@
    119119 extern int current_command_line_count;
     
    181181diff -Naur bash-4.0.orig/builtins/read.def bash-4.0/builtins/read.def
    182182--- bash-4.0.orig/builtins/read.def     2009-01-15 20:11:21.000000000 -0800
    183 +++ bash-4.0/builtins/read.def  2009-04-09 22:09:27.380229641 -0700
     183+++ bash-4.0/builtins/read.def  2009-05-24 09:14:13.000000000 -0700
    184184@@ -369,14 +369,14 @@
    185185       code = setjmp (alrmbuf);
     
    204204diff -Naur bash-4.0.orig/execute_cmd.c bash-4.0/execute_cmd.c
    205205--- bash-4.0.orig/execute_cmd.c 2009-02-13 13:41:41.000000000 -0800
    206 +++ bash-4.0/execute_cmd.c      2009-04-09 22:09:37.908905992 -0700
     206+++ bash-4.0/execute_cmd.c      2009-05-24 09:14:23.000000000 -0700
    207207@@ -568,6 +568,7 @@
    208208 
     
    268268              else
    269269                break;
     270diff -Naur bash-4.0.orig/jobs.c bash-4.0/jobs.c
     271--- bash-4.0.orig/jobs.c        2009-01-29 14:09:49.000000000 -0800
     272+++ bash-4.0/jobs.c     2009-05-24 09:14:28.000000000 -0700
     273@@ -442,7 +442,7 @@
     274   old_pipeline = the_pipeline;
     275   the_pipeline = saved_pipeline;
     276   already_making_children = saved_already_making_children;
     277-  if (discard)
     278+  if (discard && old_pipeline)
     279     discard_pipeline (old_pipeline);
     280 }
     281 
     282@@ -4202,4 +4202,23 @@
     283   sh_closepipe (pgrp_pipe);
     284 }
     285 
     286+void
     287+save_pgrp_pipe (p, clear)
     288+     int *p;
     289+     int clear;
     290+{
     291+  p[0] = pgrp_pipe[0];
     292+  p[1] = pgrp_pipe[1];
     293+  if (clear)
     294+    pgrp_pipe[0] = pgrp_pipe[1] = -1;
     295+}
     296+
     297+void
     298+restore_pgrp_pipe (p)
     299+     int *p;
     300+{
     301+  pgrp_pipe[0] = p[0];
     302+  pgrp_pipe[1] = p[1];
     303+}
     304+
     305 #endif /* PGRP_PIPE */
     306diff -Naur bash-4.0.orig/jobs.h bash-4.0/jobs.h
     307--- bash-4.0.orig/jobs.h        2009-01-04 11:32:29.000000000 -0800
     308+++ bash-4.0/jobs.h     2009-05-24 09:14:28.000000000 -0700
     309@@ -235,6 +235,8 @@
     310 extern void init_job_stats __P((void));
     311 
     312 extern void close_pgrp_pipe __P((void));
     313+extern void save_pgrp_pipe __P((int *, int));
     314+extern void restore_pgrp_pipe __P((int *));
     315 
     316 #if defined (JOB_CONTROL)
     317 extern int job_control;
     318diff -Naur bash-4.0.orig/lib/glob/glob.c bash-4.0/lib/glob/glob.c
     319--- bash-4.0.orig/lib/glob/glob.c       2009-01-04 11:32:30.000000000 -0800
     320+++ bash-4.0/lib/glob/glob.c    2009-05-24 09:14:36.000000000 -0700
     321@@ -356,7 +356,7 @@
     322        *np = 0;
     323       if (ep)
     324         *ep = 0;
     325-      if (r)
     326+      if (r && r != &glob_error_return)
     327        free (r);
     328       return (struct globval *)0;
     329     }
     330@@ -665,8 +665,9 @@
     331       (void) closedir (d);
     332     }
     333 
     334-  /* compat: if GX_ALLDIRS, add the passed directory also */
     335-  if (add_current)
     336+  /* compat: if GX_ALLDIRS, add the passed directory also, but don't add an
     337+     empty directory name. */
     338+  if (add_current && (flags & GX_NULLDIR) == 0)
     339     {
     340       sdlen = strlen (dir);
     341       nextname = (char *)malloc (sdlen + 1);
     342@@ -678,10 +679,7 @@
     343          nextlink->name = nextname;
     344          nextlink->next = lastlink;
     345          lastlink = nextlink;
     346-         if (flags & GX_NULLDIR)
     347-           nextname[0] = '\0';
     348-         else
     349-           bcopy (dir, nextname, sdlen + 1);
     350+         bcopy (dir, nextname, sdlen + 1);
     351          ++count;
     352        }
     353     }
     354@@ -942,7 +940,12 @@
     355              char **array;
     356              register unsigned int l;
     357 
     358-             array = glob_dir_to_array (directories[i], temp_results, flags);
     359+             /* If we're expanding **, we don't need to glue the directory
     360+                name to the results; we've already done it in glob_vector */
     361+             if ((dflags & GX_ALLDIRS) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
     362+               array = temp_results;
     363+             else
     364+               array = glob_dir_to_array (directories[i], temp_results, flags);
     365              l = 0;
     366              while (array[l] != NULL)
     367                ++l;
     368@@ -959,7 +962,8 @@
     369              result[result_size - 1] = NULL;
     370 
     371              /* Note that the elements of ARRAY are not freed.  */
     372-             free ((char *) array);
     373+             if (array != temp_results)
     374+               free ((char *) array);
     375            }
     376        }
     377       /* Free the directories.  */
     378diff -Naur bash-4.0.orig/lib/readline/display.c bash-4.0/lib/readline/display.c
     379--- bash-4.0.orig/lib/readline/display.c        2009-01-04 11:32:32.000000000 -0800
     380+++ bash-4.0/lib/readline/display.c     2009-05-24 09:14:34.000000000 -0700
     381@@ -512,6 +512,7 @@
     382   /* Block keyboard interrupts because this function manipulates global
     383      data structures. */
     384   _rl_block_sigint (); 
     385+  RL_SETSTATE (RL_STATE_REDISPLAYING);
     386 
     387   if (!rl_display_prompt)
     388     rl_display_prompt = "";
     389@@ -1236,6 +1237,7 @@
     390       visible_wrap_offset = wrap_offset;
     391   }
     392 
     393+  RL_UNSETSTATE (RL_STATE_REDISPLAYING);
     394   _rl_release_sigint ();
     395 }
     396 
     397@@ -1772,7 +1774,7 @@
     398             space_to_eol will insert too many spaces.  XXX - maybe we should
     399             adjust col_lendiff based on the difference between _rl_last_c_pos
     400             and _rl_screenwidth */
     401-         if (col_lendiff && (_rl_last_c_pos < _rl_screenwidth))
     402+         if (col_lendiff && ((MB_CUR_MAX == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth)))
     403 #endif
     404            {     
     405              if (_rl_term_autowrap && current_line < inv_botlin)
     406@@ -1892,6 +1894,10 @@
     407 
     408   woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
     409   cpos = _rl_last_c_pos;
     410+
     411+  if (cpos == 0 && cpos == new)
     412+    return;
     413+
     414 #if defined (HANDLE_MULTIBYTE)
     415   /* If we have multibyte characters, NEW is indexed by the buffer point in
     416      a multibyte string, but _rl_last_c_pos is the display position.  In
     417@@ -1905,9 +1911,9 @@
     418         prompt string, since they're both buffer indices and DPOS is a
     419         desired display position. */
     420       if ((new > prompt_last_invisible) ||             /* XXX - don't use woff here */
     421-         (prompt_physical_chars > _rl_screenwidth &&
     422+         (prompt_physical_chars >= _rl_screenwidth &&
     423           _rl_last_v_pos == prompt_last_screen_line &&
     424-          wrap_offset >= woff &&
     425+          wrap_offset >= woff && dpos >= woff &&
     426           new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
     427           /* XXX last comparison might need to be >= */
     428        {
     429diff -Naur bash-4.0.orig/lib/readline/readline.h bash-4.0/lib/readline/readline.h
     430--- bash-4.0.orig/lib/readline/readline.h       2009-01-04 11:32:33.000000000 -0800
     431+++ bash-4.0/lib/readline/readline.h    2009-05-24 09:14:30.000000000 -0700
     432@@ -814,8 +814,9 @@
     433 #define RL_STATE_VIMOTION      0x100000        /* reading vi motion arg */
     434 #define RL_STATE_MULTIKEY      0x200000        /* reading multiple-key command */
     435 #define RL_STATE_VICMDONCE     0x400000        /* entered vi command mode at least once */
     436+#define RL_STATE_REDISPLAYING  0x800000        /* updating terminal display */
     437 
     438-#define RL_STATE_DONE          0x800000        /* done; accepted line */
     439+#define RL_STATE_DONE          0x1000000       /* done; accepted line */
     440 
     441 #define RL_SETSTATE(x)         (rl_readline_state |= (x))
     442 #define RL_UNSETSTATE(x)       (rl_readline_state &= ~(x))
     443diff -Naur bash-4.0.orig/lib/readline/terminal.c bash-4.0/lib/readline/terminal.c
     444--- bash-4.0.orig/lib/readline/terminal.c       2009-01-04 11:32:34.000000000 -0800
     445+++ bash-4.0/lib/readline/terminal.c    2009-05-24 09:14:30.000000000 -0700
     446@@ -355,7 +355,7 @@
     447       _rl_get_screen_size (fileno (rl_instream), 1);
     448       if (CUSTOM_REDISPLAY_FUNC ())
     449        rl_forced_update_display ();
     450-      else
     451+      else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0)
     452        _rl_redisplay_after_sigwinch ();
     453     }
     454 }
     455diff -Naur bash-4.0.orig/lib/sh/winsize.c bash-4.0/lib/sh/winsize.c
     456--- bash-4.0.orig/lib/sh/winsize.c      2008-08-12 10:53:51.000000000 -0700
     457+++ bash-4.0/lib/sh/winsize.c   2009-05-24 09:14:27.000000000 -0700
     458@@ -30,16 +30,29 @@
     459 
     460 #include <sys/ioctl.h>
     461 
     462-#if !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
     463-/* For struct winsize on SCO */
     464-/*   sys/ptem.h has winsize but needs mblk_t from sys/stream.h */
     465-#  if defined (HAVE_SYS_PTEM_H) && defined (TIOCGWINSZ) && defined (SIGWINCH)
     466-#    if defined (HAVE_SYS_STREAM_H)
     467-#      include <sys/stream.h>
     468-#    endif
     469+/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */
     470+
     471+#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ)
     472+#  include <sys/ioctl.h>
     473+#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */
     474+
     475+#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
     476+#  include <termios.h>
     477+#endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
     478+
     479+/* Not in either of the standard places, look around. */
     480+#if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
     481+#  if defined (HAVE_SYS_STREAM_H)
     482+#    include <sys/stream.h>
     483+#  endif /* HAVE_SYS_STREAM_H */
     484+#  if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */
     485 #    include <sys/ptem.h>
     486-#  endif /* HAVE_SYS_PTEM_H && TIOCGWINSZ && SIGWINCH */
     487-#endif /* !STRUCT_WINSIZE_IN_SYS_IOCTL */
     488+#    define _IO_PTEM_H          /* work around SVR4.2 1.1.4 bug */
     489+#  endif /* HAVE_SYS_PTEM_H */
     490+#  if defined (HAVE_SYS_PTE_H)  /* ??? */
     491+#    include <sys/pte.h>
     492+#  endif /* HAVE_SYS_PTE_H */
     493+#endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
     494 
     495 #include <stdio.h>
     496 
    270497diff -Naur bash-4.0.orig/parse.y bash-4.0/parse.y
    271498--- bash-4.0.orig/parse.y       2009-01-08 05:29:12.000000000 -0800
    272 +++ bash-4.0/parse.y    2009-04-09 22:09:39.212989803 -0700
     499+++ bash-4.0/parse.y    2009-05-24 09:14:32.000000000 -0700
    273500@@ -1122,7 +1122,7 @@
    274501                          REDIRECTEE rd;
     
    416643       if MBTEST(shellblank (ch) && lex_rwlen == 0)
    417644         {
     645@@ -3306,7 +3354,7 @@
     646        }
     647 
     648       /* Meta-characters that can introduce a reserved word.  Not perfect yet. */
     649-      if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && shellmeta(ch))
     650+      if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && (shellmeta(ch) || ch == '\n'))
     651        {
     652          /* Add this character. */
     653          RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
    418654@@ -3364,9 +3412,21 @@
    419655 }             
     
    507743diff -Naur bash-4.0.orig/patchlevel.h bash-4.0/patchlevel.h
    508744--- bash-4.0.orig/patchlevel.h  2009-01-04 11:32:40.000000000 -0800
    509 +++ bash-4.0/patchlevel.h       2009-04-09 22:09:39.212989803 -0700
     745+++ bash-4.0/patchlevel.h       2009-05-24 09:14:36.000000000 -0700
    510746@@ -25,6 +25,6 @@
    511747    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
     
    513749 
    514750-#define PATCHLEVEL 0
    515 +#define PATCHLEVEL 17
     751+#define PATCHLEVEL 24
    516752 
    517753 #endif /* _PATCHLEVEL_H_ */
    518754diff -Naur bash-4.0.orig/pcomplete.c bash-4.0/pcomplete.c
    519755--- bash-4.0.orig/pcomplete.c   2009-02-01 14:12:31.000000000 -0800
    520 +++ bash-4.0/pcomplete.c        2009-04-09 22:09:17.783614750 -0700
     756+++ bash-4.0/pcomplete.c        2009-05-24 09:14:02.000000000 -0700
    521757@@ -1032,6 +1032,7 @@
    522758   cmdlist = build_arg_list (funcname, text, lwords, cw);
     
    529765diff -Naur bash-4.0.orig/sig.c bash-4.0/sig.c
    530766--- bash-4.0.orig/sig.c 2009-01-04 11:32:41.000000000 -0800
    531 +++ bash-4.0/sig.c      2009-04-09 22:09:36.612821343 -0700
     767+++ bash-4.0/sig.c      2009-05-24 09:14:22.000000000 -0700
    532768@@ -448,6 +448,48 @@
    533769 termsig_sighandler (sig)
     
    581817diff -Naur bash-4.0.orig/subst.c bash-4.0/subst.c
    582818--- bash-4.0.orig/subst.c       2009-01-28 11:34:12.000000000 -0800
    583 +++ bash-4.0/subst.c    2009-04-09 22:09:33.024593378 -0700
     819+++ bash-4.0/subst.c    2009-05-24 09:14:19.000000000 -0700
    584820@@ -85,6 +85,7 @@
    585821 
     
    7831019diff -Naur bash-4.0.orig/trap.c bash-4.0/trap.c
    7841020--- bash-4.0.orig/trap.c        2009-01-16 14:07:53.000000000 -0800
    785 +++ bash-4.0/trap.c     2009-04-09 22:09:37.908905992 -0700
     1021+++ bash-4.0/trap.c     2009-05-24 09:14:28.000000000 -0700
    7861022@@ -755,7 +755,7 @@
    7871023        }
     
    7931029       if (function_code == 0)
    7941030        parse_and_execute (trap_command, tag, flags);
     1031@@ -798,12 +798,36 @@
     1032 run_debug_trap ()
     1033 {
     1034   int trap_exit_value;
     1035+  pid_t save_pgrp;
     1036+  int save_pipe[2];
     1037 
     1038   /* XXX - question:  should the DEBUG trap inherit the RETURN trap? */
     1039   trap_exit_value = 0;
     1040   if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED) && ((sigmodes[DEBUG_TRAP] & SIG_IGNORED) == 0) && ((sigmodes[DEBUG_TRAP] & SIG_INPROGRESS) == 0))
     1041     {
     1042+#if defined (JOB_CONTROL)
     1043+      save_pgrp = pipeline_pgrp;
     1044+      pipeline_pgrp = 0;
     1045+      save_pipeline (1);
     1046+#  if defined (PGRP_PIPE)
     1047+      save_pgrp_pipe (save_pipe, 1);
     1048+#  endif
     1049+      stop_making_children ();
     1050+#endif
     1051+
     1052       trap_exit_value = _run_trap_internal (DEBUG_TRAP, "debug trap");
     1053+
     1054+#if defined (JOB_CONTROL)
     1055+      pipeline_pgrp = save_pgrp;
     1056+      restore_pipeline (1);
     1057+#  if defined (PGRP_PIPE)
     1058+      close_pgrp_pipe ();
     1059+      restore_pgrp_pipe (save_pipe);
     1060+#  endif
     1061+      if (pipeline_pgrp > 0)
     1062+       give_terminal_to (pipeline_pgrp, 1);
     1063+      notify_and_cleanup ();
     1064+#endif
     1065       
     1066 #if defined (DEBUGGER)
     1067       /* If we're in the debugger and the DEBUG trap returns 2 while we're in
Note: See TracChangeset for help on using the changeset viewer.