1 Submitted By: Jeremy Huntwork (jhuntwork at linuxfromscratch dot org)
3 Initial Package Version: 3.1
4 Origin: http://ftp.gnu.org/gnu/bash/bash-3.1-patches/
5 Upstream Status: From Upstream
6 Description: Contains patches 001-017 from upstream
8 diff -Naur bash-3.1.orig/arrayfunc.c bash-3.1/arrayfunc.c
9 --- bash-3.1.orig/arrayfunc.c 2005-07-04 17:25:58.000000000 -0700
10 +++ bash-3.1/arrayfunc.c 2006-04-19 15:59:29.000000000 -0700
12 exp = (char *)xmalloc (len);
13 strncpy (exp, s, len - 1);
16 - t = expand_string_to_string (exp, 0);
18 - t = expand_string_to_string (exp, Q_DOUBLE_QUOTES);
20 + t = expand_arith_string (exp, 0);
21 this_command_name = (char *)NULL;
22 val = evalexp (t, &expok);
24 diff -Naur bash-3.1.orig/doc/bash.1 bash-3.1/doc/bash.1
25 --- bash-3.1.orig/doc/bash.1 2005-10-12 08:40:52.000000000 -0700
26 +++ bash-3.1/doc/bash.1 2006-04-19 15:58:34.000000000 -0700
28 .\" Case Western Reserve University
31 -.\" Last Change: Sat Aug 27 13:28:44 EDT 2005
32 +.\" Last Change: Wed Dec 28 19:58:45 EST 2005
34 .\" bash_builtins, strip all but Built-Ins section
37 -.TH BASH 1 "2005 Aug 27" "GNU Bash-3.1-beta1"
38 +.TH BASH 1 "2005 Dec 28" "GNU Bash-3.1"
40 .\" There's some problem with having a `@'
41 .\" in a tagged paragraph with the BSD man macros.
44 is enabled, the match is performed without regard to the case
45 of alphabetic characters.
46 -The return value is 0 if the string matches or does not match
47 -the pattern, respectively, and 1 otherwise.
48 +The return value is 0 if the string matches (\fB==\fP) or does not match
49 +(\fB!=\fP) the pattern, and 1 otherwise.
50 Any part of the pattern may be quoted to force it to be matched as a
54 as for pathname expansion (see
57 +The \fIword\fP is expanded using tilde
58 +expansion, parameter and variable expansion, arithmetic substituion,
59 +command substitution, process substitution and quote removal.
60 +Each \fIpattern\fP examined is expanded using tilde
61 +expansion, parameter and variable expansion, arithmetic substituion,
62 +command substitution, and process substitution.
65 is enabled, the match is performed without regard to the case
67 returns true if any of the arguments are found, false if
70 -\fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]]
71 +\fBulimit\fP [\fB\-SHacdfilmnpqstuvx\fP [\fIlimit\fP]]
72 Provides control over the resources available to the shell and to
73 processes started by it, on systems that allow such control.
74 The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is
77 The maximum size of files created by the shell
80 +The maximum number of pending signals
83 The maximum size that may be locked into memory
87 The pipe size in 512-byte blocks (this may not be set)
90 +The maximum number of bytes in POSIX message queues
93 The maximum stack size
98 The maximum amount of virtual memory available to the shell
101 +The maximum number of file locks
105 diff -Naur bash-3.1.orig/doc/bashref.texi bash-3.1/doc/bashref.texi
106 --- bash-3.1.orig/doc/bashref.texi 2005-10-03 12:07:21.000000000 -0700
107 +++ bash-3.1/doc/bashref.texi 2006-04-19 15:58:34.000000000 -0700
109 (see the description of @code{shopt} in @ref{Bash Builtins})
110 is enabled, the match is performed without regard to the case
111 of alphabetic characters.
112 -The return value is 0 if the string matches or does not match
113 -the pattern, respectively, and 1 otherwise.
114 +The return value is 0 if the string matches (@samp{==}) or does not
115 +match (@samp{!=})the pattern, and 1 otherwise.
116 Any part of the pattern may be quoted to force it to be matched as a
119 @@ -2598,7 +2598,7 @@
120 Builtin commands are necessary to implement functionality impossible
121 or inconvenient to obtain with separate utilities.
123 -This section briefly the builtins which Bash inherits from
124 +This section briefly describes the builtins which Bash inherits from
125 the Bourne Shell, as well as the builtin commands which are unique
126 to or have been extended in Bash.
128 @@ -3833,7 +3833,7 @@
132 -ulimit [-acdflmnpstuvSH] [@var{limit}]
133 +ulimit [-acdfilmnpqstuvxSH] [@var{limit}]
135 @code{ulimit} provides control over the resources available to processes
136 started by the shell, on systems that allow such control. If an
137 @@ -3857,6 +3857,9 @@
139 The maximum size of files created by the shell.
142 +The maximum number of pending signals.
145 The maximum size that may be locked into memory.
147 @@ -3869,6 +3872,9 @@
149 The pipe buffer size.
152 +The maximum number of bytes in POSIX message queues.
155 The maximum stack size.
157 @@ -3881,6 +3887,9 @@
159 The maximum amount of virtual memory available to the process.
162 +The maximum number of file locks.
166 If @var{limit} is given, it is the new value of the specified resource;
167 @@ -4089,8 +4098,8 @@
168 Print shell input lines as they are read.
171 -Print a trace of simple commands, \fBfor\fP commands, \fBcase\fP
172 -commands, \fBselect\fP commands, and arithmetic \fBfor\fP commands
173 +Print a trace of simple commands, @code{for} commands, @code{case}
174 +commands, @code{select} commands, and arithmetic @code{for} commands
175 and their arguments or associated word lists after they are
176 expanded and before they are executed. The value of the @env{PS4}
177 variable is expanded and the resultant value is printed before
178 diff -Naur bash-3.1.orig/doc/version.texi bash-3.1/doc/version.texi
179 --- bash-3.1.orig/doc/version.texi 2005-09-20 11:52:56.000000000 -0700
180 +++ bash-3.1/doc/version.texi 2006-04-19 15:58:34.000000000 -0700
182 Copyright (C) 1988-2005 Free Software Foundation, Inc.
185 -@set LASTCHANGE Mon Sep 5 11:47:04 EDT 2005
186 +@set LASTCHANGE Fri Dec 30 10:50:51 EST 2005
188 -@set EDITION 3.1-beta1
189 -@set VERSION 3.1-beta1
190 -@set UPDATED 5 September 2005
191 -@set UPDATED-MONTH September 2005
194 +@set UPDATED 30 December 2005
195 +@set UPDATED-MONTH December 2005
196 diff -Naur bash-3.1.orig/jobs.c bash-3.1/jobs.c
197 --- bash-3.1.orig/jobs.c 2005-11-11 20:13:27.000000000 -0800
198 +++ bash-3.1/jobs.c 2006-04-19 15:58:34.000000000 -0700
200 * once in the parent and once in each child. This is where
201 * the parent gives it away.
203 + * Don't give the terminal away if this shell is an asynchronous
207 - if (job_control && newjob->pgrp)
208 + if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0)
209 give_terminal_to (newjob->pgrp, 0);
217 + int nsize, i, j, ncur, nprev;
220 + ncur = nprev = NO_JOB;
221 nsize = ((js.j_njobs + JOB_SLOTS - 1) / JOB_SLOTS);
223 i = js.j_njobs % JOB_SLOTS;
224 @@ -854,17 +858,51 @@
227 BLOCK_CHILD (set, oset);
228 - nlist = (JOB **) xmalloc (nsize * sizeof (JOB *));
229 + nlist = (js.j_jobslots == nsize) ? jobs : (JOB **) xmalloc (nsize * sizeof (JOB *));
231 for (i = j = 0; i < js.j_jobslots; i++)
233 - nlist[j++] = jobs[i];
235 + if (i == js.j_current)
237 + if (i == js.j_previous)
239 + nlist[j++] = jobs[i];
243 + itrace ("realloc_jobs_list: resize jobs list from %d to %d", js.j_jobslots, nsize);
244 + itrace ("realloc_jobs_list: j_lastj changed from %d to %d", js.j_lastj, (j > 0) ? j - 1 : 0);
245 + itrace ("realloc_jobs_list: j_njobs changed from %d to %d", js.j_njobs, (j > 0) ? j - 1 : 0);
249 - js.j_lastj = (j > 0) ? j - 1: 0;
250 + js.j_lastj = (j > 0) ? j - 1 : 0;
252 js.j_jobslots = nsize;
256 + /* Zero out remaining slots in new jobs list */
257 + for ( ; j < nsize; j++)
258 + nlist[j] = (JOB *)NULL;
266 + if (ncur != NO_JOB)
267 + js.j_current = ncur;
268 + if (nprev != NO_JOB)
269 + js.j_previous = nprev;
271 + /* Need to reset these */
272 + if (js.j_current == NO_JOB || js.j_previous == NO_JOB || js.j_current > js.j_lastj || js.j_previous > js.j_lastj)
276 + itrace ("realloc_jobs_list: reset js.j_current (%d) and js.j_previous (%d)", js.j_current, js.j_previous);
279 UNBLOCK_CHILD (oset);
281 @@ -1655,7 +1693,7 @@
282 In this case, we don't want to give the terminal to the
283 shell's process group (we could be in the middle of a
284 pipeline, for example). */
285 - if (async_p == 0 && pipeline_pgrp != shell_pgrp)
286 + if (async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&SUBSHELL_ASYNC) == 0))
287 give_terminal_to (pipeline_pgrp, 0);
289 #if defined (PGRP_PIPE)
290 @@ -2198,7 +2236,11 @@
291 /* This is possibly a race condition -- should it go in stop_pipeline? */
292 wait_sigint_received = 0;
293 if (job_control == 0)
294 - old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
296 + old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
297 + if (old_sigint_handler == SIG_IGN)
298 + set_signal_handler (SIGINT, old_sigint_handler);
301 termination_state = last_command_exit_value;
303 diff -Naur bash-3.1.orig/lib/glob/glob.c bash-3.1/lib/glob/glob.c
304 --- bash-3.1.orig/lib/glob/glob.c 2005-03-24 09:42:27.000000000 -0800
305 +++ bash-3.1/lib/glob/glob.c 2006-04-19 15:58:34.000000000 -0700
307 count = lose = skip = 0;
312 /* If PAT is empty, skip the loop, but return one (empty) filename. */
313 if (pat == 0 || *pat == '\0')
320 free (lastlink->name);
321 lastlink = lastlink->next;
323 diff -Naur bash-3.1.orig/lib/glob/sm_loop.c bash-3.1/lib/glob/sm_loop.c
324 --- bash-3.1.orig/lib/glob/sm_loop.c 2005-10-16 18:21:04.000000000 -0700
325 +++ bash-3.1/lib/glob/sm_loop.c 2006-04-19 15:58:34.000000000 -0700
326 @@ -638,12 +638,13 @@
327 CHAR *psub; /* pointer to sub-pattern */
328 CHAR *pnext; /* pointer to next sub-pattern */
329 CHAR *srest; /* pointer to rest of string */
331 + int m1, m2, xflags; /* xflags = flags passed to recursive matches */
334 fprintf(stderr, "extmatch: xc = %c\n", xc);
335 fprintf(stderr, "extmatch: s = %s; se = %s\n", s, se);
336 fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe);
337 +fprintf(stderr, "extmatch: flags = %d\n", flags);
340 prest = PATSCAN (p + (*p == L('(')), pe, 0); /* ) */
342 string matches the rest of the pattern. Also handle
343 multiple matches of the pattern. */
345 - m2 = (GMATCH (srest, se, prest, pe, flags) == 0) ||
346 - (s != srest && GMATCH (srest, se, p - 1, pe, flags) == 0);
348 + /* if srest > s, we are not at start of string */
349 + xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
350 + m2 = (GMATCH (srest, se, prest, pe, xflags) == 0) ||
351 + (s != srest && GMATCH (srest, se, p - 1, pe, xflags) == 0);
357 srest = (prest == pe) ? se : s;
358 for ( ; srest <= se; srest++)
360 + /* if srest > s, we are not at start of string */
361 + xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
362 if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 &&
363 - GMATCH (srest, se, prest, pe, flags) == 0)
364 + GMATCH (srest, se, prest, pe, xflags) == 0)
372 - if (m1 == 0 && GMATCH (srest, se, prest, pe, flags) == 0)
373 + /* if srest > s, we are not at start of string */
374 + xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
375 + if (m1 == 0 && GMATCH (srest, se, prest, pe, xflags) == 0)
378 return (FNM_NOMATCH);
379 diff -Naur bash-3.1.orig/lib/readline/display.c bash-3.1/lib/readline/display.c
380 --- bash-3.1.orig/lib/readline/display.c 2005-11-30 11:05:02.000000000 -0800
381 +++ bash-3.1/lib/readline/display.c 2006-04-19 15:58:34.000000000 -0700
382 @@ -1983,11 +1983,15 @@
391 - if (saved_local_prompt == 0)
392 + /* We've saved the prompt, and can do anything with the various prompt
393 + strings we need before they're restored. We want the unexpanded
394 + portion of the prompt string after any final newline. */
395 + p = rl_prompt ? strrchr (rl_prompt, '\n') : 0;
398 len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
399 pmt = (char *)xmalloc (len + 2);
400 @@ -1998,19 +2002,17 @@
404 - len = *saved_local_prompt ? strlen (saved_local_prompt) : 0;
407 pmt = (char *)xmalloc (len + 2);
409 - strcpy (pmt, saved_local_prompt);
413 - local_prompt = savestring (pmt);
414 - prompt_last_invisible = saved_last_invisible;
415 - prompt_visible_length = saved_visible_length + 1;
419 + /* will be overwritten by expand_prompt, called from rl_message */
420 prompt_physical_chars = saved_physical_chars + 1;
425 diff -Naur bash-3.1.orig/lib/readline/readline.c bash-3.1/lib/readline/readline.c
426 --- bash-3.1.orig/lib/readline/readline.c 2005-07-04 19:29:35.000000000 -0700
427 +++ bash-3.1/lib/readline/readline.c 2006-04-19 15:58:34.000000000 -0700
431 rl_prompt = prompt ? savestring (prompt) : (char *)NULL;
432 + rl_display_prompt = rl_prompt ? rl_prompt : "";
434 rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
436 diff -Naur bash-3.1.orig/lib/readline/terminal.c bash-3.1/lib/readline/terminal.c
437 --- bash-3.1.orig/lib/readline/terminal.c 2005-11-12 17:46:54.000000000 -0800
438 +++ bash-3.1/lib/readline/terminal.c 2006-04-19 15:58:34.000000000 -0700
440 static char *_rl_visible_bell;
442 /* Non-zero means the terminal can auto-wrap lines. */
443 -int _rl_term_autowrap;
444 +int _rl_term_autowrap = -1;
446 /* Non-zero means that this terminal has a meta key. */
447 static int term_has_meta;
449 _rl_set_screen_size (rows, cols)
452 + if (_rl_term_autowrap == -1)
453 + _rl_init_terminal_io (rl_terminal_name);
456 _rl_screenheight = rows;
458 diff -Naur bash-3.1.orig/parse.y bash-3.1/parse.y
459 --- bash-3.1.orig/parse.y 2005-11-11 20:14:18.000000000 -0800
460 +++ bash-3.1/parse.y 2006-04-19 15:58:34.000000000 -0700
461 @@ -2716,6 +2716,7 @@
462 #define P_ALLOWESC 0x02
463 #define P_DQUOTE 0x04
464 #define P_COMMAND 0x08 /* parsing a command, so look for comments */
465 +#define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */
467 static char matched_pair_error;
469 @@ -2725,12 +2726,12 @@
472 int count, ch, was_dollar, in_comment, check_comment;
473 - int pass_next_character, nestlen, ttranslen, start_lineno;
474 + int pass_next_character, backq_backslash, nestlen, ttranslen, start_lineno;
475 char *ret, *nestret, *ttrans;
476 int retind, retsize, rflags;
479 - pass_next_character = was_dollar = in_comment = 0;
480 + pass_next_character = backq_backslash = was_dollar = in_comment = 0;
481 check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
483 /* RFLAGS is the set of flags we want to pass to recursive calls. */
484 @@ -2742,11 +2743,8 @@
485 start_lineno = line_number;
489 - ch = shell_getc ((qc != '\'' || (flags & P_ALLOWESC)) && pass_next_character == 0);
491 - ch = shell_getc (qc != '\'' && pass_next_character == 0);
493 + ch = shell_getc (qc != '\'' && pass_next_character == 0 && backq_backslash == 0);
498 @@ -2771,9 +2769,16 @@
501 /* Not exactly right yet */
502 - else if (check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind -1])))
503 + else if MBTEST(check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1])))
506 + /* last char was backslash inside backquoted command substitution */
507 + if (backq_backslash)
509 + backq_backslash = 0;
510 + /* Placeholder for adding special characters */
513 if (pass_next_character) /* last char was backslash */
515 pass_next_character = 0;
516 @@ -2814,6 +2819,8 @@
518 if MBTEST((flags & P_ALLOWESC) && ch == '\\')
519 pass_next_character++;
520 + else if MBTEST((flags & P_BACKQUOTE) && ch == '\\')
525 @@ -2898,7 +2905,11 @@
527 else if MBTEST(qc == '`' && (ch == '"' || ch == '\'') && in_comment == 0)
529 - nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags);
530 + /* Add P_BACKQUOTE so backslash quotes the next character and
531 + shell_getc does the right thing with \<newline>. We do this for
532 + a measure of backwards compatibility -- it's not strictly the
533 + right POSIX thing. */
534 + nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags|P_BACKQUOTE);
537 else if MBTEST(was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
538 @@ -2907,7 +2918,7 @@
539 if (open == ch) /* undo previous increment */
541 if (ch == '(') /* ) */
542 - nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags);
543 + nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags & ~P_DQUOTE);
544 else if (ch == '{') /* } */
545 nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
546 else if (ch == '[') /* ] */
547 @@ -3578,7 +3589,7 @@
550 compound_assignment = 1;
555 goto got_token; /* ksh93 seems to do this */
556 @@ -3695,7 +3706,9 @@
558 b = builtin_address_internal (token, 0);
559 if (b && (b->flags & ASSIGNMENT_BUILTIN))
560 - parser_state |= PST_ASSIGNOK;
561 + parser_state |= PST_ASSIGNOK;
562 + else if (STREQ (token, "eval") || STREQ (token, "let"))
563 + parser_state |= PST_ASSIGNOK;
566 yylval.word = the_word;
567 @@ -4686,18 +4699,21 @@
571 - int tok, orig_line_number, orig_token_size;
572 + int tok, orig_line_number, orig_token_size, orig_last_token, assignok;
573 char *saved_token, *ret;
576 orig_token_size = token_buffer_size;
577 orig_line_number = line_number;
578 + orig_last_token = last_read_token;
580 last_read_token = WORD; /* WORD to allow reserved words here */
582 token = (char *)NULL;
583 token_buffer_size = 0;
585 + assignok = parser_state&PST_ASSIGNOK; /* XXX */
587 wl = (WORD_LIST *)NULL; /* ( */
588 parser_state |= PST_COMPASSIGN;
590 @@ -4740,7 +4756,7 @@
591 jump_to_top_level (DISCARD);
594 - last_read_token = WORD;
595 + last_read_token = orig_last_token; /* XXX - was WORD? */
598 rl = REVERSE_LIST (wl, WORD_LIST *);
599 @@ -4752,6 +4768,10 @@
602 *retlenp = (ret && *ret) ? strlen (ret) : 0;
605 + parser_state |= PST_ASSIGNOK;
610 diff -Naur bash-3.1.orig/patchlevel.h bash-3.1/patchlevel.h
611 --- bash-3.1.orig/patchlevel.h 2005-07-20 10:58:20.000000000 -0700
612 +++ bash-3.1/patchlevel.h 2006-04-19 15:59:29.000000000 -0700
614 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
615 looks for to find the patch level (for the sccs version string). */
617 -#define PATCHLEVEL 0
618 +#define PATCHLEVEL 17
620 #endif /* _PATCHLEVEL_H_ */
621 diff -Naur bash-3.1.orig/subst.c bash-3.1/subst.c
622 --- bash-3.1.orig/subst.c 2005-10-24 06:51:13.000000000 -0700
623 +++ bash-3.1/subst.c 2006-04-19 15:59:29.000000000 -0700
624 @@ -2187,7 +2187,7 @@
625 if (mklocal && variable_context)
627 v = find_variable (name);
628 - if (v == 0 || array_p (v) == 0)
629 + if (v == 0 || array_p (v) == 0 || v->context != variable_context)
630 v = make_local_array_variable (name);
631 v = assign_array_var_from_string (v, value, flags);
633 @@ -2575,6 +2575,13 @@
634 return (expand_string_to_string_internal (string, quoted, expand_string_assignment));
638 +expand_arith_string (string, quoted)
641 + return (expand_string_if_necessary (string, quoted, expand_string));
644 #if defined (COND_COMMAND)
645 /* Just remove backslashes in STRING. Returns a new string. */
647 @@ -5248,7 +5255,7 @@
651 - temp1 = expand_string_if_necessary (substr, Q_DOUBLE_QUOTES, expand_string);
652 + temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES);
653 *e1p = evalexp (temp1, &expok);
656 @@ -5293,7 +5300,7 @@
659 temp2 = savestring (t);
660 - temp1 = expand_string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string);
661 + temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
664 *e2p = evalexp (temp1, &expok);
665 @@ -6435,7 +6442,7 @@
666 temp2[t_index] = '\0';
668 /* Expand variables found inside the expression. */
669 - temp1 = expand_string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string);
670 + temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
674 @@ -6477,7 +6484,7 @@
677 /* Do initial variable expansion. */
678 - temp1 = expand_string_if_necessary (temp, Q_DOUBLE_QUOTES, expand_string);
679 + temp1 = expand_arith_string (temp, Q_DOUBLE_QUOTES);
683 @@ -6795,6 +6802,12 @@
684 if (temp && *temp && t_index > 0)
686 temp1 = bash_tilde_expand (temp, tflag);
687 + if (temp1 && *temp1 == '~' && STREQ (temp, temp1))
691 + goto add_character; /* tilde expansion failed */
696 diff -Naur bash-3.1.orig/subst.h bash-3.1/subst.h
697 --- bash-3.1.orig/subst.h 2004-11-07 12:12:28.000000000 -0800
698 +++ bash-3.1/subst.h 2006-04-19 15:59:29.000000000 -0700
700 extern char *expand_string_unsplit_to_string __P((char *, int));
701 extern char *expand_assignment_string_to_string __P((char *, int));
703 +/* Expand an arithmetic expression string */
704 +extern char *expand_arith_string __P((char *, int));
706 /* De-quoted quoted characters in STRING. */
707 extern char *dequote_string __P((char *));
709 diff -Naur bash-3.1.orig/variables.c bash-3.1/variables.c
710 --- bash-3.1.orig/variables.c 2005-11-12 18:22:37.000000000 -0800
711 +++ bash-3.1/variables.c 2006-04-19 15:58:34.000000000 -0700
714 char val[INT_STRLEN_BOUND(int) + 1], *v;
716 +#if defined (READLINE)
717 /* If we are currently assigning to LINES or COLUMNS, don't do anything. */
718 if (winsize_assignment)
722 v = inttostr (lines, val, sizeof (val));
723 bind_variable ("LINES", v, 0);