Changeset e80ea72 for patches/bash-4.2-branch_update-5.patch
- Timestamp:
- Jul 22, 2012, 3:38:41 AM (12 years ago)
- Branches:
- clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- c1c44b9
- Parents:
- 2538f4d
- 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-20123 Initial Package Version: 4.24 Origin: Upstream5 Upstream Status: Applied6 Description: Contains all upstream patches up to 4.2-0297 8 1 diff -Naur bash-4.2.orig/assoc.c bash-4.2/assoc.c 9 2 --- bash-4.2.orig/assoc.c 2009-08-06 00:19:40.000000000 +0000 10 +++ bash-4.2/assoc.c 2012-0 6-03 18:59:11.431067287+00003 +++ bash-4.2/assoc.c 2012-07-20 20:30:10.654261541 +0000 11 4 @@ -77,6 +77,11 @@ 12 5 b = hash_search (key, hash, HASH_CREATE); … … 23 16 diff -Naur bash-4.2.orig/bashline.c bash-4.2/bashline.c 24 17 --- bash-4.2.orig/bashline.c 2011-01-16 20:32:47.000000000 +0000 25 +++ bash-4.2/bashline.c 2012-0 6-03 18:59:34.467691069+000018 +++ bash-4.2/bashline.c 2012-07-20 20:30:11.070928530 +0000 26 19 @@ -121,6 +121,9 @@ 27 20 static int filename_completion_ignore __P((char **)); … … 309 302 diff -Naur bash-4.2.orig/bashline.h bash-4.2/bashline.h 310 303 --- bash-4.2.orig/bashline.h 2009-01-04 19:32:22.000000000 +0000 311 +++ bash-4.2/bashline.h 2012-0 6-03 18:59:34.467691069+0000304 +++ bash-4.2/bashline.h 2012-07-20 20:30:11.070928530 +0000 312 305 @@ -33,10 +33,15 @@ 313 306 extern void bashline_reinitialize __P((void)); … … 328 321 diff -Naur bash-4.2.orig/builtins/declare.def bash-4.2/builtins/declare.def 329 322 --- bash-4.2.orig/builtins/declare.def 2010-05-30 22:25:21.000000000 +0000 330 +++ bash-4.2/builtins/declare.def 2012-0 6-03 18:59:21.655344143+0000323 +++ bash-4.2/builtins/declare.def 2012-07-20 20:30:10.947595101 +0000 331 324 @@ -513,6 +513,11 @@ 332 325 *subscript_start = '['; /* ] */ … … 343 336 diff -Naur bash-4.2.orig/builtins/fc.def bash-4.2/builtins/fc.def 344 337 --- bash-4.2.orig/builtins/fc.def 2010-05-30 22:25:38.000000000 +0000 345 +++ bash-4.2/builtins/fc.def 2012-0 6-03 18:59:08.910999047+0000338 +++ bash-4.2/builtins/fc.def 2012-07-20 20:30:10.624261519 +0000 346 339 @@ -304,7 +304,7 @@ 347 340 last_hist = i - rh - hist_last_line_added; … … 379 372 /* No specification defaults to most recent command. */ 380 373 if (command == NULL) 374 diff -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); 381 405 diff -Naur bash-4.2.orig/builtins/printf.def bash-4.2/builtins/printf.def 382 406 --- bash-4.2.orig/builtins/printf.def 2010-11-23 15:02:55.000000000 +0000 383 +++ bash-4.2/builtins/printf.def 2012-0 6-03 18:59:27.971515171 +0000407 +++ bash-4.2/builtins/printf.def 2012-07-20 20:30:10.980928461 +0000 384 408 @@ -255,6 +255,8 @@ 385 409 #endif … … 403 427 diff -Naur bash-4.2.orig/builtins/read.def bash-4.2/builtins/read.def 404 428 --- bash-4.2.orig/builtins/read.def 2011-01-04 16:43:36.000000000 +0000 405 +++ bash-4.2/builtins/read.def 2012-0 6-03 18:59:24.187412704+0000429 +++ bash-4.2/builtins/read.def 2012-07-20 20:30:10.957595109 +0000 406 430 @@ -642,6 +642,12 @@ 407 431 xfree (input_string); … … 437 461 diff -Naur bash-4.2.orig/builtins/shopt.def bash-4.2/builtins/shopt.def 438 462 --- bash-4.2.orig/builtins/shopt.def 2010-07-03 02:42:44.000000000 +0000 439 +++ bash-4.2/builtins/shopt.def 2012-0 6-03 18:59:34.467691069+0000463 +++ bash-4.2/builtins/shopt.def 2012-07-20 20:30:11.070928530 +0000 440 464 @@ -61,6 +61,10 @@ 441 465 #include "common.h" … … 497 521 diff -Naur bash-4.2.orig/command.h bash-4.2/command.h 498 522 --- bash-4.2.orig/command.h 2010-08-02 23:36:51.000000000 +0000 499 +++ bash-4.2/command.h 2012-0 6-03 18:59:29.227549180+0000523 +++ bash-4.2/command.h 2012-07-20 20:30:11.004261811 +0000 500 524 @@ -97,6 +97,7 @@ 501 525 #define W_HASCTLESC 0x200000 /* word contains literal CTLESC characters */ … … 508 532 diff -Naur bash-4.2.orig/doc/bash.1 bash-4.2/doc/bash.1 509 533 --- bash-4.2.orig/doc/bash.1 2011-01-16 20:31:39.000000000 +0000 510 +++ bash-4.2/doc/bash.1 2012-0 6-03 18:59:34.471691177+0000534 +++ bash-4.2/doc/bash.1 2012-07-20 20:30:11.077595201 +0000 511 535 @@ -8948,6 +8948,16 @@ 512 536 quoted. This is the behavior of posix mode through version 4.1. … … 528 552 diff -Naur bash-4.2.orig/doc/bashref.texi bash-4.2/doc/bashref.texi 529 553 --- bash-4.2.orig/doc/bashref.texi 2011-01-16 20:31:57.000000000 +0000 530 +++ bash-4.2/doc/bashref.texi 2012-0 6-03 18:59:34.475691285+0000554 +++ bash-4.2/doc/bashref.texi 2012-07-20 20:30:11.084261873 +0000 531 555 @@ -4535,6 +4535,13 @@ 532 556 quoted. This is the behavior of @sc{posix} mode through version 4.1. … … 545 569 diff -Naur bash-4.2.orig/error.c bash-4.2/error.c 546 570 --- bash-4.2.orig/error.c 2009-08-22 02:31:31.000000000 +0000 547 +++ bash-4.2/error.c 2012-0 6-03 18:59:26.707480942+0000571 +++ bash-4.2/error.c 2012-07-20 20:30:10.974261789 +0000 548 572 @@ -200,7 +200,11 @@ 549 573 … … 561 585 diff -Naur bash-4.2.orig/execute_cmd.c bash-4.2/execute_cmd.c 562 586 --- bash-4.2.orig/execute_cmd.c 2011-02-09 22:32:25.000000000 +0000 563 +++ bash-4.2/execute_cmd.c 2012-0 6-03 18:59:30.491583407 +0000587 +++ bash-4.2/execute_cmd.c 2012-07-20 20:30:11.024261827 +0000 564 588 @@ -2196,6 +2196,7 @@ 565 589 if (ignore_return && cmd) … … 661 685 diff -Naur bash-4.2.orig/expr.c bash-4.2/expr.c 662 686 --- bash-4.2.orig/expr.c 2010-12-21 16:12:13.000000000 +0000 663 +++ bash-4.2/expr.c 2012-0 6-03 18:59:16.535205499+0000687 +++ bash-4.2/expr.c 2012-07-20 20:30:10.907595071 +0000 664 688 @@ -476,19 +476,23 @@ 665 689 … … 704 728 if (op == MUL) 705 729 val1 *= val2; 730 diff -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]; ) 706 769 diff -Naur bash-4.2.orig/lib/glob/gmisc.c bash-4.2/lib/glob/gmisc.c 707 770 --- 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-0 6-03 18:59:01.258791836+0000771 +++ bash-4.2/lib/glob/gmisc.c 2012-07-20 20:30:10.557594801 +0000 709 772 @@ -77,8 +77,8 @@ 710 773 wchar_t *wpat; … … 907 970 } 908 971 } 972 diff -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 */ 909 1054 diff -Naur bash-4.2.orig/lib/readline/callback.c bash-4.2/lib/readline/callback.c 910 1055 --- 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-0 6-03 18:58:59.942756197+00001056 +++ bash-4.2/lib/readline/callback.c 2012-07-20 20:30:10.547594793 +0000 912 1057 @@ -148,6 +148,9 @@ 913 1058 eof = _rl_vi_domove_callback (_rl_vimvcxt); … … 920 1065 } 921 1066 #endif 1067 diff -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) (); 922 1101 diff -Naur bash-4.2.orig/lib/readline/vi_mode.c bash-4.2/lib/readline/vi_mode.c 923 1102 --- 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-0 6-03 18:58:59.938756089+00001103 +++ bash-4.2/lib/readline/vi_mode.c 2012-07-20 20:30:11.207595303 +0000 925 1104 @@ -1114,7 +1114,7 @@ 926 1105 rl_beg_of_line (1, c); … … 932 1111 #if defined (READLINE_CALLBACKS) 933 1112 /* 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 { 1175 diff -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)); 934 1196 diff -Naur bash-4.2.orig/lib/sh/zread.c bash-4.2/lib/sh/zread.c 935 1197 --- 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-0 6-03 18:59:25.447446823+00001198 +++ bash-4.2/lib/sh/zread.c 2012-07-20 20:30:10.964261781 +0000 937 1199 @@ -160,14 +160,13 @@ 938 1200 zsyncfd (fd) … … 954 1216 diff -Naur bash-4.2.orig/parse.y bash-4.2/parse.y 955 1217 --- bash-4.2.orig/parse.y 2011-01-02 20:48:11.000000000 +0000 956 +++ bash-4.2/parse.y 2012-0 6-03 18:59:17.827240486+00001218 +++ bash-4.2/parse.y 2012-07-20 20:30:11.164261935 +0000 957 1219 @@ -2499,7 +2499,7 @@ 958 1220 We do this only if it is time to do so. Notice that only here … … 994 1256 token_to_read = 0; 995 1257 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 @@ 997 1269 case 'A': 998 1270 /* Make the current time/date into a string. */ … … 1004 1276 1005 1277 if (c == 'd') 1006 @@ -5905,6 +591 3,12 @@1278 @@ -5905,6 +5916,12 @@ 1007 1279 ps->expand_aliases = expand_aliases; 1008 1280 ps->echo_input_at_read = echo_input_at_read; … … 1017 1289 } 1018 1290 1019 @@ -5946,6 +596 0,42 @@1291 @@ -5946,6 +5963,42 @@ 1020 1292 1021 1293 expand_aliases = ps->expand_aliases; … … 1062 1334 diff -Naur bash-4.2.orig/patchlevel.h bash-4.2/patchlevel.h 1063 1335 --- bash-4.2.orig/patchlevel.h 2010-06-13 00:14:48.000000000 +0000 1064 +++ bash-4.2/patchlevel.h 2012-0 6-03 18:59:34.475691285+00001336 +++ bash-4.2/patchlevel.h 2012-07-20 20:30:11.207595303 +0000 1065 1337 @@ -25,6 +25,6 @@ 1066 1338 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh … … 1068 1340 1069 1341 -#define PATCHLEVEL 0 1070 +#define PATCHLEVEL 291342 +#define PATCHLEVEL 37 1071 1343 1072 1344 #endif /* _PATCHLEVEL_H_ */ 1073 1345 diff -Naur bash-4.2.orig/pathexp.c bash-4.2/pathexp.c 1074 1346 --- bash-4.2.orig/pathexp.c 2010-08-14 03:21:57.000000000 +0000 1075 +++ bash-4.2/pathexp.c 2012-0 6-03 18:59:15.283171597+00001347 +++ bash-4.2/pathexp.c 2012-07-20 20:30:10.890928391 +0000 1076 1348 @@ -196,7 +196,7 @@ 1077 1349 { … … 1085 1357 diff -Naur bash-4.2.orig/print_cmd.c bash-4.2/print_cmd.c 1086 1358 --- bash-4.2.orig/print_cmd.c 2010-05-30 22:34:08.000000000 +0000 1087 +++ bash-4.2/print_cmd.c 2012-0 6-03 18:59:10.179033384+00001359 +++ bash-4.2/print_cmd.c 2012-07-20 20:30:10.627594855 +0000 1088 1360 @@ -315,6 +315,7 @@ 1089 1361 cprintf ("( "); … … 1112 1384 diff -Naur bash-4.2.orig/shell.h bash-4.2/shell.h 1113 1385 --- bash-4.2.orig/shell.h 2011-01-07 03:16:55.000000000 +0000 1114 +++ bash-4.2/shell.h 2012-0 6-03 18:59:12.711101949+00001386 +++ bash-4.2/shell.h 2012-07-20 20:30:10.844261687 +0000 1115 1387 @@ -136,6 +136,9 @@ 1116 1388 int parser_state; … … 1142 1414 diff -Naur bash-4.2.orig/sig.c bash-4.2/sig.c 1143 1415 --- bash-4.2.orig/sig.c 2010-11-23 13:21:22.000000000 +0000 1144 +++ bash-4.2/sig.c 2012-0 6-03 18:59:07.650964928+00001416 +++ bash-4.2/sig.c 2012-07-20 20:30:10.620928183 +0000 1145 1417 @@ -46,6 +46,7 @@ 1146 1418 … … 1173 1445 diff -Naur bash-4.2.orig/subst.c bash-4.2/subst.c 1174 1446 --- bash-4.2.orig/subst.c 2011-01-02 21:12:51.000000000 +0000 1175 +++ bash-4.2/subst.c 2012-0 6-03 18:59:33.039652403+00001447 +++ bash-4.2/subst.c 2012-07-20 20:30:11.200928631 +0000 1176 1448 @@ -366,6 +366,11 @@ 1177 1449 f &= ~W_ASSNBLTIN; … … 1284 1556 FREE (value); 1285 1557 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, "ed_dollar_at, 1578 + &temp_has_dollar_at, "ed_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 } 1286 1630 diff -Naur bash-4.2.orig/subst.h bash-4.2/subst.h 1287 1631 --- bash-4.2.orig/subst.h 2010-12-03 01:21:29.000000000 +0000 1288 +++ bash-4.2/subst.h 2012-0 6-03 18:58:58.658721427 +00001632 +++ bash-4.2/subst.h 2012-07-20 20:30:10.527594777 +0000 1289 1633 @@ -56,6 +56,7 @@ 1290 1634 #define SX_NOLONGJMP 0x0040 /* don't longjmp on fatal error */ … … 1297 1641 diff -Naur bash-4.2.orig/support/shobj-conf bash-4.2/support/shobj-conf 1298 1642 --- bash-4.2.orig/support/shobj-conf 2009-10-28 13:20:21.000000000 +0000 1299 +++ bash-4.2/support/shobj-conf 2012-0 6-03 18:59:22.927378587+00001643 +++ bash-4.2/support/shobj-conf 2012-07-20 20:30:10.954261773 +0000 1300 1644 @@ -157,7 +157,7 @@ 1301 1645 ;; … … 1318 1662 diff -Naur bash-4.2.orig/tests/shopt.right bash-4.2/tests/shopt.right 1319 1663 --- bash-4.2.orig/tests/shopt.right 2010-07-03 03:36:30.000000000 +0000 1320 +++ bash-4.2/tests/shopt.right 2012-0 6-03 18:59:34.475691285+00001664 +++ bash-4.2/tests/shopt.right 2012-07-20 20:30:11.087595209 +0000 1321 1665 @@ -12,6 +12,7 @@ 1322 1666 shopt -u compat32 … … 1345 1689 diff -Naur bash-4.2.orig/variables.c bash-4.2/variables.c 1346 1690 --- bash-4.2.orig/variables.c 2011-01-25 01:07:48.000000000 +0000 1347 +++ bash-4.2/variables.c 2012-0 6-03 18:59:05.082895387+00001691 +++ bash-4.2/variables.c 2012-07-20 20:30:10.610928175 +0000 1348 1692 @@ -3653,6 +3653,22 @@ 1349 1693 return n; … … 1396 1740 diff -Naur bash-4.2.orig/variables.h bash-4.2/variables.h 1397 1741 --- bash-4.2.orig/variables.h 2010-12-03 01:22:01.000000000 +0000 1398 +++ bash-4.2/variables.h 2012-0 6-03 18:59:03.798860619 +00001742 +++ bash-4.2/variables.h 2012-07-20 20:30:10.590928159 +0000 1399 1743 @@ -313,6 +313,7 @@ 1400 1744
Note:
See TracChangeset
for help on using the changeset viewer.