r1310 - in trunk: . bash

jim at linuxfromscratch.org jim at linuxfromscratch.org
Thu Dec 22 00:28:36 PST 2005


Author: jim
Date: 2005-12-22 01:28:31 -0700 (Thu, 22 Dec 2005)
New Revision: 1310

Added:
   trunk/bash/bash-3.1-fixes-1.patch
Modified:
   trunk/
Log:
 r1609 at server:  jim | 2005-12-22 00:27:16 -0800
 Added: bash-3.1-fixes-1.patch



Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - cc2644d5-6cf8-0310-b111-c40428001e49:/patches:1608
   + cc2644d5-6cf8-0310-b111-c40428001e49:/patches:1609

Added: trunk/bash/bash-3.1-fixes-1.patch
===================================================================
--- trunk/bash/bash-3.1-fixes-1.patch	2005-12-22 08:27:33 UTC (rev 1309)
+++ trunk/bash/bash-3.1-fixes-1.patch	2005-12-22 08:28:31 UTC (rev 1310)
@@ -0,0 +1,79 @@
+Submitted By: Jim Gifford (patches at jg555 dot com)
+Date: 2005-12-22
+Initial Package Version: 3.1
+Origin: Upstream
+Upstream Status: Applied 
+Description: Contains Patch 001 from Upstream
+
+001 - 	There are parsing problems with compound assignments in several contexts,
+	including as arguments to builtins like `local', `eval', and `let', and
+	as multiple assignments in a single command.
+ 
+diff -Naur bash-3.1.orig/parse.y bash-3.1/parse.y
+--- bash-3.1.orig/parse.y	2005-11-12 04:14:18.000000000 +0000
++++ bash-3.1/parse.y	2005-12-22 08:25:48.000000000 +0000
+@@ -3695,7 +3695,9 @@
+       struct builtin *b;
+       b = builtin_address_internal (token, 0);
+       if (b && (b->flags & ASSIGNMENT_BUILTIN))
+-        parser_state |= PST_ASSIGNOK;
++	parser_state |= PST_ASSIGNOK;
++      else if (STREQ (token, "eval") || STREQ (token, "let"))
++	parser_state |= PST_ASSIGNOK;
+     }
+ 
+   yylval.word = the_word;
+@@ -4686,18 +4688,21 @@
+      int *retlenp;
+ {
+   WORD_LIST *wl, *rl;
+-  int tok, orig_line_number, orig_token_size;
++  int tok, orig_line_number, orig_token_size, orig_last_token, assignok;
+   char *saved_token, *ret;
+ 
+   saved_token = token;
+   orig_token_size = token_buffer_size;
+   orig_line_number = line_number;
++  orig_last_token = last_read_token;
+ 
+   last_read_token = WORD;	/* WORD to allow reserved words here */
+ 
+   token = (char *)NULL;
+   token_buffer_size = 0;
+ 
++  assignok = parser_state&PST_ASSIGNOK;		/* XXX */
++
+   wl = (WORD_LIST *)NULL;	/* ( */
+   parser_state |= PST_COMPASSIGN;
+ 
+@@ -4740,7 +4745,7 @@
+ 	jump_to_top_level (DISCARD);
+     }
+ 
+-  last_read_token = WORD;
++  last_read_token = orig_last_token;		/* XXX - was WORD? */
+   if (wl)
+     {
+       rl = REVERSE_LIST (wl, WORD_LIST *);
+@@ -4752,6 +4757,10 @@
+ 
+   if (retlenp)
+     *retlenp = (ret && *ret) ? strlen (ret) : 0;
++
++  if (assignok)
++    parser_state |= PST_ASSIGNOK;
++
+   return ret;
+ }
+ 
+diff -Naur bash-3.1.orig/patchlevel.h bash-3.1/patchlevel.h
+--- bash-3.1.orig/patchlevel.h	2005-07-20 17:58:20.000000000 +0000
++++ bash-3.1/patchlevel.h	2005-12-22 08:25:48.000000000 +0000
+@@ -25,6 +25,6 @@
+    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
+    looks for to find the patch level (for the sccs version string). */
+ 
+-#define PATCHLEVEL 0
++#define PATCHLEVEL 1
+ 
+ #endif /* _PATCHLEVEL_H_ */




More information about the patches mailing list