diff options
Diffstat (limited to 'app-shells/bash/files/bash-4.0-comsub-comments.patch')
-rw-r--r-- | app-shells/bash/files/bash-4.0-comsub-comments.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app-shells/bash/files/bash-4.0-comsub-comments.patch b/app-shells/bash/files/bash-4.0-comsub-comments.patch new file mode 100644 index 000000000000..4a753d65be81 --- /dev/null +++ b/app-shells/bash/files/bash-4.0-comsub-comments.patch @@ -0,0 +1,31 @@ +http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00018.html + +*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500 +--- parse.y 2009-03-03 16:58:50.000000000 -0500 +*************** +*** 3172,3175 **** +--- 3179,3187 ---- + } + ++ /* Not exactly right yet, should handle shell metacharacters, too. If ++ any changes are made to this test, make analogous changes to subst.c: ++ extract_delimited_string(). */ ++ #define COMMENT_BEGIN(x) ((x) == '#' && (retind == 0 || ret[retind-1] == '\n' || shellblank (ret[retind - 1]))) ++ + /* Parse a $(...) command substitution. This is messier than I'd like, and + reproduces a lot more of the token-reading code than I'd like. */ +*************** +*** 3365,3369 **** + tflags &= ~LEX_RESWDOK; + } +! else if (shellbreak (ch) == 0) + { + tflags &= ~LEX_RESWDOK; +--- 3377,3383 ---- + tflags &= ~LEX_RESWDOK; + } +! else if MBTEST((tflags & LEX_CKCOMMENT) && COMMENT_BEGIN(ch)) +! ; /* don't turn off LEX_RESWDOK if we're starting a comment */ +! else if MBTEST(shellbreak (ch) == 0) + { + tflags &= ~LEX_RESWDOK; |