http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00147.html
*** bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
--- bash-4.0/parse.y 2009-02-22 16:08:54.000000000 -0500
***************
*** 3307,3311 ****
/* Meta-characters that can introduce a reserved word. Not perfect yet. */
! if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && shellmeta(ch))
{
/* Add this character. */
--- 3307,3311 ----
/* Meta-characters that can introduce a reserved word. Not perfect yet. */
! if MBTEST((tflags & LEX_PASSNEXT) == 0 && (tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && shellmeta(ch))
{
/* Add this character. */
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00176.html
*** bash-4.0/builtins/exit.def 2009-01-04 14:32:22.000000000 -0500
--- bash-4.0/builtins/exit.def 2009-02-23 22:56:58.000000000 -0500
***************
*** 114,118 ****
if (jobs[i] && STOPPED (i))
stopmsg = JSTOPPED;
! else if (check_jobs_at_exit && stopmsg == 0 && RUNNING (i))
stopmsg = JRUNNING;
--- 114,118 ----
if (jobs[i] && STOPPED (i))
stopmsg = JSTOPPED;
! else if (check_jobs_at_exit && stopmsg == 0 && jobs[i] && RUNNING (i))
stopmsg = JRUNNING;
http://bugs.gentoo.org/211947
fix from Takashi YOSHII: dont use target ldflags for build apps
--- bash/Makefile.in
+++ bash/Makefile.in
@@ -143,7 +143,7 @@
CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
LDFLAGS = @LDFLAGS@ $(STATIC_LD) $(LOCAL_LDFLAGS) $(PROFILE_FLAGS) $(CFLAGS)
-LDFLAGS_FOR_BUILD = $(LDFLAGS)
+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD)
INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC)
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00158.html
make `return` accept negative values again
hack by me (vapier@gentoo.org) ... i'm not familiar with bash source code, so
i imagine this isn't the best way to do it ...
--- bash/builtins/return.def
+++ bash/builtins/return.def
@@ -60,9 +60,23 @@
return_builtin (list)
WORD_LIST *list;
{
+ int neg = 0;
+ if (list && list->word && list->word->word) {
+ char *word = list->word->word;
+ if (*word == '-') {
+ while (*word++)
+ if (!isdigit(*word))
+ break;
+ if (!*word)
+ neg = 1;
+ }
+ }
+
+ if (!neg) {
if (no_options (list))
return (EX_USAGE);
list = loptend; /* skip over possible `--' */
+ }
return_catch_value = get_exitstat (list);
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00142.html
*** bash-4.0/pcomplete.c 2009-02-01 17:12:31.000000000 -0500
--- bash/pcomplete.c 2009-02-22 17:08:25.000000000 -0500
***************
*** 1033,1036 ****
--- 1033,1037 ----
pps = &ps;
+ save_parser_state (pps);
begin_unwind_frame ("gen-shell-function-matches");
add_unwind_protect (restore_parser_state, (char *)pps);
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00177.html
*** bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
--- bash-4.0/parse.y 2009-02-23 22:40:55.000000000 -0500
***************
*** 1616,1623 ****
int *ret;
! ret = (int *)xmalloc (3 * sizeof (int));
ret[0] = last_read_token;
ret[1] = token_before_that;
ret[2] = two_tokens_ago;
return ret;
}
--- 1616,1624 ----
int *ret;
! ret = (int *)xmalloc (4 * sizeof (int));
ret[0] = last_read_token;
ret[1] = token_before_that;
ret[2] = two_tokens_ago;
+ ret[3] = current_token;
return ret;
}
***************
*** 1632,1635 ****
--- 1633,1637 ----
token_before_that = ts[1];
two_tokens_ago = ts[2];
+ current_token = ts[3];
}