Changeset e80ea72 for patches


Ignore:
Timestamp:
Jul 21, 2012, 8:38:41 PM (10 years ago)
Author:
William Harrington <kb0iic@…>
Branches:
clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
c1c44b9
Parents:
2538f4d
Message:

Update bash 4.2 to patch level 37.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • patches/bash-4.2-branch_update-5.patch

    r2538f4d re80ea72  
    1 Submitted By: Jonathan Norman (jonathan at bluesquarelinux.co.uk)
    2 Date: 06-03-2012
    3 Initial Package Version: 4.2
    4 Origin: Upstream
    5 Upstream Status: Applied
    6 Description: Contains all upstream patches up to 4.2-029
    7 
    81diff -Naur bash-4.2.orig/assoc.c bash-4.2/assoc.c
    92--- bash-4.2.orig/assoc.c       2009-08-06 00:19:40.000000000 +0000
    10 +++ bash-4.2/assoc.c    2012-06-03 18:59:11.431067287 +0000
     3+++ bash-4.2/assoc.c    2012-07-20 20:30:10.654261541 +0000
    114@@ -77,6 +77,11 @@
    125   b = hash_search (key, hash, HASH_CREATE);
     
    2316diff -Naur bash-4.2.orig/bashline.c bash-4.2/bashline.c
    2417--- bash-4.2.orig/bashline.c    2011-01-16 20:32:47.000000000 +0000
    25 +++ bash-4.2/bashline.c 2012-06-03 18:59:34.467691069 +0000
     18+++ bash-4.2/bashline.c 2012-07-20 20:30:11.070928530 +0000
    2619@@ -121,6 +121,9 @@
    2720 static int filename_completion_ignore __P((char **));
     
    309302diff -Naur bash-4.2.orig/bashline.h bash-4.2/bashline.h
    310303--- bash-4.2.orig/bashline.h    2009-01-04 19:32:22.000000000 +0000
    311 +++ bash-4.2/bashline.h 2012-06-03 18:59:34.467691069 +0000
     304+++ bash-4.2/bashline.h 2012-07-20 20:30:11.070928530 +0000
    312305@@ -33,10 +33,15 @@
    313306 extern void bashline_reinitialize __P((void));
     
    328321diff -Naur bash-4.2.orig/builtins/declare.def bash-4.2/builtins/declare.def
    329322--- bash-4.2.orig/builtins/declare.def  2010-05-30 22:25:21.000000000 +0000
    330 +++ bash-4.2/builtins/declare.def       2012-06-03 18:59:21.655344143 +0000
     323+++ bash-4.2/builtins/declare.def       2012-07-20 20:30:10.947595101 +0000
    331324@@ -513,6 +513,11 @@
    332325              *subscript_start = '[';   /* ] */
     
    343336diff -Naur bash-4.2.orig/builtins/fc.def bash-4.2/builtins/fc.def
    344337--- bash-4.2.orig/builtins/fc.def       2010-05-30 22:25:38.000000000 +0000
    345 +++ bash-4.2/builtins/fc.def    2012-06-03 18:59:08.910999047 +0000
     338+++ bash-4.2/builtins/fc.def    2012-07-20 20:30:10.624261519 +0000
    346339@@ -304,7 +304,7 @@
    347340   last_hist = i - rh - hist_last_line_added;
     
    379372   /* No specification defaults to most recent command. */
    380373   if (command == NULL)
     374diff -Naur bash-4.2.orig/builtins/mapfile.def bash-4.2/builtins/mapfile.def
     375--- bash-4.2.orig/builtins/mapfile.def  2010-05-30 02:09:47.000000000 +0000
     376+++ bash-4.2/builtins/mapfile.def       2012-07-20 20:30:11.190928623 +0000
     377@@ -195,13 +195,9 @@
     378   /* Reset the buffer for bash own stream */
     379   interrupt_immediately++;
     380   for (array_index = origin, line_count = 1;
     381-       zgetline (fd, &line, &line_length, unbuffered_read) != -1;
     382-       array_index++, line_count++)
     383+       zgetline (fd, &line, &line_length, unbuffered_read) != -1;
     384+       array_index++)
     385     {
     386-      /* Have we exceeded # of lines to store? */
     387-      if (line_count_goal != 0 && line_count > line_count_goal)
     388-       break;
     389-
     390       /* Remove trailing newlines? */
     391       if (flags & MAPF_CHOP)
     392        do_chop (line);
     393@@ -217,6 +213,11 @@
     394        }
     395 
     396       bind_array_element (entry, array_index, line, 0);
     397+
     398+      /* Have we exceeded # of lines to store? */
     399+      line_count++;
     400+      if (line_count_goal != 0 && line_count > line_count_goal)
     401+       break;
     402     }
     403 
     404   xfree (line);
    381405diff -Naur bash-4.2.orig/builtins/printf.def bash-4.2/builtins/printf.def
    382406--- bash-4.2.orig/builtins/printf.def   2010-11-23 15:02:55.000000000 +0000
    383 +++ bash-4.2/builtins/printf.def        2012-06-03 18:59:27.971515171 +0000
     407+++ bash-4.2/builtins/printf.def        2012-07-20 20:30:10.980928461 +0000
    384408@@ -255,6 +255,8 @@
    385409 #endif
     
    403427diff -Naur bash-4.2.orig/builtins/read.def bash-4.2/builtins/read.def
    404428--- bash-4.2.orig/builtins/read.def     2011-01-04 16:43:36.000000000 +0000
    405 +++ bash-4.2/builtins/read.def  2012-06-03 18:59:24.187412704 +0000
     429+++ bash-4.2/builtins/read.def  2012-07-20 20:30:10.957595109 +0000
    406430@@ -642,6 +642,12 @@
    407431          xfree (input_string);
     
    437461diff -Naur bash-4.2.orig/builtins/shopt.def bash-4.2/builtins/shopt.def
    438462--- bash-4.2.orig/builtins/shopt.def    2010-07-03 02:42:44.000000000 +0000
    439 +++ bash-4.2/builtins/shopt.def 2012-06-03 18:59:34.467691069 +0000
     463+++ bash-4.2/builtins/shopt.def 2012-07-20 20:30:11.070928530 +0000
    440464@@ -61,6 +61,10 @@
    441465 #include "common.h"
     
    497521diff -Naur bash-4.2.orig/command.h bash-4.2/command.h
    498522--- bash-4.2.orig/command.h     2010-08-02 23:36:51.000000000 +0000
    499 +++ bash-4.2/command.h  2012-06-03 18:59:29.227549180 +0000
     523+++ bash-4.2/command.h  2012-07-20 20:30:11.004261811 +0000
    500524@@ -97,6 +97,7 @@
    501525 #define W_HASCTLESC    0x200000        /* word contains literal CTLESC characters */
     
    508532diff -Naur bash-4.2.orig/doc/bash.1 bash-4.2/doc/bash.1
    509533--- bash-4.2.orig/doc/bash.1    2011-01-16 20:31:39.000000000 +0000
    510 +++ bash-4.2/doc/bash.1 2012-06-03 18:59:34.471691177 +0000
     534+++ bash-4.2/doc/bash.1 2012-07-20 20:30:11.077595201 +0000
    511535@@ -8948,6 +8948,16 @@
    512536 quoted.  This is the behavior of posix mode through version 4.1.
     
    528552diff -Naur bash-4.2.orig/doc/bashref.texi bash-4.2/doc/bashref.texi
    529553--- bash-4.2.orig/doc/bashref.texi      2011-01-16 20:31:57.000000000 +0000
    530 +++ bash-4.2/doc/bashref.texi   2012-06-03 18:59:34.475691285 +0000
     554+++ bash-4.2/doc/bashref.texi   2012-07-20 20:30:11.084261873 +0000
    531555@@ -4535,6 +4535,13 @@
    532556 quoted.  This is the behavior of @sc{posix} mode through version 4.1.
     
    545569diff -Naur bash-4.2.orig/error.c bash-4.2/error.c
    546570--- bash-4.2.orig/error.c       2009-08-22 02:31:31.000000000 +0000
    547 +++ bash-4.2/error.c    2012-06-03 18:59:26.707480942 +0000
     571+++ bash-4.2/error.c    2012-07-20 20:30:10.974261789 +0000
    548572@@ -200,7 +200,11 @@
    549573 
     
    561585diff -Naur bash-4.2.orig/execute_cmd.c bash-4.2/execute_cmd.c
    562586--- bash-4.2.orig/execute_cmd.c 2011-02-09 22:32:25.000000000 +0000
    563 +++ bash-4.2/execute_cmd.c      2012-06-03 18:59:30.491583407 +0000
     587+++ bash-4.2/execute_cmd.c      2012-07-20 20:30:11.024261827 +0000
    564588@@ -2196,6 +2196,7 @@
    565589   if (ignore_return && cmd)
     
    661685diff -Naur bash-4.2.orig/expr.c bash-4.2/expr.c
    662686--- bash-4.2.orig/expr.c        2010-12-21 16:12:13.000000000 +0000
    663 +++ bash-4.2/expr.c     2012-06-03 18:59:16.535205499 +0000
     687+++ bash-4.2/expr.c     2012-07-20 20:30:10.907595071 +0000
    664688@@ -476,19 +476,23 @@
    665689 
     
    704728       if (op == MUL)
    705729        val1 *= val2;
     730diff -Naur bash-4.2.orig/lib/glob/glob.c bash-4.2/lib/glob/glob.c
     731--- bash-4.2.orig/lib/glob/glob.c       2009-11-14 23:39:30.000000000 +0000
     732+++ bash-4.2/lib/glob/glob.c    2012-07-20 20:30:11.107595225 +0000
     733@@ -200,8 +200,11 @@
     734   wchar_t *pat_wc, *dn_wc;
     735   size_t pat_n, dn_n;
     736 
     737+  pat_wc = dn_wc = (wchar_t *)NULL;
     738+
     739   pat_n = xdupmbstowcs (&pat_wc, NULL, pat);
     740-  dn_n = xdupmbstowcs (&dn_wc, NULL, dname);
     741+  if (pat_n != (size_t)-1)
     742+    dn_n = xdupmbstowcs (&dn_wc, NULL, dname);
     743 
     744   ret = 0;
     745   if (pat_n != (size_t)-1 && dn_n !=(size_t)-1)
     746@@ -221,6 +224,8 @@
     747           (pat_wc[0] != L'\\' || pat_wc[1] != L'.'))
     748        ret = 1;
     749     }
     750+  else
     751+    ret = skipname (pat, dname, flags);
     752 
     753   FREE (pat_wc);
     754   FREE (dn_wc);
     755@@ -266,8 +271,11 @@
     756   /* Convert the strings into wide characters.  */
     757   n = xdupmbstowcs (&wpathname, NULL, pathname);
     758   if (n == (size_t) -1)
     759-    /* Something wrong. */
     760-    return;
     761+    {
     762+      /* Something wrong.  Fall back to single-byte */
     763+      udequote_pathname (pathname);
     764+      return;
     765+    }
     766   orig_wpathname = wpathname;
     767 
     768   for (i = j = 0; wpathname && wpathname[i]; )
    706769diff -Naur bash-4.2.orig/lib/glob/gmisc.c bash-4.2/lib/glob/gmisc.c
    707770--- bash-4.2.orig/lib/glob/gmisc.c      2011-02-05 21:11:17.000000000 +0000
    708 +++ bash-4.2/lib/glob/gmisc.c   2012-06-03 18:59:01.258791836 +0000
     771+++ bash-4.2/lib/glob/gmisc.c   2012-07-20 20:30:10.557594801 +0000
    709772@@ -77,8 +77,8 @@
    710773      wchar_t *wpat;
     
    907970        }
    908971     }
     972diff -Naur bash-4.2.orig/lib/glob/xmbsrtowcs.c bash-4.2/lib/glob/xmbsrtowcs.c
     973--- bash-4.2.orig/lib/glob/xmbsrtowcs.c 2010-05-30 22:36:27.000000000 +0000
     974+++ bash-4.2/lib/glob/xmbsrtowcs.c      2012-07-20 20:30:11.107595225 +0000
     975@@ -35,6 +35,8 @@
     976 
     977 #if HANDLE_MULTIBYTE
     978 
     979+#define WSBUF_INC 32
     980+
     981 #ifndef FREE
     982 #  define FREE(x)      do { if (x) free (x); } while (0)
     983 #endif
     984@@ -148,7 +150,7 @@
     985   size_t wsbuf_size;   /* Size of WSBUF */
     986   size_t wcnum;                /* Number of wide characters in WSBUF */
     987   mbstate_t state;     /* Conversion State */
     988-  size_t wcslength;    /* Number of wide characters produced by the conversion. */
     989+  size_t n, wcslength; /* Number of wide characters produced by the conversion. */
     990   const char *end_or_backslash;
     991   size_t nms;  /* Number of multibyte characters to convert at one time. */
     992   mbstate_t tmp_state;
     993@@ -171,7 +173,18 @@
     994       /* Compute the number of produced wide-characters. */
     995       tmp_p = p;
     996       tmp_state = state;
     997-      wcslength = mbsnrtowcs(NULL, &tmp_p, nms, 0, &tmp_state);
     998+
     999+      if (nms == 0 && *p == '\\')      /* special initial case */
     1000+       nms = wcslength = 1;
     1001+      else
     1002+       wcslength = mbsnrtowcs (NULL, &tmp_p, nms, 0, &tmp_state);
     1003+
     1004+      if (wcslength == 0)
     1005+       {
     1006+         tmp_p = p;            /* will need below */
     1007+         tmp_state = state;
     1008+         wcslength = 1;        /* take a single byte */
     1009+       }
     1010 
     1011       /* Conversion failed. */
     1012       if (wcslength == (size_t)-1)
     1013@@ -186,7 +199,8 @@
     1014        {
     1015          wchar_t *wstmp;
     1016 
     1017-         wsbuf_size = wcnum+wcslength+1;       /* 1 for the L'\0' or the potential L'\\' */
     1018+         while (wsbuf_size < wcnum+wcslength+1) /* 1 for the L'\0' or the potential L'\\' */
     1019+           wsbuf_size += WSBUF_INC;
     1020 
     1021          wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t));
     1022          if (wstmp == NULL)
     1023@@ -199,10 +213,18 @@
     1024        }
     1025 
     1026       /* Perform the conversion. This is assumed to return 'wcslength'.
     1027-       * It may set 'p' to NULL. */
     1028-      mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state);
     1029+        It may set 'p' to NULL. */
     1030+      n = mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state);
     1031 
     1032-      wcnum += wcslength;
     1033+      /* Compensate for taking single byte on wcs conversion failure above. */
     1034+      if (wcslength == 1 && (n == 0 || n == (size_t)-1))
     1035+       {
     1036+         state = tmp_state;
     1037+         p = tmp_p;
     1038+         wsbuf[wcnum++] = *p++;
     1039+       }
     1040+      else
     1041+        wcnum += wcslength;
     1042 
     1043       if (mbsinit (&state) && (p != NULL) && (*p == '\\'))
     1044        {
     1045@@ -230,8 +252,6 @@
     1046    If conversion is failed, the return value is (size_t)-1 and the values
     1047    of DESTP and INDICESP are NULL. */
     1048 
     1049-#define WSBUF_INC 32
     1050-
     1051 size_t
     1052 xdupmbstowcs (destp, indicesp, src)
     1053     wchar_t **destp;   /* Store the pointer to the wide character string */
    9091054diff -Naur bash-4.2.orig/lib/readline/callback.c bash-4.2/lib/readline/callback.c
    9101055--- bash-4.2.orig/lib/readline/callback.c       2010-06-06 16:18:58.000000000 +0000
    911 +++ bash-4.2/lib/readline/callback.c    2012-06-03 18:58:59.942756197 +0000
     1056+++ bash-4.2/lib/readline/callback.c    2012-07-20 20:30:10.547594793 +0000
    9121057@@ -148,6 +148,9 @@
    9131058          eof = _rl_vi_domove_callback (_rl_vimvcxt);
     
    9201065        }
    9211066 #endif
     1067diff -Naur bash-4.2.orig/lib/readline/input.c bash-4.2/lib/readline/input.c
     1068--- bash-4.2.orig/lib/readline/input.c  2010-05-30 22:33:01.000000000 +0000
     1069+++ bash-4.2/lib/readline/input.c       2012-07-20 20:30:11.130928577 +0000
     1070@@ -409,7 +409,7 @@
     1071 int
     1072 rl_read_key ()
     1073 {
     1074-  int c;
     1075+  int c, r;
     1076 
     1077   rl_key_sequence_length++;
     1078 
     1079@@ -429,14 +429,18 @@
     1080        {
     1081          while (rl_event_hook)
     1082            {
     1083-             if (rl_gather_tyi () < 0) /* XXX - EIO */
     1084+             if (rl_get_char (&c) != 0)
     1085+               break;
     1086+               
     1087+             if ((r = rl_gather_tyi ()) < 0)   /* XXX - EIO */
     1088                {
     1089                  rl_done = 1;
     1090                  return ('\n');
     1091                }
     1092+             else if (r == 1)                  /* read something */
     1093+               continue;
     1094+
     1095              RL_CHECK_SIGNALS ();
     1096-             if (rl_get_char (&c) != 0)
     1097-               break;
     1098              if (rl_done)              /* XXX - experimental */
     1099                return ('\n');
     1100              (*rl_event_hook) ();
    9221101diff -Naur bash-4.2.orig/lib/readline/vi_mode.c bash-4.2/lib/readline/vi_mode.c
    9231102--- bash-4.2.orig/lib/readline/vi_mode.c        2010-11-21 00:51:39.000000000 +0000
    924 +++ bash-4.2/lib/readline/vi_mode.c     2012-06-03 18:58:59.938756089 +0000
     1103+++ bash-4.2/lib/readline/vi_mode.c     2012-07-20 20:30:11.207595303 +0000
    9251104@@ -1114,7 +1114,7 @@
    9261105       rl_beg_of_line (1, c);
     
    9321111 #if defined (READLINE_CALLBACKS)
    9331112   /* XXX - these need to handle rl_universal_argument bindings */
     1113@@ -1234,11 +1234,19 @@
     1114       _rl_vimvcxt->motion = '$';
     1115       r = rl_domove_motion_callback (_rl_vimvcxt);
     1116     }
     1117-  else if (vi_redoing)
     1118+  else if (vi_redoing && _rl_vi_last_motion != 'd')    /* `dd' is special */
     1119     {
     1120       _rl_vimvcxt->motion = _rl_vi_last_motion;
     1121       r = rl_domove_motion_callback (_rl_vimvcxt);
     1122     }
     1123+  else if (vi_redoing)         /* handle redoing `dd' here */
     1124+    {
     1125+      _rl_vimvcxt->motion = _rl_vi_last_motion;
     1126+      rl_mark = rl_end;
     1127+      rl_beg_of_line (1, key);
     1128+      RL_UNSETSTATE (RL_STATE_VIMOTION);
     1129+      r = vidomove_dispatch (_rl_vimvcxt);
     1130+    }
     1131 #if defined (READLINE_CALLBACKS)
     1132   else if (RL_ISSTATE (RL_STATE_CALLBACK))
     1133     {
     1134@@ -1316,11 +1324,19 @@
     1135       _rl_vimvcxt->motion = '$';
     1136       r = rl_domove_motion_callback (_rl_vimvcxt);
     1137     }
     1138-  else if (vi_redoing)
     1139+  else if (vi_redoing && _rl_vi_last_motion != 'c')    /* `cc' is special */
     1140     {
     1141       _rl_vimvcxt->motion = _rl_vi_last_motion;
     1142       r = rl_domove_motion_callback (_rl_vimvcxt);
     1143     }
     1144+  else if (vi_redoing)         /* handle redoing `cc' here */
     1145+    {
     1146+      _rl_vimvcxt->motion = _rl_vi_last_motion;
     1147+      rl_mark = rl_end;
     1148+      rl_beg_of_line (1, key);
     1149+      RL_UNSETSTATE (RL_STATE_VIMOTION);
     1150+      r = vidomove_dispatch (_rl_vimvcxt);
     1151+    }
     1152 #if defined (READLINE_CALLBACKS)
     1153   else if (RL_ISSTATE (RL_STATE_CALLBACK))
     1154     {
     1155@@ -1377,6 +1393,19 @@
     1156       _rl_vimvcxt->motion = '$';
     1157       r = rl_domove_motion_callback (_rl_vimvcxt);
     1158     }
     1159+  else if (vi_redoing && _rl_vi_last_motion != 'y')    /* `yy' is special */
     1160+    {
     1161+      _rl_vimvcxt->motion = _rl_vi_last_motion;
     1162+      r = rl_domove_motion_callback (_rl_vimvcxt);
     1163+    }
     1164+  else if (vi_redoing)                 /* handle redoing `yy' here */
     1165+    {
     1166+      _rl_vimvcxt->motion = _rl_vi_last_motion;
     1167+      rl_mark = rl_end;
     1168+      rl_beg_of_line (1, key);
     1169+      RL_UNSETSTATE (RL_STATE_VIMOTION);
     1170+      r = vidomove_dispatch (_rl_vimvcxt);
     1171+    }
     1172 #if defined (READLINE_CALLBACKS)
     1173   else if (RL_ISSTATE (RL_STATE_CALLBACK))
     1174     {
     1175diff -Naur bash-4.2.orig/lib/sh/eaccess.c bash-4.2/lib/sh/eaccess.c
     1176--- bash-4.2.orig/lib/sh/eaccess.c      2011-01-09 01:50:10.000000000 +0000
     1177+++ bash-4.2/lib/sh/eaccess.c   2012-07-20 20:30:11.157595263 +0000
     1178@@ -82,6 +82,8 @@
     1179      const char *path;
     1180      struct stat *finfo;
     1181 {
     1182+  static char *pbuf = 0;
     1183+
     1184   if (*path == '\0')
     1185     {
     1186       errno = ENOENT;
     1187@@ -106,7 +108,7 @@
     1188      trailing slash.  Make sure /dev/fd/xx really uses DEV_FD_PREFIX/xx.
     1189      On most systems, with the notable exception of linux, this is
     1190      effectively a no-op. */
     1191-      char pbuf[32];
     1192+      pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8));
     1193       strcpy (pbuf, DEV_FD_PREFIX);
     1194       strcat (pbuf, path + 8);
     1195       return (stat (pbuf, finfo));
    9341196diff -Naur bash-4.2.orig/lib/sh/zread.c bash-4.2/lib/sh/zread.c
    9351197--- bash-4.2.orig/lib/sh/zread.c        2009-03-02 13:54:45.000000000 +0000
    936 +++ bash-4.2/lib/sh/zread.c     2012-06-03 18:59:25.447446823 +0000
     1198+++ bash-4.2/lib/sh/zread.c     2012-07-20 20:30:10.964261781 +0000
    9371199@@ -160,14 +160,13 @@
    9381200 zsyncfd (fd)
     
    9541216diff -Naur bash-4.2.orig/parse.y bash-4.2/parse.y
    9551217--- bash-4.2.orig/parse.y       2011-01-02 20:48:11.000000000 +0000
    956 +++ bash-4.2/parse.y    2012-06-03 18:59:17.827240486 +0000
     1218+++ bash-4.2/parse.y    2012-07-20 20:30:11.164261935 +0000
    9571219@@ -2499,7 +2499,7 @@
    9581220         We do this only if it is time to do so. Notice that only here
     
    9941256     token_to_read = 0;
    9951257 
    996 @@ -5135,6 +5140,9 @@
     1258@@ -4895,6 +4900,9 @@
     1259       return (current_command_line_count == 2 ? "\n" : "");
     1260     }
     1261 
     1262+  if (parser_state & PST_COMPASSIGN)
     1263+    return (" ");
     1264+
     1265   /* First, handle some special cases. */
     1266   /*(*/
     1267   /* If we just read `()', assume it's a function definition, and don't
     1268@@ -5135,6 +5143,9 @@
    9971269            case 'A':
    9981270              /* Make the current time/date into a string. */
     
    10041276 
    10051277              if (c == 'd')
    1006 @@ -5905,6 +5913,12 @@
     1278@@ -5905,6 +5916,12 @@
    10071279   ps->expand_aliases = expand_aliases;
    10081280   ps->echo_input_at_read = echo_input_at_read;
     
    10171289 }
    10181290 
    1019 @@ -5946,6 +5960,42 @@
     1291@@ -5946,6 +5963,42 @@
    10201292 
    10211293   expand_aliases = ps->expand_aliases;
     
    10621334diff -Naur bash-4.2.orig/patchlevel.h bash-4.2/patchlevel.h
    10631335--- bash-4.2.orig/patchlevel.h  2010-06-13 00:14:48.000000000 +0000
    1064 +++ bash-4.2/patchlevel.h       2012-06-03 18:59:34.475691285 +0000
     1336+++ bash-4.2/patchlevel.h       2012-07-20 20:30:11.207595303 +0000
    10651337@@ -25,6 +25,6 @@
    10661338    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
     
    10681340 
    10691341-#define PATCHLEVEL 0
    1070 +#define PATCHLEVEL 29
     1342+#define PATCHLEVEL 37
    10711343 
    10721344 #endif /* _PATCHLEVEL_H_ */
    10731345diff -Naur bash-4.2.orig/pathexp.c bash-4.2/pathexp.c
    10741346--- bash-4.2.orig/pathexp.c     2010-08-14 03:21:57.000000000 +0000
    1075 +++ bash-4.2/pathexp.c  2012-06-03 18:59:15.283171597 +0000
     1347+++ bash-4.2/pathexp.c  2012-07-20 20:30:10.890928391 +0000
    10761348@@ -196,7 +196,7 @@
    10771349        {
     
    10851357diff -Naur bash-4.2.orig/print_cmd.c bash-4.2/print_cmd.c
    10861358--- bash-4.2.orig/print_cmd.c   2010-05-30 22:34:08.000000000 +0000
    1087 +++ bash-4.2/print_cmd.c        2012-06-03 18:59:10.179033384 +0000
     1359+++ bash-4.2/print_cmd.c        2012-07-20 20:30:10.627594855 +0000
    10881360@@ -315,6 +315,7 @@
    10891361          cprintf ("( ");
     
    11121384diff -Naur bash-4.2.orig/shell.h bash-4.2/shell.h
    11131385--- bash-4.2.orig/shell.h       2011-01-07 03:16:55.000000000 +0000
    1114 +++ bash-4.2/shell.h    2012-06-03 18:59:12.711101949 +0000
     1386+++ bash-4.2/shell.h    2012-07-20 20:30:10.844261687 +0000
    11151387@@ -136,6 +136,9 @@
    11161388   int parser_state;
     
    11421414diff -Naur bash-4.2.orig/sig.c bash-4.2/sig.c
    11431415--- bash-4.2.orig/sig.c 2010-11-23 13:21:22.000000000 +0000
    1144 +++ bash-4.2/sig.c      2012-06-03 18:59:07.650964928 +0000
     1416+++ bash-4.2/sig.c      2012-07-20 20:30:10.620928183 +0000
    11451417@@ -46,6 +46,7 @@
    11461418 
     
    11731445diff -Naur bash-4.2.orig/subst.c bash-4.2/subst.c
    11741446--- bash-4.2.orig/subst.c       2011-01-02 21:12:51.000000000 +0000
    1175 +++ bash-4.2/subst.c    2012-06-03 18:59:33.039652403 +0000
     1447+++ bash-4.2/subst.c    2012-07-20 20:30:11.200928631 +0000
    11761448@@ -366,6 +366,11 @@
    11771449       f &= ~W_ASSNBLTIN;
     
    12841556       FREE (value);
    12851557       FREE (temp);
     1558@@ -7900,7 +7922,7 @@
     1559 
     1560   /* State flags */
     1561   int had_quoted_null;
     1562-  int has_dollar_at;
     1563+  int has_dollar_at, temp_has_dollar_at;
     1564   int tflag;
     1565   int pflags;                  /* flags passed to param_expand */
     1566 
     1567@@ -8105,13 +8127,14 @@
     1568          if (expanded_something)
     1569            *expanded_something = 1;
     1570 
     1571-         has_dollar_at = 0;
     1572+         temp_has_dollar_at = 0;
     1573          pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0;
     1574          if (word->flags & W_NOSPLIT2)
     1575            pflags |= PF_NOSPLIT2;
     1576          tword = param_expand (string, &sindex, quoted, expanded_something,
     1577-                              &has_dollar_at, &quoted_dollar_at,
     1578+                              &temp_has_dollar_at, &quoted_dollar_at,
     1579                               &had_quoted_null, pflags);
     1580+         has_dollar_at += temp_has_dollar_at;
     1581 
     1582          if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal)
     1583            {
     1584@@ -8129,6 +8152,14 @@
     1585          temp = tword->word;
     1586          dispose_word_desc (tword);
     1587 
     1588+         /* Kill quoted nulls; we will add them back at the end of
     1589+            expand_word_internal if nothing else in the string */
     1590+         if (had_quoted_null && temp && QUOTED_NULL (temp))
     1591+           {
     1592+             FREE (temp);
     1593+             temp = (char *)NULL;
     1594+           }
     1595+
     1596          goto add_string;
     1597          break;
     1598 
     1599@@ -8244,9 +8275,10 @@
     1600 
     1601              temp = (char *)NULL;
     1602 
     1603-             has_dollar_at = 0;
     1604+             temp_has_dollar_at = 0;   /* XXX */
     1605              /* Need to get W_HASQUOTEDNULL flag through this function. */
     1606-             list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &has_dollar_at, (int *)NULL);
     1607+             list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &temp_has_dollar_at, (int *)NULL);
     1608+             has_dollar_at += temp_has_dollar_at;
     1609 
     1610              if (list == &expand_word_error || list == &expand_word_fatal)
     1611                {
     1612@@ -8533,7 +8565,7 @@
     1613        tword->flags |= W_NOEXPAND;     /* XXX */
     1614       if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
     1615        tword->flags |= W_QUOTED;
     1616-      if (had_quoted_null)
     1617+      if (had_quoted_null && QUOTED_NULL (istring))
     1618        tword->flags |= W_HASQUOTEDNULL;
     1619       list = make_word_list (tword, (WORD_LIST *)NULL);
     1620     }
     1621@@ -8564,7 +8596,7 @@
     1622            tword->flags |= W_NOGLOB;
     1623          if (word->flags & W_NOEXPAND)
     1624            tword->flags |= W_NOEXPAND;
     1625-         if (had_quoted_null)
     1626+         if (had_quoted_null && QUOTED_NULL (istring))
     1627            tword->flags |= W_HASQUOTEDNULL;    /* XXX */
     1628          list = make_word_list (tword, (WORD_LIST *)NULL);
     1629        }
    12861630diff -Naur bash-4.2.orig/subst.h bash-4.2/subst.h
    12871631--- bash-4.2.orig/subst.h       2010-12-03 01:21:29.000000000 +0000
    1288 +++ bash-4.2/subst.h    2012-06-03 18:58:58.658721427 +0000
     1632+++ bash-4.2/subst.h    2012-07-20 20:30:10.527594777 +0000
    12891633@@ -56,6 +56,7 @@
    12901634 #define SX_NOLONGJMP   0x0040  /* don't longjmp on fatal error */
     
    12971641diff -Naur bash-4.2.orig/support/shobj-conf bash-4.2/support/shobj-conf
    12981642--- bash-4.2.orig/support/shobj-conf    2009-10-28 13:20:21.000000000 +0000
    1299 +++ bash-4.2/support/shobj-conf 2012-06-03 18:59:22.927378587 +0000
     1643+++ bash-4.2/support/shobj-conf 2012-07-20 20:30:10.954261773 +0000
    13001644@@ -157,7 +157,7 @@
    13011645        ;;
     
    13181662diff -Naur bash-4.2.orig/tests/shopt.right bash-4.2/tests/shopt.right
    13191663--- bash-4.2.orig/tests/shopt.right     2010-07-03 03:36:30.000000000 +0000
    1320 +++ bash-4.2/tests/shopt.right  2012-06-03 18:59:34.475691285 +0000
     1664+++ bash-4.2/tests/shopt.right  2012-07-20 20:30:11.087595209 +0000
    13211665@@ -12,6 +12,7 @@
    13221666 shopt -u compat32
     
    13451689diff -Naur bash-4.2.orig/variables.c bash-4.2/variables.c
    13461690--- bash-4.2.orig/variables.c   2011-01-25 01:07:48.000000000 +0000
    1347 +++ bash-4.2/variables.c        2012-06-03 18:59:05.082895387 +0000
     1691+++ bash-4.2/variables.c        2012-07-20 20:30:10.610928175 +0000
    13481692@@ -3653,6 +3653,22 @@
    13491693   return n;
     
    13961740diff -Naur bash-4.2.orig/variables.h bash-4.2/variables.h
    13971741--- bash-4.2.orig/variables.h   2010-12-03 01:22:01.000000000 +0000
    1398 +++ bash-4.2/variables.h        2012-06-03 18:59:03.798860619 +0000
     1742+++ bash-4.2/variables.h        2012-07-20 20:30:10.590928159 +0000
    13991743@@ -313,6 +313,7 @@
    14001744 
Note: See TracChangeset for help on using the changeset viewer.