From: Chet Ramey Date: Sat, 3 Dec 2011 18:36:28 +0000 (-0500) Subject: commit bash-20040914 snapshot X-Git-Tag: bash-3.1-alpha~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b66cc81633a2a902a6e94f3df814e510d33c0b87;p=thirdparty%2Fbash.git commit bash-20040914 snapshot --- diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 0e715d22b..0aaa078e1 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -10028,3 +10028,12 @@ parse.y - don't attempt to parse a compound assignment specially unless we're in a position where an assignment statement is acceptable, or PST_ASSIGNOK is set + + 9/13 + ---- +variables.c + - make BASH_ARGC, BASH_ARGV, BASH_LINENO, and BASH_SOURCE + non-unsettable, since the shell uses those values internally + +expr.c + - make exponentiation right-associative, as is apparently correct diff --git a/autom4te.cache/requests b/autom4te.cache/requests index ada195763..6ac24b719 100644 --- a/autom4te.cache/requests +++ b/autom4te.cache/requests @@ -15,96 +15,96 @@ 'configure.in' ], { - 'AC_PROG_GCC_TRADITIONAL' => 1, - 'AC_PROG_AWK' => 1, - 'AC_INIT' => 1, - 'AC_FUNC_REALLOC' => 1, - 'AC_FUNC_UTIME_NULL' => 1, + 'AC_HEADER_MAJOR' => 1, + 'AC_FUNC_GETPGRP' => 1, + 'AC_CONFIG_SUBDIRS' => 1, + 'AC_HEADER_STAT' => 1, + 'AC_FUNC_LSTAT' => 1, + 'AC_HEADER_DIRENT' => 1, + 'AC_FUNC_STAT' => 1, + 'AC_FUNC_SELECT_ARGTYPES' => 1, + 'AC_FUNC_CHOWN' => 1, + 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1, + 'AC_STRUCT_ST_BLOCKS' => 1, + 'AC_TYPE_PID_T' => 1, + 'AC_FUNC_STRERROR_R' => 1, 'AC_FUNC_VPRINTF' => 1, - 'AC_FUNC_STRTOD' => 1, - 'm4_include' => 1, - 'AC_FUNC_STRFTIME' => 1, - 'AM_GNU_GETTEXT' => 1, - 'AC_TYPE_OFF_T' => 1, - 'AC_C_CONST' => 1, 'AH_OUTPUT' => 1, - 'AC_FUNC_STAT' => 1, + 'm4_pattern_allow' => 1, + 'AC_CONFIG_HEADERS' => 1, + 'AC_FUNC_MEMCMP' => 1, + 'AC_HEADER_STDC' => 1, + 'AC_CHECK_HEADERS' => 1, + 'AC_FUNC_CLOSEDIR_VOID' => 1, + 'm4_include' => 1, 'AM_AUTOMAKE_VERSION' => 1, - 'AC_STRUCT_TM' => 1, + 'AC_CONFIG_AUX_DIR' => 1, + 'AC_FUNC_MALLOC' => 1, + 'AC_DECL_SYS_SIGLIST' => 1, + 'AC_C_CONST' => 1, 'AC_FUNC_SETPGRP' => 1, - 'AC_PATH_X' => 1, - 'AM_PROG_CC_C_O' => 1, - 'AC_FUNC_CHOWN' => 1, - 'AC_FUNC_ALLOCA' => 1, - 'AC_PROG_LN_S' => 1, 'AC_CANONICAL_SYSTEM' => 1, - 'm4_pattern_allow' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AC_FUNC_SELECT_ARGTYPES' => 1, + 'AC_C_VOLATILE' => 1, + 'AC_FUNC_FSEEKO' => 1, 'AC_FUNC_MBRTOWC' => 1, + 'AC_STRUCT_TM' => 1, + 'AC_FUNC_STRCOLL' => 1, + 'AC_HEADER_SYS_WAIT' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AC_CHECK_TYPES' => 1, + 'AC_CONFIG_FILES' => 1, + 'AC_CHECK_LIB' => 1, + 'include' => 1, + 'AC_FUNC_GETGROUPS' => 1, + 'AC_PATH_X' => 1, + 'AC_PROG_CC' => 1, + 'AC_FUNC_GETLOADAVG' => 1, + 'AC_HEADER_TIME' => 1, + 'AC_REPLACE_FNMATCH' => 1, 'AC_LIBSOURCE' => 1, + 'AC_PROG_LN_S' => 1, + 'AC_FUNC_OBSTACK' => 1, + 'AC_PROG_LEX' => 1, + 'AC_FUNC_STRTOD' => 1, + 'AC_TYPE_MODE_T' => 1, + 'AC_CHECK_MEMBERS' => 1, + 'AC_FUNC_ERROR_AT_LINE' => 1, 'AM_CONDITIONAL' => 1, - 'AC_HEADER_DIRENT' => 1, - 'AC_FUNC_STRERROR_R' => 1, - 'AC_C_INLINE' => 1, - 'AC_TYPE_PID_T' => 1, - 'AC_HEADER_MAJOR' => 1, - 'AC_CHECK_FUNCS' => 1, + 'AC_STRUCT_TIMEZONE' => 1, + 'AC_FUNC_REALLOC' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AM_GNU_GETTEXT' => 1, 'AC_PROG_MAKE_SET' => 1, - 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1, - 'AC_TYPE_UID_T' => 1, - 'm4_pattern_forbid' => 1, - 'AC_FUNC_GETLOADAVG' => 1, - 'AC_HEADER_STDC' => 1, - 'AC_TYPE_SIGNAL' => 1, - 'include' => 1, - 'AC_PROG_RANLIB' => 1, - 'AC_HEADER_STAT' => 1, - 'AC_DECL_SYS_SIGLIST' => 1, - 'AC_FUNC_MALLOC' => 1, + 'AC_FUNC_UTIME_NULL' => 1, + 'AC_PROG_CXX' => 1, + 'AC_FUNC_MMAP' => 1, + 'AC_PROG_GCC_TRADITIONAL' => 1, + 'AC_DEFINE_TRACE_LITERAL' => 1, + 'AC_PROG_AWK' => 1, 'AC_FUNC_FORK' => 1, - 'AC_CONFIG_AUX_DIR' => 1, - 'AC_SUBST' => 1, - 'AC_FUNC_MEMCMP' => 1, - 'AC_FUNC_WAIT3' => 1, + 'AC_FUNC_ALLOCA' => 1, 'AC_FUNC_SETVBUF_REVERSED' => 1, + 'AC_TYPE_OFF_T' => 1, + 'AC_PROG_RANLIB' => 1, + 'AC_TYPE_SIGNAL' => 1, 'AC_PROG_CPP' => 1, - 'AC_FUNC_GETGROUPS' => 1, - 'AC_CANONICAL_HOST' => 1, - 'AC_FUNC_CLOSEDIR_VOID' => 1, + 'AC_C_INLINE' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'AC_TYPE_UID_T' => 1, 'AC_PROG_YACC' => 1, - 'AC_STRUCT_ST_BLOCKS' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AC_FUNC_FSEEKO' => 1, - 'AC_CONFIG_FILES' => 1, - 'AC_PROG_INSTALL' => 1, 'AC_FUNC_STRNLEN' => 1, - 'AC_CONFIG_HEADERS' => 1, - 'AC_CHECK_TYPES' => 1, - 'AC_CHECK_MEMBERS' => 1, + 'AC_PROG_INSTALL' => 1, + 'AC_FUNC_WAIT3' => 1, + 'AC_CHECK_FUNCS' => 1, 'AM_MAINTAINER_MODE' => 1, - 'AC_CHECK_LIB' => 1, - 'AC_TYPE_SIZE_T' => 1, - 'AC_STRUCT_TIMEZONE' => 1, + 'AC_CANONICAL_HOST' => 1, + 'AC_FUNC_STRFTIME' => 1, 'AC_FUNC_MKTIME' => 1, + 'AC_SUBST' => 1, + 'AC_TYPE_SIZE_T' => 1, + 'AC_INIT' => 1, 'AC_FUNC_GETMNTENT' => 1, - 'AC_PROG_LEX' => 1, - 'AC_HEADER_SYS_WAIT' => 1, - 'AC_FUNC_MMAP' => 1, - 'AC_FUNC_GETPGRP' => 1, - 'AC_C_VOLATILE' => 1, - 'AC_TYPE_MODE_T' => 1, - 'AC_CHECK_HEADERS' => 1, - 'AC_FUNC_LSTAT' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - 'AC_FUNC_STRCOLL' => 1, - 'AC_REPLACE_FNMATCH' => 1, - 'AC_DEFINE_TRACE_LITERAL' => 1, - 'AC_HEADER_TIME' => 1, - 'AC_PROG_CXX' => 1, - 'AC_PROG_CC' => 1, - 'AC_FUNC_ERROR_AT_LINE' => 1, - 'AC_FUNC_OBSTACK' => 1 + 'm4_pattern_forbid' => 1 } ], 'Request' ) ); diff --git a/doc/bash.1 b/doc/bash.1 index 67ca943fa..5fb9b630d 100644 --- a/doc/bash.1 +++ b/doc/bash.1 @@ -3935,7 +3935,7 @@ sends a .B SIGHUP to all jobs when an interactive login shell exits. .PP -If \Bbash\fP is waiting for a command to complete and receives a signal +If \fBbash\fP is waiting for a command to complete and receives a signal for which a trap has been set, the trap will not be executed until the command completes. When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP diff --git a/doc/faq.headers.mail b/doc/faq.headers.mail index d65204ea3..cabad53f2 100644 --- a/doc/faq.headers.mail +++ b/doc/faq.headers.mail @@ -1,5 +1,5 @@ From: chet@po.cwru.edu (Chet Ramey) To: bug-bash@gnu.org -Subject: BASH Frequently-Asked Questions (FAQ version 3.27) +Subject: BASH Frequently-Asked Questions (FAQ version 3.29) Reply-To: chet@po.cwru.edu diff --git a/doc/faq.headers.news b/doc/faq.headers.news index 1f5dcd2c5..9c6e1fcf6 100644 --- a/doc/faq.headers.news +++ b/doc/faq.headers.news @@ -1,7 +1,7 @@ Newsgroups: comp.unix.shell,comp.unix.questions Distribution: world From: chet@po.cwru.edu (Chet Ramey) -Subject: BASH Frequently-Asked Questions (FAQ version 3.27) +Subject: BASH Frequently-Asked Questions (FAQ version 3.29) Organization: Case Western Reserve University Summary: A's to Q's about BASH, the Bourne-Again SHell Reply-To: chet@po.cwru.edu diff --git a/doc/faq.headers.news2 b/doc/faq.headers.news2 index a49abd079..28faf0738 100644 --- a/doc/faq.headers.news2 +++ b/doc/faq.headers.news2 @@ -1,6 +1,6 @@ Newsgroups: comp.unix.shell,comp.unix.questions,comp.answers,news.answers From: chet@po.cwru.edu (Chet Ramey) -Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.27) +Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.29) Organization: Case Western Reserve University Summary: A's to Q's about BASH, the Bourne-Again SHell Reply-To: chet@po.cwru.edu diff --git a/doc/faq.mail b/doc/faq.mail index cce087756..fa5347529 100644 --- a/doc/faq.mail +++ b/doc/faq.mail @@ -1,18 +1,18 @@ From: chet@po.cwru.edu (Chet Ramey) To: bug-bash@gnu.org -Subject: BASH Frequently-Asked Questions (FAQ version 3.27) +Subject: BASH Frequently-Asked Questions (FAQ version 3.29) Reply-To: chet@po.cwru.edu Archive-name: unix-faq/shell/bash Posting-Frequency: monthly Submitted-By: chet@po.cwru.edu (Chet Ramey) -Last-Modified: Tue Aug 3 09:54:24 EDT 2004 -FAQ-Version: 3.27 +Last-Modified: Mon Sep 13 09:03:53 EDT 2004 +FAQ-Version: 3.29 Bash-Version: 3.0 URL: ftp://ftp.cwru.edu/pub/bash/FAQ Maintainer: chet@po.cwru.edu (Chet Ramey) -This is the Bash FAQ, version 3.27, for Bash version 3.0. +This is the Bash FAQ, version 3.29, for Bash version 3.0. This document contains a set of frequently-asked questions concerning Bash, the GNU Bourne-Again Shell. Bash is a freely-available command @@ -195,16 +195,15 @@ earlier Minix versions yet. Bash has been ported to versions of Windows implementing the Win32 programming interface. This includes Windows 95 and Windows NT. -The port was done by Cygnus Solutions as part of their CYGWIN -project. For more information about the project, look at the URLs - -http://www.cygwin.com/ -http://sourceware.cygnus.com/cygwin +The port was done by Cygnus Solutions (now part of Red Hat) as part +of their CYGWIN project. For more information about the project, see +http://www.cygwin.com/. Cygnus originally ported bash-1.14.7, and that port was part of their early GNU-Win32 (the original name) releases. Cygnus has also done a -port of bash-2.05 to the CYGWIN environment, and it is available as -part of their current release. +port of bash-2.05b to the CYGWIN environment, and it is available as +part of their current release. Bash-3.0 is currently being tested and +should be available soon. Bash-2.05b and later versions should require no local Cygnus changes to build and run under CYGWIN. @@ -1777,7 +1776,6 @@ These are features that may or may not appear in a future version of bash. breaking some of the shell functionality into embeddable libraries a module system like zsh's, using dynamic loading like builtins -date-stamped command history a bash programmer's guide with a chapter on creating loadable builtins a better loadable interface to perl with access to the shell builtins and variables (contributions gratefully accepted) diff --git a/doc/faq.news b/doc/faq.news index c3c2b405b..fbdc65ff5 100644 --- a/doc/faq.news +++ b/doc/faq.news @@ -1,7 +1,7 @@ Newsgroups: comp.unix.shell,comp.unix.questions Distribution: world From: chet@po.cwru.edu (Chet Ramey) -Subject: BASH Frequently-Asked Questions (FAQ version 3.27) +Subject: BASH Frequently-Asked Questions (FAQ version 3.29) Organization: Case Western Reserve University Summary: A's to Q's about BASH, the Bourne-Again SHell Reply-To: chet@po.cwru.edu @@ -10,13 +10,13 @@ Followup-To: poster Archive-name: unix-faq/shell/bash Posting-Frequency: monthly Submitted-By: chet@po.cwru.edu (Chet Ramey) -Last-Modified: Tue Aug 3 09:54:24 EDT 2004 -FAQ-Version: 3.27 +Last-Modified: Mon Sep 13 09:03:53 EDT 2004 +FAQ-Version: 3.29 Bash-Version: 3.0 URL: ftp://ftp.cwru.edu/pub/bash/FAQ Maintainer: chet@po.cwru.edu (Chet Ramey) -This is the Bash FAQ, version 3.27, for Bash version 3.0. +This is the Bash FAQ, version 3.29, for Bash version 3.0. This document contains a set of frequently-asked questions concerning Bash, the GNU Bourne-Again Shell. Bash is a freely-available command @@ -199,16 +199,15 @@ earlier Minix versions yet. Bash has been ported to versions of Windows implementing the Win32 programming interface. This includes Windows 95 and Windows NT. -The port was done by Cygnus Solutions as part of their CYGWIN -project. For more information about the project, look at the URLs - -http://www.cygwin.com/ -http://sourceware.cygnus.com/cygwin +The port was done by Cygnus Solutions (now part of Red Hat) as part +of their CYGWIN project. For more information about the project, see +http://www.cygwin.com/. Cygnus originally ported bash-1.14.7, and that port was part of their early GNU-Win32 (the original name) releases. Cygnus has also done a -port of bash-2.05 to the CYGWIN environment, and it is available as -part of their current release. +port of bash-2.05b to the CYGWIN environment, and it is available as +part of their current release. Bash-3.0 is currently being tested and +should be available soon. Bash-2.05b and later versions should require no local Cygnus changes to build and run under CYGWIN. @@ -1781,7 +1780,6 @@ These are features that may or may not appear in a future version of bash. breaking some of the shell functionality into embeddable libraries a module system like zsh's, using dynamic loading like builtins -date-stamped command history a bash programmer's guide with a chapter on creating loadable builtins a better loadable interface to perl with access to the shell builtins and variables (contributions gratefully accepted) diff --git a/doc/faq.news2 b/doc/faq.news2 index 16402ce18..8f797f9cf 100644 --- a/doc/faq.news2 +++ b/doc/faq.news2 @@ -1,6 +1,6 @@ Newsgroups: comp.unix.shell,comp.unix.questions,comp.answers,news.answers From: chet@po.cwru.edu (Chet Ramey) -Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.27) +Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.29) Organization: Case Western Reserve University Summary: A's to Q's about BASH, the Bourne-Again SHell Reply-To: chet@po.cwru.edu @@ -10,13 +10,13 @@ Approved: news-answers-request@MIT.EDU Archive-name: unix-faq/shell/bash Posting-Frequency: monthly Submitted-By: chet@po.cwru.edu (Chet Ramey) -Last-Modified: Tue Aug 3 09:54:24 EDT 2004 -FAQ-Version: 3.27 +Last-Modified: Mon Sep 13 09:03:53 EDT 2004 +FAQ-Version: 3.29 Bash-Version: 3.0 URL: ftp://ftp.cwru.edu/pub/bash/FAQ Maintainer: chet@po.cwru.edu (Chet Ramey) -This is the Bash FAQ, version 3.27, for Bash version 3.0. +This is the Bash FAQ, version 3.29, for Bash version 3.0. This document contains a set of frequently-asked questions concerning Bash, the GNU Bourne-Again Shell. Bash is a freely-available command @@ -199,16 +199,15 @@ earlier Minix versions yet. Bash has been ported to versions of Windows implementing the Win32 programming interface. This includes Windows 95 and Windows NT. -The port was done by Cygnus Solutions as part of their CYGWIN -project. For more information about the project, look at the URLs - -http://www.cygwin.com/ -http://sourceware.cygnus.com/cygwin +The port was done by Cygnus Solutions (now part of Red Hat) as part +of their CYGWIN project. For more information about the project, see +http://www.cygwin.com/. Cygnus originally ported bash-1.14.7, and that port was part of their early GNU-Win32 (the original name) releases. Cygnus has also done a -port of bash-2.05 to the CYGWIN environment, and it is available as -part of their current release. +port of bash-2.05b to the CYGWIN environment, and it is available as +part of their current release. Bash-3.0 is currently being tested and +should be available soon. Bash-2.05b and later versions should require no local Cygnus changes to build and run under CYGWIN. @@ -1781,7 +1780,6 @@ These are features that may or may not appear in a future version of bash. breaking some of the shell functionality into embeddable libraries a module system like zsh's, using dynamic loading like builtins -date-stamped command history a bash programmer's guide with a chapter on creating loadable builtins a better loadable interface to perl with access to the shell builtins and variables (contributions gratefully accepted) diff --git a/doc/faq.version b/doc/faq.version index ed93f3c59..0a9c3cf13 100644 --- a/doc/faq.version +++ b/doc/faq.version @@ -1,8 +1,8 @@ Archive-name: unix-faq/shell/bash Posting-Frequency: monthly Submitted-By: chet@po.cwru.edu (Chet Ramey) -Last-Modified: Tue Aug 3 09:54:24 EDT 2004 -FAQ-Version: 3.27 +Last-Modified: Mon Sep 13 09:03:53 EDT 2004 +FAQ-Version: 3.29 Bash-Version: 3.0 URL: ftp://ftp.cwru.edu/pub/bash/FAQ Maintainer: chet@po.cwru.edu (Chet Ramey) diff --git a/expr.c b/expr.c index a45e6a7cd..18beccb24 100644 --- a/expr.c +++ b/expr.c @@ -769,7 +769,7 @@ exppower () while (curtok == POWER) { readtok (); - val2 = exp1 (); + val2 = exppower (); /* exponentiation is right-associative */ if (val2 == 0) return (1); if (val2 < 0) diff --git a/lib/sh/strnlen.c b/lib/sh/strnlen.c index 53e2fe2c0..90ec2f805 100644 --- a/lib/sh/strnlen.c +++ b/lib/sh/strnlen.c @@ -32,7 +32,7 @@ strnlen (s, maxlen) register const char *e; size_t n; - for (e = s,n = 0; *e && n < maxlen; e++, n++) + for (e = s, n = 0; *e && n < maxlen; e++, n++) ; return n; } diff --git a/variables.c b/variables.c index d1a9c30a0..7d4d93092 100644 --- a/variables.c +++ b/variables.c @@ -1419,11 +1419,11 @@ initialize_dynamic_variables () v = init_dynamic_array_var ("GROUPS", get_groupset, null_array_assign, att_noassign); # if defined (DEBUGGER) - v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, att_noassign); - v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, att_noassign); + v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, att_noassign|att_nounset); + v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, att_noassign|att_nounset); # endif /* DEBUGGER */ - v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, att_noassign); - v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, att_noassign); + v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, att_noassign|att_nounset); + v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, att_noassign|att_nounset); #endif v = init_funcname_var ();