Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
Date: Fri, 20 Oct 2017 07:45:33
Message-Id: 1508485501.40314bb465f6ec08c01228ba7fb01c0c73450d44.monsieurp@gentoo
1 commit: 40314bb465f6ec08c01228ba7fb01c0c73450d44
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Tue Oct 10 13:10:09 2017 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 20 07:45:01 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40314bb4
7
8 app-shells/bash: remove unused patches.
9
10 app-shells/bash/files/bash-3.0-afs.patch | 20 --
11 app-shells/bash/files/bash-3.0-crash.patch | 46 ----
12 .../bash/files/bash-3.0-histtimeformat.patch | 56 ----
13 app-shells/bash/files/bash-3.0-jobs.patch | 56 ----
14 app-shells/bash/files/bash-3.0-locale.patch | 112 --------
15 app-shells/bash/files/bash-3.0-manpage.patch | 15 --
16 app-shells/bash/files/bash-3.0-multibyteifs.patch | 281 ---------------------
17 app-shells/bash/files/bash-3.0-pwd.patch | 16 --
18 app-shells/bash/files/bash-3.0-subshell.patch | 39 ---
19 app-shells/bash/files/bash-3.0-ulimit.patch | 186 --------------
20 .../bash/files/bash-3.0-volatile-command.patch | 16 --
21 11 files changed, 843 deletions(-)
22
23 diff --git a/app-shells/bash/files/bash-3.0-afs.patch b/app-shells/bash/files/bash-3.0-afs.patch
24 deleted file mode 100644
25 index f07371c39eb..00000000000
26 --- a/app-shells/bash/files/bash-3.0-afs.patch
27 +++ /dev/null
28 @@ -1,20 +0,0 @@
29 -Ripped from Fedora
30 -
31 -- Fixed AFS support for output redirection, so that the correct errors
32 - are reported for other filesystems (bug #155373).
33 -
34 -https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=155373
35 -
36 ---- bash-3.0/redir.c.afs 2005-04-20 09:16:15.000000000 +0100
37 -+++ bash-3.0/redir.c 2005-04-20 09:16:58.000000000 +0100
38 -@@ -596,7 +596,9 @@
39 - fd = open (filename, flags, mode);
40 - #if defined (AFS)
41 - if ((fd < 0) && (errno == EACCES))
42 -- fd = open (filename, flags & ~O_CREAT, mode);
43 -+ if ((fd = open (filename, flags & ~O_CREAT, mode)) < 0)
44 -+ /* Restore previous errno. */
45 -+ errno = EACCES;
46 - #endif /* AFS */
47 - }
48 -
49
50 diff --git a/app-shells/bash/files/bash-3.0-crash.patch b/app-shells/bash/files/bash-3.0-crash.patch
51 deleted file mode 100644
52 index 984e85d82ed..00000000000
53 --- a/app-shells/bash/files/bash-3.0-crash.patch
54 +++ /dev/null
55 @@ -1,46 +0,0 @@
56 -> Machine Type: i686-pc-linux-gnu
57 ->
58 -> Bash Version: 3.0
59 -> Patch Level: 0
60 -> Release Status: release
61 ->
62 -> Description:
63 -> GNU bash, version 3.00.0(1)-release (i686-pc-linux-gnu)
64 -> (and
65 -> GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)
66 ->
67 -> dumps a core because of a null pointer "in make_bare_word
68 -> at make_cmd.c:90" (see gdb output below)
69 -
70 -Thanks for the report. Here's a quick fix:
71 -
72 -*** arrayfunc.c~ Sat Nov 6 15:08:29 2004
73 ---- arrayfunc.c Mon Jan 31 11:56:21 2005
74 -***************
75 -*** 709,713 ****
76 - return ((char *)NULL);
77 - }
78 -! else if (var == 0)
79 - return ((char *)NULL);
80 - else if (array_p (var) == 0)
81 ---- 709,713 ----
82 - return ((char *)NULL);
83 - }
84 -! else if (var == 0 || value_cell (var) == 0)
85 - return ((char *)NULL);
86 - else if (array_p (var) == 0)
87 -
88 -
89 -Chet
90 -
91 ---
92 -``The lyf so short, the craft so long to lerne.'' - Chaucer
93 -( ``Discere est Dolere'' -- chet )
94 - Live...Laugh...Love
95 -Chet Ramey, ITS, CWRU chet@×××××××.edu http://tiswww.tis.cwru.edu/~chet/
96 -
97 -
98 -_______________________________________________
99 -Bug-bash mailing list
100 -Bug-bash@×××.org
101 -http://lists.gnu.org/mailman/listinfo/bug-bash
102
103 diff --git a/app-shells/bash/files/bash-3.0-histtimeformat.patch b/app-shells/bash/files/bash-3.0-histtimeformat.patch
104 deleted file mode 100644
105 index b910600fd89..00000000000
106 --- a/app-shells/bash/files/bash-3.0-histtimeformat.patch
107 +++ /dev/null
108 @@ -1,56 +0,0 @@
109 -Ripped from Debian
110 -
111 -http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00008.html
112 -
113 -From: Enrique Perez-Terron <enrio@××××××.no>
114 -To: bug-bash@×××.org
115 -Subject: When using HISTTIMEFORMAT, the date and the command are run
116 - together.
117 -Date: Sun, 01 Aug 2004 18:36:45 +0200
118 -
119 -Configuration Information [Automatically generated, do not change]:
120 -Machine: i586
121 -OS: linux-gnu
122 -Compiler: gcc
123 -Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586'
124 --DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-pc-linux-gnu'
125 --DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale'
126 --DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib
127 --g -O2
128 -uname output: Linux arabia.home.lan 2.6.6-1.435.2.3 #1 Thu Jul 1
129 -09:11:28 EDT 2004 i586 i586 i386 GNU/Linux
130 -Machine Type: i586-pc-linux-gnu
131 -
132 -# DP: Add space separating the time and the command in the
133 -# DP: output from the history builtin command.
134 -
135 -Bash Version: 3.0
136 -Patch Level: 0
137 -Release Status: release
138 -
139 -Description:
140 - There is no space separating the time and the command in the
141 - output from the history builtin command.
142 -
143 -Repeat-By:
144 - $ export HISTTIMEFORMAT=_A_format_string_
145 - $ history 3
146 - 997 _A_format_string_echo $BASH_VERSION
147 - 998 _A_format_string_export HISTTIMEFORMAT=_A_format_string_
148 - 999 _A_format_string_history 3
149 -
150 -Fix:
151 ---- ./builtins/history.def.orig 2003-12-20 00:02:09.000000000 +0100
152 -+++ ./builtins/history.def 2004-08-01 18:18:02.652720102 +0200
153 -@@ -287,9 +287,10 @@
154 - QUIT;
155 -
156 - timestr = (histtimefmt && *histtimefmt) ? histtime (hlist[i], histtimefmt) : (char *)NULL;
157 -- printf ("%5d%c %s%s\n", i + history_base,
158 -+ printf ("%5d%c %s%s%s\n", i + history_base,
159 - histdata(i) ? '*' : ' ',
160 - ((timestr && *timestr) ? timestr : ""),
161 -+ ((timestr && *timestr) ? " " : ""),
162 - histline(i));
163 - i++;
164 - }
165
166 diff --git a/app-shells/bash/files/bash-3.0-jobs.patch b/app-shells/bash/files/bash-3.0-jobs.patch
167 deleted file mode 100644
168 index 72c149c71cf..00000000000
169 --- a/app-shells/bash/files/bash-3.0-jobs.patch
170 +++ /dev/null
171 @@ -1,56 +0,0 @@
172 -Ripped from Fedora
173 -
174 -* Wed Sep 8 2004 Tim Waugh <twaugh@××××××.com> 3.0-13
175 -- Check for EINVAL from waitpid() and avoid WCONTINUED in that case.
176 -- Fixed jobs4 test.
177 -
178 -From: Tim Waugh
179 -Subject: [patch] bash-3.0: avoid WCONTINUED if invalid
180 -Date: Wed, 8 Sep 2004 16:52:38 +0100
181 -User-agent: Mutt/1.4.1i
182 -
183 -Hi,
184 -
185 -GNU libc defines WCONTINUED, but (at least on Linux 2.4.x kernels)
186 -waitpid() returns -1 with errno set to EINVAL if WCONTINUED is
187 -supplied in options.
188 -
189 -Here is a patch to retry without WCONTINUED set in that case.
190 -
191 -Tim.
192 -
193 ---- bash-3.0/tests/jobs4.sub
194 -+++ bash-3.0/tests/jobs4.sub
195 -@@ -18,5 +18,5 @@
196 -
197 - wait
198 -
199 --cat &
200 -+sleep 100 &
201 - kill -1 %% && echo i killed it || echo could not kill it
202 ---- bash-3.0/jobs.c
203 -+++ bash-3.0/jobs.c
204 -@@ -2475,6 +2475,7 @@
205 - PROCESS *child;
206 - pid_t pid;
207 - int call_set_current, last_stopped_job, job, children_exited, waitpid_flags;
208 -+ static int wcontinued_not_supported = 0;
209 -
210 - call_set_current = children_exited = 0;
211 - last_stopped_job = NO_JOB;
212 -@@ -2488,7 +2489,15 @@
213 - : 0;
214 - if (sigchld || block == 0)
215 - waitpid_flags |= WNOHANG;
216 -+ retry:
217 -+ if (wcontinued_not_supported)
218 -+ waitpid_flags &= ~WCONTINUED;
219 - pid = WAITPID (-1, &status, waitpid_flags);
220 -+ if (pid == -1 && errno == EINVAL)
221 -+ {
222 -+ wcontinued_not_supported = 1;
223 -+ goto retry;
224 -+ }
225 -
226 - /* The check for WNOHANG is to make sure we decrement sigchld only
227 - if it was non-zero before we called waitpid. */
228
229 diff --git a/app-shells/bash/files/bash-3.0-locale.patch b/app-shells/bash/files/bash-3.0-locale.patch
230 deleted file mode 100644
231 index ea1ef3deae3..00000000000
232 --- a/app-shells/bash/files/bash-3.0-locale.patch
233 +++ /dev/null
234 @@ -1,112 +0,0 @@
235 -Ripped from SuSe
236 -
237 -http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00005.html
238 -
239 -From: schwab@××××.de
240 -To: bug-bash@×××.org
241 -Subject: HISTTIMEFORMAT doesn't track locale changes
242 -Date: Sun, 1 Aug 2004 11:14:00 +0200 (CEST)
243 -
244 -Configuration Information [Automatically generated, do not change]:
245 -Machine: ia64
246 -OS: linux-gnu
247 -Compiler: gcc
248 -Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='ia64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='ia64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I../bash-3.0 -I../bash-3.0/include -I../bash-3.0/lib -O2 -g
249 -uname output: Linux sykes 2.6.5-22-default #1 SMP Fri Jul 2 13:43:23 UTC 2004 ia64 ia64 ia64 GNU/Linux
250 -Machine Type: ia64-unknown-linux-gnu
251 -
252 -Bash Version: 3.0
253 -Patch Level: 0
254 -Release Status: release
255 -
256 -Description:
257 -Bash doesn't use the current locale when formatting HISTTIMEFORMAT.
258 -
259 -Repeat-By:
260 -sykes:/tmp/bash/Build/:[0]$ locale
261 -LANG=de_DE.UTF-8
262 -LC_CTYPE="de_DE.UTF-8"
263 -LC_NUMERIC=POSIX
264 -LC_TIME=POSIX
265 -LC_COLLATE=POSIX
266 -LC_MONETARY="de_DE.UTF-8"
267 -LC_MESSAGES=en_US.UTF-8
268 -LC_PAPER="de_DE.UTF-8"
269 -LC_NAME="de_DE.UTF-8"
270 -LC_ADDRESS="de_DE.UTF-8"
271 -LC_TELEPHONE="de_DE.UTF-8"
272 -LC_MEASUREMENT="de_DE.UTF-8"
273 -LC_IDENTIFICATION="de_DE.UTF-8"
274 -LC_ALL=
275 -sykes:/tmp/bash/Build/:[0]$ history 1
276 - 1502 history 1
277 -sykes:/tmp/bash/Build/:[0]$ HISTTIMEFORMAT=%c
278 -sykes:/tmp/bash/Build/:[0]$ history 1
279 - 1504 Sun Aug 1 10:56:59 2004history 1
280 -sykes:/tmp/bash/Build/:[0]$ export LC_TIME=$LANG
281 -sykes:/tmp/bash/Build/:[0]$ history 1
282 - 1506 Sun Aug 1 10:57:24 2004history 1
283 -
284 ---- bash-3.0/locale.c
285 -+++ bash-3.0/locale.c
286 -@@ -71,9 +71,10 @@ set_default_locale ()
287 - textdomain (PACKAGE);
288 - }
289 -
290 --/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES and LC_NUMERIC
291 -- if they are not specified in the environment, but LC_ALL is. This
292 -- should be called from main() after parsing the environment. */
293 -+/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_NUMERIC
294 -+ and LC_TIME if they are not specified in the environment, but LC_ALL
295 -+ is. This should be called from main() after parsing the
296 -+ environment. */
297 - void
298 - set_default_locale_vars ()
299 - {
300 -@@ -109,6 +110,12 @@ set_default_locale_vars ()
301 - setlocale (LC_NUMERIC, lc_all);
302 - # endif /* LC_NUMERIC */
303 -
304 -+# if defined (LC_TIME)
305 -+ val = get_string_value ("LC_TIME");
306 -+ if (val == 0 && lc_all && *lc_all)
307 -+ setlocale (LC_TIME, lc_all);
308 -+# endif /* LC_TIME */
309 -+
310 - #endif /* HAVE_SETLOCALE */
311 -
312 - val = get_string_value ("TEXTDOMAIN");
313 -@@ -213,6 +220,13 @@ set_locale_var (var, value)
314 - return (setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")) != 0);
315 - # endif /* LC_NUMERIC */
316 - }
317 -+ else if (var[3] == 'T' && var[4] == 'I') /* LC_TIME */
318 -+ {
319 -+# if defined (LC_TIME)
320 -+ if (lc_all == 0 || *lc_all == '\0')
321 -+ return (setlocale (LC_TIME, get_locale_var ("LC_TIME")) != 0);
322 -+# endif /* LC_TIME */
323 -+ }
324 - #endif /* HAVE_SETLOCALE */
325 -
326 - return (0);
327 -@@ -285,6 +299,9 @@ reset_locale_vars ()
328 - # if defined (LC_NUMERIC)
329 - setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC"));
330 - # endif
331 -+# if defined (LC_TIME)
332 -+ setlocale (LC_TIME, get_locale_var ("LC_TIME"));
333 -+# endif
334 -
335 - locale_setblanks ();
336 -
337 ---- bash-3.0/variables.c
338 -+++ bash-3.0/variables.c
339 -@@ -3646,6 +3646,7 @@ static struct name_and_function special_
340 - { "LC_CTYPE", sv_locale },
341 - { "LC_MESSAGES", sv_locale },
342 - { "LC_NUMERIC", sv_locale },
343 -+ { "LC_TIME", sv_locale },
344 -
345 - { "MAIL", sv_mail },
346 - { "MAILCHECK", sv_mail },
347
348 diff --git a/app-shells/bash/files/bash-3.0-manpage.patch b/app-shells/bash/files/bash-3.0-manpage.patch
349 deleted file mode 100644
350 index 08e3143e542..00000000000
351 --- a/app-shells/bash/files/bash-3.0-manpage.patch
352 +++ /dev/null
353 @@ -1,15 +0,0 @@
354 -Ripped from Fedora
355 -
356 -fix obvious display bug
357 -
358 ---- bash-3.0/doc/bash.1
359 -+++ bash-3.0/doc/bash.1
360 -@@ -3929,7 +3929,7 @@
361 - .B SIGHUP
362 - to all jobs when an interactive login shell exits.
363 - .PP
364 --If \Bbash\fP is waiting for a command to complete and receives a signal
365 -+If \fBbash\fP is waiting for a command to complete and receives a signal
366 - for which a trap has been set, the trap will not be executed until
367 - the command completes.
368 - When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP
369
370 diff --git a/app-shells/bash/files/bash-3.0-multibyteifs.patch b/app-shells/bash/files/bash-3.0-multibyteifs.patch
371 deleted file mode 100644
372 index 1e74832b638..00000000000
373 --- a/app-shells/bash/files/bash-3.0-multibyteifs.patch
374 +++ /dev/null
375 @@ -1,281 +0,0 @@
376 -From: Tim Waugh <twaugh@××××××.com>
377 -To: bug-bash@×××.org
378 -Subject: [patch] multibyte IFS values
379 -Date: Tue, 24 Aug 2004 13:34:59 +0100
380 -
381 -Hi,
382 -
383 -Here is a patch to address these problems:
384 -
385 -http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00294.html
386 -http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00296.html
387 -
388 -It works well for me at least.
389 -
390 -Tim.
391 -
392 ---- bash-3.0/subst.c.multibyteifs 2004-08-20 15:22:48.366497771 +0100
393 -+++ bash-3.0/subst.c 2004-08-20 18:13:30.833624616 +0100
394 -@@ -124,7 +124,12 @@
395 - SHELL_VAR *ifs_var;
396 - char *ifs_value;
397 - unsigned char ifs_cmap[UCHAR_MAX + 1];
398 -+#if defined (HANDLE_MULTIBYTE)
399 -+unsigned char ifs_firstc[MB_LEN_MAX];
400 -+size_t ifs_firstc_len;
401 -+#else
402 - unsigned char ifs_firstc;
403 -+#endif
404 -
405 - /* Extern functions and variables from different files. */
406 - extern int last_command_exit_value, last_command_exit_signal;
407 -@@ -862,8 +867,14 @@
408 - char *charlist;
409 - {
410 - register int i = *sindex;
411 -+ size_t slen;
412 -+#if defined (HANDLE_MULTIBYTE)
413 -+ size_t clen;
414 -+ wchar_t *wcharlist = NULL;
415 -+#endif
416 - int c;
417 - char *temp;
418 -+ DECLARE_MBSTATE;
419 -
420 - if (charlist[0] == '\'' && charlist[1] == '\0')
421 - {
422 -@@ -872,18 +883,65 @@
423 - return temp;
424 - }
425 -
426 -- for (i = *sindex; c = string[i]; i++)
427 -+ slen = strlen (string + *sindex) + *sindex;
428 -+ i = *sindex;
429 -+#if defined (HANDLE_MULTIBYTE)
430 -+ clen = strlen (charlist);
431 -+#endif
432 -+ while ((c = string[i]))
433 - {
434 -+#if defined (HANDLE_MULTIBYTE)
435 -+ size_t mblength;
436 -+#endif
437 -+
438 - if (c == CTLESC)
439 - {
440 -- i++;
441 -+ i += 2;
442 - continue;
443 - }
444 -
445 -+#if defined (HANDLE_MULTIBYTE)
446 -+ mblength = mblen (string + i, slen - i);
447 -+ if (mblength > 1)
448 -+ {
449 -+ wchar_t wc;
450 -+ size_t mblength = mbtowc (&wc, string + i, slen - i);
451 -+ if (MB_INVALIDCH (mblength))
452 -+ {
453 -+ if (MEMBER (c, charlist))
454 -+ break;
455 -+ }
456 -+ else
457 -+ {
458 -+ if (!wcharlist)
459 -+ {
460 -+ size_t len = mbstowcs (wcharlist, charlist, 0);
461 -+ if (len == -1)
462 -+ len = 0;
463 -+ wcharlist = xmalloc (sizeof (wchar_t) * (len + 1));
464 -+ mbstowcs (wcharlist, charlist, 1 + len);
465 -+ }
466 -+
467 -+ if (wcschr (wcharlist, wc))
468 -+ {
469 -+ break;
470 -+ }
471 -+ }
472 -+ }
473 -+ else
474 -+#endif
475 -+
476 - if (MEMBER (c, charlist))
477 - break;
478 -+
479 -+ ADVANCE_CHAR (string, slen, i);
480 - }
481 -
482 -+#if defined (HANDLE_MULTIBYTE)
483 -+ if (wcharlist)
484 -+ free (wcharlist);
485 -+#endif
486 -+
487 - temp = substring (string, *sindex, i);
488 - *sindex = i;
489 -
490 -@@ -1456,11 +1514,36 @@
491 - d2 = 0;
492 - if (delims)
493 - {
494 -- d2 = (char *)xmalloc (strlen (delims) + 1);
495 -- for (i = ts = 0; delims[i]; i++)
496 -+ size_t slength = strlen (delims);
497 -+#if defined (HANDLE_MULTIBYTE)
498 -+ size_t mblength = 1;
499 -+ DECLARE_MBSTATE;
500 -+#endif
501 -+
502 -+ d2 = (char *)xmalloc (slength + 1);
503 -+ i = ts = 0;
504 -+ while (delims[i])
505 - {
506 -+#if defined (HANDLE_MULTIBYTE)
507 -+ mbstate_t state_bak = state;
508 -+ mblength = mbrlen (delims + i, slength, &state);
509 -+
510 -+ if (MB_INVALIDCH (mblength))
511 -+ state = state_bak;
512 -+ else if (mblength != 1)
513 -+ {
514 -+ memcpy (d2 + ts, delims + i, mblength);
515 -+ ts += mblength;
516 -+ i += mblength;
517 -+ slength -= mblength;
518 -+ continue;
519 -+ }
520 -+#endif
521 -+
522 - if (whitespace(delims[i]) == 0)
523 - d2[ts++] = delims[i];
524 -+ i++;
525 -+ slength--;
526 - }
527 - d2[ts] = '\0';
528 - }
529 -@@ -1654,10 +1737,19 @@
530 - string_list_dollar_star (list)
531 - WORD_LIST *list;
532 - {
533 -+#if defined (HANDLE_MULTIBYTE)
534 -+ char sep[MB_CUR_MAX + 1];
535 -+#else
536 - char sep[2];
537 -+#endif
538 -
539 -+#if defined (HANDLE_MULTIBYTE)
540 -+ memcpy (sep, ifs_firstc, ifs_firstc_len);
541 -+ sep[ifs_firstc_len] = '\0';
542 -+#else
543 - sep[0] = ifs_firstc;
544 - sep[1] = '\0';
545 -+#endif
546 -
547 - return (string_list_internal (list, sep));
548 - }
549 -@@ -1676,14 +1768,41 @@
550 - WORD_LIST *list;
551 - int quoted;
552 - {
553 -- char *ifs, sep[2];
554 -+ char *ifs;
555 -+#if defined (HANDLE_MULTIBYTE)
556 -+ char sep[MB_CUR_MAX + 1];
557 -+#else
558 -+ char sep[2];
559 -+#endif
560 - WORD_LIST *tlist;
561 -
562 - /* XXX this could just be ifs = ifs_value; */
563 - ifs = ifs_var ? value_cell (ifs_var) : (char *)0;
564 -
565 -+#if defined (HANDLE_MULTIBYTE)
566 -+ if (ifs && *ifs)
567 -+ {
568 -+ size_t mblength = mblen (ifs, strnlen (ifs, MB_CUR_MAX));
569 -+ if (MB_INVALIDCH (mblength))
570 -+ {
571 -+ sep[0] = *ifs;
572 -+ sep[1] = '\0';
573 -+ }
574 -+ else
575 -+ {
576 -+ memcpy (sep, ifs, mblength);
577 -+ sep[mblength] = '\0';
578 -+ }
579 -+ }
580 -+ else
581 -+ {
582 -+ sep[0] = ' ';
583 -+ sep[1] = '\0';
584 -+ }
585 -+#else
586 - sep[0] = (ifs == 0 || *ifs == 0) ? ' ' : *ifs;
587 - sep[1] = '\0';
588 -+#endif
589 -
590 - tlist = ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (ifs && *ifs == 0))
591 - ? quote_list (list)
592 -@@ -1732,6 +1851,7 @@
593 - WORD_DESC *t;
594 - char *current_word, *s;
595 - int sindex, sh_style_split, whitesep;
596 -+ size_t slen = 0;
597 -
598 - if (!string || !*string)
599 - return ((WORD_LIST *)NULL);
600 -@@ -1805,7 +1925,12 @@
601 -
602 - /* Move past the current separator character. */
603 - if (string[sindex])
604 -- sindex++;
605 -+ {
606 -+ DECLARE_MBSTATE;
607 -+ if (!slen)
608 -+ slen = strlen (string);
609 -+ ADVANCE_CHAR (string, slen, sindex);
610 -+ }
611 -
612 - /* Now skip sequences of space, tab, or newline characters if they are
613 - in the list of separators. */
614 -@@ -6796,7 +6921,27 @@
615 - ifs_cmap[uc] = 1;
616 - }
617 -
618 -+#if defined (HANDLE_MULTIBYTE)
619 -+ if (!ifs_value)
620 -+ {
621 -+ ifs_firstc[0] = '\0';
622 -+ ifs_firstc_len = 1;
623 -+ }
624 -+ else
625 -+ {
626 -+ size_t ifs_len = strnlen (ifs_value, MB_CUR_MAX);
627 -+ ifs_firstc_len = mblen (ifs_value, ifs_len);
628 -+ if (MB_INVALIDCH (ifs_firstc_len))
629 -+ {
630 -+ ifs_firstc[0] = '\0';
631 -+ ifs_firstc_len = 1;
632 -+ }
633 -+ else
634 -+ memcpy (ifs_firstc, ifs_value, ifs_firstc_len);
635 -+ }
636 -+#else
637 - ifs_firstc = ifs_value ? *ifs_value : 0;
638 -+#endif
639 - }
640 -
641 - char *
642 ---- bash-3.0/subst.h.multibyteifs 2004-08-20 15:51:08.301074583 +0100
643 -+++ bash-3.0/subst.h 2004-08-20 15:51:39.070206473 +0100
644 -@@ -231,7 +231,12 @@
645 - extern SHELL_VAR *ifs_var;
646 - extern char *ifs_value;
647 - extern unsigned char ifs_cmap[];
648 -+#if defined (HANDLE_MULTIBYTE)
649 -+extern unsigned char ifs_firstc[];
650 -+extern size_t ifs_firstc_len;
651 -+#else
652 - extern unsigned char ifs_firstc;
653 -+#endif
654 -
655 - /* Evaluates to 1 if C is a character in $IFS. */
656 - #define isifs(c) (ifs_cmap[(unsigned char)(c)] != 0)
657
658 diff --git a/app-shells/bash/files/bash-3.0-pwd.patch b/app-shells/bash/files/bash-3.0-pwd.patch
659 deleted file mode 100644
660 index 77f0918fb4d..00000000000
661 --- a/app-shells/bash/files/bash-3.0-pwd.patch
662 +++ /dev/null
663 @@ -1,16 +0,0 @@
664 -Ripped from Fedora
665 -
666 -* Tue Mar 15 2005 Tim Waugh <twaugh@××××××.com> 3.0-30
667 -- Fix PS1 expansion crash when PWD is unset (bg #151116).
668 -
669 ---- bash-3.0/parse.y.pwd 2005-03-15 14:22:36.000000000 +0000
670 -+++ bash-3.0/parse.y 2005-03-15 14:22:37.000000000 +0000
671 -@@ -4103,7 +4103,7 @@
672 - #define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0)
673 - #define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
674 - /* Abbreviate \W as ~ if $PWD == $HOME */
675 -- if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, temp) == 0))
676 -+ if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, t_string) == 0))
677 - {
678 - if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0)
679 - {
680
681 diff --git a/app-shells/bash/files/bash-3.0-subshell.patch b/app-shells/bash/files/bash-3.0-subshell.patch
682 deleted file mode 100644
683 index a1d7dfe7d34..00000000000
684 --- a/app-shells/bash/files/bash-3.0-subshell.patch
685 +++ /dev/null
686 @@ -1,39 +0,0 @@
687 -Ripped from Fedora which took this from upstream
688 -
689 -* Tue Nov 22 2005 Tim Waugh <twaugh@××××××.com> 3.0-37
690 -- Applied patch from upstream to fix parsing problem (bug #146638).
691 -
692 -http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=146638
693 -
694 ---- bash-3.0/parse.y.subshell 2005-11-22 13:19:11.000000000 +0000
695 -+++ bash-3.0/parse.y 2005-11-22 13:19:24.000000000 +0000
696 -@@ -2055,14 +2055,6 @@
697 - if (uc)
698 - shell_input_line_index++;
699 -
700 -- if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n')
701 -- {
702 -- if (SHOULD_PROMPT ())
703 -- prompt_again ();
704 -- line_number++;
705 -- goto restart_read;
706 -- }
707 --
708 - #if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
709 - /* If UC is NULL, we have reached the end of the current input string. If
710 - pushed_string_list is non-empty, it's time to pop to the previous string
711 -@@ -2078,6 +2070,14 @@
712 - }
713 - #endif /* ALIAS || DPAREN_ARITHMETIC */
714 -
715 -+ if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n')
716 -+ {
717 -+ if (SHOULD_PROMPT ())
718 -+ prompt_again ();
719 -+ line_number++;
720 -+ goto restart_read;
721 -+ }
722 -+
723 - if (!uc && shell_input_line_terminator == EOF)
724 - return ((shell_input_line_index != 0) ? '\n' : EOF);
725 -
726
727 diff --git a/app-shells/bash/files/bash-3.0-ulimit.patch b/app-shells/bash/files/bash-3.0-ulimit.patch
728 deleted file mode 100644
729 index 8202b95d276..00000000000
730 --- a/app-shells/bash/files/bash-3.0-ulimit.patch
731 +++ /dev/null
732 @@ -1,186 +0,0 @@
733 -Ripped from Fedora
734 -
735 ---- bash-3.0/builtins/ulimit.def
736 -+++ bash-3.0/builtins/ulimit.def
737 -@@ -34,15 +34,20 @@
738 - -a all current limits are reported
739 - -c the maximum size of core files created
740 - -d the maximum size of a process's data segment
741 -+ -e the maximum scheduling priority (`nice')
742 - -f the maximum size of files created by the shell
743 -+ -i the maximum number of pending signals
744 - -l the maximum size a process may lock into memory
745 - -m the maximum resident set size
746 - -n the maximum number of open file descriptors
747 - -p the pipe buffer size
748 -+ -q the maximum number of bytes in POSIX message queues
749 -+ -r the maximum rt priority
750 - -s the maximum stack size
751 - -t the maximum amount of cpu time in seconds
752 - -u the maximum number of user processes
753 - -v the size of virtual memory
754 -+ -x the maximum number of file locks
755 -
756 - If LIMIT is given, it is the new value of the specified resource;
757 - the special LIMIT values `soft', `hard', and `unlimited' stand for
758 -@@ -199,7 +204,13 @@
759 - #ifdef RLIMIT_DATA
760 - { 'd', RLIMIT_DATA, 1024, "data seg size", "kbytes" },
761 - #endif
762 -+#ifdef RLIMIT_NICE
763 -+ { 'e', RLIMIT_NICE, 1, "max nice", (char *)NULL},
764 -+#endif /* RLIMIT_NICE */
765 - { 'f', RLIMIT_FILESIZE, 1024, "file size", "blocks" },
766 -+#ifdef RLIMIT_SIGPENDING
767 -+ { 'i', RLIMIT_SIGPENDING, 1, "pending signals", (char *)NULL},
768 -+#endif
769 - #ifdef RLIMIT_MEMLOCK
770 - { 'l', RLIMIT_MEMLOCK, 1024, "max locked memory", "kbytes" },
771 - #endif
772 -@@ -208,6 +219,12 @@
773 - #endif /* RLIMIT_RSS */
774 - { 'n', RLIMIT_OPENFILES, 1, "open files", (char *)NULL},
775 - { 'p', RLIMIT_PIPESIZE, 512, "pipe size", "512 bytes" },
776 -+#ifdef RLIMIT_MSGQUEUE
777 -+ { 'q', RLIMIT_MSGQUEUE, 1, "POSIX message queues", "bytes" },
778 -+#endif
779 -+#ifdef RLIMIT_RTPRIO
780 -+ { 'r', RLIMIT_RTPRIO, 1, "max rt priority", (char *)NULL},
781 -+#endif /* RLIMIT_RTPRIO */
782 - #ifdef RLIMIT_STACK
783 - { 's', RLIMIT_STACK, 1024, "stack size", "kbytes" },
784 - #endif
785 -@@ -221,6 +238,9 @@
786 - #ifdef RLIMIT_SWAP
787 - { 'w', RLIMIT_SWAP, 1024, "swap size", "kbytes" },
788 - #endif
789 -+#ifdef RLIMIT_LOCKS
790 -+ { 'x', RLIMIT_LOCKS, 1, "file locks", (char *)NULL},
791 -+#endif
792 - { -1, -1, -1, (char *)NULL, (char *)NULL }
793 - };
794 - #define NCMDS (sizeof(limits) / sizeof(limits[0]))
795 -@@ -647,11 +667,11 @@
796 -
797 - for (i = 0; limits[i].option > 0; i++)
798 - {
799 -- if (get_limit (i, &softlim, &hardlim) < 0)
800 -+ if (get_limit (i, &softlim, &hardlim) == 0)
801 -+ printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);
802 -+ else if (errno != EINVAL)
803 - builtin_error ("%s: cannot get limit: %s", limits[i].description,
804 - strerror (errno));
805 -- else
806 -- printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);
807 - }
808 - }
809 -
810 -@@ -670,7 +690,7 @@
811 - else
812 - sprintf (unitstr, "(-%c) ", limits[limind].option);
813 -
814 -- printf ("%-18s %16s", limits[limind].description, unitstr);
815 -+ printf ("%-20s %16s", limits[limind].description, unitstr);
816 - }
817 - if (curlim == RLIM_INFINITY)
818 - puts ("unlimited");
819 ---- bash-3.0/doc/bashref.texi
820 -+++ bash-3.0/doc/bashref.texi
821 -@@ -3793,7 +3793,7 @@
822 - @item ulimit
823 - @btindex ulimit
824 - @example
825 --ulimit [-acdflmnpstuvSH] [@var{limit}]
826 -+ulimit [-acdeflmnpqrstuvxSH] [@var{limit}]
827 - @end example
828 - @code{ulimit} provides control over the resources available to processes
829 - started by the shell, on systems that allow such control. If an
830 -@@ -3814,9 +3814,15 @@
831 - @item -d
832 - The maximum size of a process's data segment.
833 -
834 -+@item -e
835 -+The maximum scheduling priority.
836 -+
837 - @item -f
838 - The maximum size of files created by the shell.
839 -
840 -+@item -i
841 -+The maximum number of pending signals.
842 -+
843 - @item -l
844 - The maximum size that may be locked into memory.
845 -
846 -@@ -3829,6 +3835,12 @@
847 - @item -p
848 - The pipe buffer size.
849 -
850 -+@item -q
851 -+The maximum number of bytes in POSIX message queues.
852 -+
853 -+@item -r
854 -+The maximum RT priority.
855 -+
856 - @item -s
857 - The maximum stack size.
858 -
859 -@@ -3841,6 +3853,9 @@
860 - @item -v
861 - The maximum amount of virtual memory available to the process.
862 -
863 -+@item -x
864 -+The maximum amount of file locks.
865 -+
866 - @end table
867 -
868 - If @var{limit} is given, it is the new value of the specified resource;
869 ---- bash-3.0/doc/bash.1
870 -+++ bash-3.0/doc/bash.1
871 -@@ -8362,7 +8362,7 @@
872 - returns true if any of the arguments are found, false if
873 - none are found.
874 - .TP
875 --\fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]]
876 -+\fBulimit\fP [\fB\-SHacdefilmnpqrstuvx\fP [\fIlimit\fP]]
877 - Provides control over the resources available to the shell and to
878 - processes started by it, on systems that allow such control.
879 - The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is
880 -@@ -8398,9 +8398,15 @@
881 - .B \-d
882 - The maximum size of a process's data segment
883 - .TP
884 -+.B \-e
885 -+The maximum scheduling priority (`nice')
886 -+.TP
887 - .B \-f
888 - The maximum size of files created by the shell
889 - .TP
890 -+.B \-i
891 -+The maximum number of pending signals
892 -+.TP
893 - .B \-l
894 - The maximum size that may be locked into memory
895 - .TP
896 -@@ -8414,6 +8420,12 @@
897 - .B \-p
898 - The pipe size in 512-byte blocks (this may not be set)
899 - .TP
900 -+.B \-q
901 -+The maximum number of bytes in POSIX message queues
902 -+.TP
903 -+.B \-r
904 -+The maximum rt priority
905 -+.TP
906 - .B \-s
907 - The maximum stack size
908 - .TP
909 -@@ -8425,6 +8437,9 @@
910 - .TP
911 - .B \-v
912 - The maximum amount of virtual memory available to the shell
913 -+.TP
914 -+.B \-x
915 -+The maximum number of file locks
916 - .PD
917 - .PP
918 - If
919
920 diff --git a/app-shells/bash/files/bash-3.0-volatile-command.patch b/app-shells/bash/files/bash-3.0-volatile-command.patch
921 deleted file mode 100644
922 index 8b89b35914b..00000000000
923 --- a/app-shells/bash/files/bash-3.0-volatile-command.patch
924 +++ /dev/null
925 @@ -1,16 +0,0 @@
926 -Ripped from Debian
927 -
928 -# DP: current_command must be declared volatile to prevent assignments from
929 -# being optimized away as dead code. In reality, the use of setjmp/longjmp
930 -# makes it not dead code at all.
931 -
932 ---- eval.old 2003-12-18 23:44:15.000000000 -0500
933 -+++ eval.c 2005-10-03 01:59:31.000000000 -0400
934 -@@ -63,7 +63,7 @@
935 - reader_loop ()
936 - {
937 - int our_indirection_level;
938 -- COMMAND *current_command = (COMMAND *)NULL;
939 -+ COMMAND * volatile current_command = (COMMAND *)NULL;
940 -
941 - USE_VAR(current_command);