command name was being completed.
r. Fixes to the pattern removal and pattern replacement expansions to deal
- with multibyte characters better.
+ with multibyte characters better (and faster).
s. Fix to the substring expansion (${param:off[:len]}) to deal with (possibly
multibyte) characters instead of raw bytes.
hand side of a parameter expansion such as ${word:="$@"} if the first
character of $IFS was not a space.
+x. Fixed a slight cosmetic problem when printing commands containing a
+ `>&word' redirection.
+
2. Changes to Readline
a. Change to history expansion functions to treat `^' as equivalent to word
remove_wpattern
- new function, wcsdup, wide-character version of strdup(3)
-
+ 2/4
+ ---
+print_cmd.c
+ - temporarily translate a >&filename redirection from
+ r_duplicating_output_word to r_err_and_out (as the expansion code
+ in redir.c does) so it prints without a leading `1' (file
+ descriptor)
+
+ 2/5
+ ---
+aclocal.m4
+ - add a check for wcsdup to BASH_CHECK_MULTIBYTE
+
+config.h.in
+ - add HAVE_WCSDUP define
AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN))
AC_CHECK_FUNC(wctomb, AC_DEFINE(HAVE_WCTOMB))
AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
+AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP))
AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
[AC_TRY_COMPILE([
@%:@! /bin/sh
-@%:@ From configure.in for Bash 3.0, version 3.161, from autoconf version AC_ACVERSION.
+@%:@ From configure.in for Bash 3.0, version 3.162, from autoconf version AC_ACVERSION.
@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by GNU Autoconf 2.57 for bash 3.0-beta1.
@%:@
fi
+echo "$as_me:$LINENO: checking for wcsdup" >&5
+echo $ECHO_N "checking for wcsdup... $ECHO_C" >&6
+if test "${ac_cv_func_wcsdup+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char wcsdup (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char wcsdup ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_wcsdup) || defined (__stub___wcsdup)
+choke me
+#else
+char (*f) () = wcsdup;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != wcsdup;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_wcsdup=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_wcsdup=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_wcsdup" >&5
+echo "${ECHO_T}$ac_cv_func_wcsdup" >&6
+if test $ac_cv_func_wcsdup = yes; then
+ cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_WCSDUP 1
+_ACEOF
+
+fi
+
echo "$as_me:$LINENO: checking for mbstate_t" >&5
echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
'configure.in'
],
{
- 'AC_TYPE_MODE_T' => 1,
- 'AC_C_VOLATILE' => 1,
- 'AC_FUNC_STRNLEN' => 1,
- 'AM_AUTOMAKE_VERSION' => 1,
- 'AC_PROG_LIBTOOL' => 1,
- 'AC_DEFINE_TRACE_LITERAL' => 1,
- 'AC_STRUCT_TM' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
- 'AC_TYPE_SIZE_T' => 1,
+ 'AC_FUNC_CHOWN' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AC_FUNC_ALLOCA' => 1,
+ 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+ 'AC_HEADER_SYS_WAIT' => 1,
'AC_PROG_LN_S' => 1,
- 'AC_PROG_MAKE_SET' => 1,
- 'AC_FUNC_FSEEKO' => 1,
- 'AC_LIBSOURCE' => 1,
- 'AC_C_INLINE' => 1,
- 'AC_DECL_SYS_SIGLIST' => 1,
- 'AC_FUNC_OBSTACK' => 1,
'AC_CHECK_FUNCS' => 1,
- 'AC_FUNC_UTIME_NULL' => 1,
- 'AC_STRUCT_ST_BLOCKS' => 1,
- 'AC_FUNC_GETLOADAVG' => 1,
- 'AC_PROG_INSTALL' => 1,
- 'AM_GNU_GETTEXT' => 1,
- 'AC_CONFIG_AUX_DIR' => 1,
- 'AC_HEADER_STDC' => 1,
- 'AC_PROG_YACC' => 1,
- 'AC_PROG_RANLIB' => 1,
- 'AC_CONFIG_HEADERS' => 1,
- 'AC_FUNC_STRCOLL' => 1,
+ 'AC_HEADER_DIRENT' => 1,
'AC_HEADER_TIME' => 1,
- 'AC_FUNC_WAIT3' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'AC_PROG_GCC_TRADITIONAL' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'AC_TYPE_OFF_T' => 1,
+ 'AC_FUNC_GETGROUPS' => 1,
'AC_SUBST' => 1,
- 'AH_OUTPUT' => 1,
- 'AC_FUNC_CHOWN' => 1,
- 'AC_FUNC_LSTAT' => 1,
- 'AC_PROG_CPP' => 1,
+ 'AC_LIBSOURCE' => 1,
+ 'AC_CANONICAL_HOST' => 1,
'AC_PROG_CXX' => 1,
- 'AC_HEADER_DIRENT' => 1,
- 'AC_FUNC_ERROR_AT_LINE' => 1,
- 'AC_FUNC_MBRTOWC' => 1,
- 'AC_PATH_X' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AC_FUNC_OBSTACK' => 1,
'AC_FUNC_STAT' => 1,
- 'm4_pattern_forbid' => 1,
- 'AC_TYPE_PID_T' => 1,
- 'AC_PROG_LEX' => 1,
- 'AC_TYPE_OFF_T' => 1,
- 'AC_PROG_CC' => 1,
- 'AC_CANONICAL_SYSTEM' => 1,
- 'AC_CHECK_LIB' => 1,
- 'AC_FUNC_SETVBUF_REVERSED' => 1,
- 'AC_CANONICAL_HOST' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ 'AC_PROG_AWK' => 1,
+ 'AC_FUNC_MALLOC' => 1,
+ 'AC_FUNC_STRTOD' => 1,
+ 'AC_FUNC_MKTIME' => 1,
+ 'AC_CONFIG_FILES' => 1,
+ 'AC_STRUCT_TIMEZONE' => 1,
+ 'AC_FUNC_FORK' => 1,
+ 'AC_FUNC_STRFTIME' => 1,
+ 'AC_C_VOLATILE' => 1,
+ 'AC_FUNC_GETLOADAVG' => 1,
+ 'AC_TYPE_MODE_T' => 1,
+ 'm4_pattern_allow' => 1,
'AC_FUNC_MMAP' => 1,
- 'AM_CONDITIONAL' => 1,
- 'AM_PROG_CC_C_O' => 1,
- 'm4_include' => 1,
+ 'AC_PROG_RANLIB' => 1,
'AC_HEADER_MAJOR' => 1,
- 'AC_FUNC_MKTIME' => 1,
- 'AC_FUNC_GETPGRP' => 1,
- 'AC_CHECK_HEADERS' => 1,
- 'AC_FUNC_STRTOD' => 1,
- 'AC_FUNC_MALLOC' => 1,
- 'AC_HEADER_SYS_WAIT' => 1,
- 'AC_FUNC_SELECT_ARGTYPES' => 1,
- 'AC_FUNC_VPRINTF' => 1,
- 'AC_FUNC_STRERROR_R' => 1,
- 'AC_CHECK_MEMBERS' => 1,
+ 'AC_FUNC_ERROR_AT_LINE' => 1,
+ 'AC_FUNC_FSEEKO' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'AC_PATH_X' => 1,
+ 'AC_TYPE_UID_T' => 1,
+ 'AC_DEFINE_TRACE_LITERAL' => 1,
+ 'AC_PROG_INSTALL' => 1,
'AC_INIT' => 1,
+ 'AC_CHECK_LIB' => 1,
+ 'AC_STRUCT_TM' => 1,
+ 'AC_FUNC_SETPGRP' => 1,
+ 'AC_HEADER_STAT' => 1,
+ 'AC_FUNC_STRCOLL' => 1,
+ 'm4_include' => 1,
+ 'AC_STRUCT_ST_BLOCKS' => 1,
'AM_MAINTAINER_MODE' => 1,
- 'AC_C_CONST' => 1,
- 'AC_FUNC_MEMCMP' => 1,
- 'AM_INIT_AUTOMAKE' => 1,
- 'AC_FUNC_ALLOCA' => 1,
- 'm4_pattern_allow' => 1,
- 'AC_STRUCT_TIMEZONE' => 1,
- 'AC_PROG_AWK' => 1,
'AC_FUNC_REALLOC' => 1,
- 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'include' => 1,
- 'AC_TYPE_SIGNAL' => 1,
- 'AC_FUNC_FORK' => 1,
+ 'AC_FUNC_MEMCMP' => 1,
+ 'AC_FUNC_VPRINTF' => 1,
+ 'AC_PROG_CPP' => 1,
+ 'AC_TYPE_PID_T' => 1,
+ 'AC_C_INLINE' => 1,
+ 'AC_FUNC_WAIT3' => 1,
+ 'AC_FUNC_GETPGRP' => 1,
+ 'AC_HEADER_STDC' => 1,
+ 'AC_FUNC_STRNLEN' => 1,
+ 'AC_FUNC_MBRTOWC' => 1,
+ 'AC_C_CONST' => 1,
+ 'AC_FUNC_SELECT_ARGTYPES' => 1,
+ 'AM_PROG_CC_C_O' => 1,
'AC_CONFIG_SUBDIRS' => 1,
- 'AC_PROG_GCC_TRADITIONAL' => 1,
- 'AC_CONFIG_FILES' => 1,
- 'AC_FUNC_GETGROUPS' => 1,
+ 'AC_CHECK_MEMBERS' => 1,
+ 'AC_FUNC_STRERROR_R' => 1,
+ 'AC_CHECK_HEADERS' => 1,
'AC_CHECK_TYPES' => 1,
- 'AC_FUNC_SETPGRP' => 1,
+ 'AC_FUNC_GETMNTENT' => 1,
'AC_REPLACE_FNMATCH' => 1,
- 'AC_FUNC_STRFTIME' => 1,
- 'AC_HEADER_STAT' => 1,
- 'AC_TYPE_UID_T' => 1,
- 'AC_FUNC_GETMNTENT' => 1
+ 'AC_FUNC_SETVBUF_REVERSED' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AC_PROG_YACC' => 1,
+ 'AC_TYPE_SIGNAL' => 1,
+ 'AC_DECL_SYS_SIGLIST' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ 'AC_PROG_CC' => 1,
+ 'AC_TYPE_SIZE_T' => 1,
+ 'AC_FUNC_UTIME_NULL' => 1,
+ 'AH_OUTPUT' => 1,
+ 'AC_PROG_LEX' => 1,
+ 'AC_FUNC_LSTAT' => 1,
+ 'AC_PROG_MAKE_SET' => 1
}
], 'Request' )
);
m4trace:configure.in:696: -2- AC_DEFINE_TRACE_LITERAL([HAVE_MBRLEN])
m4trace:configure.in:696: -2- AC_DEFINE_TRACE_LITERAL([HAVE_WCTOMB])
m4trace:configure.in:696: -2- AC_DEFINE_TRACE_LITERAL([HAVE_WCWIDTH])
+m4trace:configure.in:696: -2- AC_DEFINE_TRACE_LITERAL([HAVE_WCSDUP])
m4trace:configure.in:696: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MBSTATE_T])
m4trace:configure.in:696: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LANGINFO_CODESET])
m4trace:configure.in:700: -1- AC_CHECK_LIB([dl], [dlopen])
/* Define if you have the wait3 function. */
#undef HAVE_WAIT3
+/* Define if you have the wcsdup function. */
+#undef HAVE_WCSDUP
+
/* Define if you have the wctomb function. */
#undef HAVE_WCTOMB
#! /bin/sh
-# From configure.in for Bash 3.0, version 3.161, from autoconf version AC_ACVERSION.
+# From configure.in for Bash 3.0, version 3.162, from autoconf version AC_ACVERSION.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57 for bash 3.0-beta1.
#
fi
+echo "$as_me:$LINENO: checking for wcsdup" >&5
+echo $ECHO_N "checking for wcsdup... $ECHO_C" >&6
+if test "${ac_cv_func_wcsdup+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char wcsdup (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char wcsdup ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_wcsdup) || defined (__stub___wcsdup)
+choke me
+#else
+char (*f) () = wcsdup;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != wcsdup;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_wcsdup=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_wcsdup=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_wcsdup" >&5
+echo "${ECHO_T}$ac_cv_func_wcsdup" >&6
+if test $ac_cv_func_wcsdup = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSDUP 1
+_ACEOF
+
+fi
+
echo "$as_me:$LINENO: checking for mbstate_t" >&5
echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-AC_REVISION([for Bash 3.0, version 3.161, from autoconf version] AC_ACVERSION)dnl
+AC_REVISION([for Bash 3.0, version 3.162, from autoconf version] AC_ACVERSION)dnl
define(bashvers, 3.0)
define(relstatus, beta1)
else
hdtail = heredocs = newredir;
}
+ else if (redirects->instruction == r_duplicating_output_word && redirects->redirector == 1)
+ {
+ /* Temporarily translate it as the execution code does. */
+ redirects->instruction = r_err_and_out;
+ print_redirection (redirects);
+ redirects->instruction = r_duplicating_output_word;
+ }
else
print_redirection (redirects);
static char *remove_upattern __P((char *, char *, int));
#if defined (HANDLE_MULTIBYTE)
+# if !defined (HAVE_WCSDUP)
static wchar_t *wcsdup __P((wchar_t *));
+# endif
static wchar_t *remove_wpattern __P((wchar_t *, size_t, wchar_t *, int));
#endif
static char *remove_pattern __P((char *, char *, int));
}
#if defined (HANDLE_MULTIBYTE)
+
+#if !defined (HAVE_WCSDUP)
static wchar_t *
wcsdup (ws)
wchar_t *ws;
return ret;
return (wcscpy (ret, ws));
}
+#endif /* !HAVE_WCSDUP */
static wchar_t *
remove_wpattern (wparam, wstrlen, wpattern, op)
-BUILD_DIR=/usr/local/build/bash/bash-current
+BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR