michael@13: This patch documents two implemented and classical command michael@13: line options "-v" and "-x". It is derived from Debian GNU/Linux. michael@13: michael@13: Index: doc/bash.1 michael@428: --- doc/bash.1.orig 2011-01-16 21:31:39.000000000 +0100 michael@428: +++ doc/bash.1 2011-02-21 18:56:01.000000000 +0100 michael@428: @@ -117,6 +117,12 @@ michael@13: This option allows the positional parameters to be set michael@13: when invoking an interactive shell. michael@13: .TP michael@13: +.B \-v michael@13: +Print shell input lines as they are read. michael@13: +.TP michael@13: +.B \-x michael@13: +Print commands and their arguments as they are executed. michael@13: +.TP michael@13: .B \-D michael@13: A list of all double-quoted strings preceded by \fB$\fP michael@333: is printed on the standard output. michael@13: michael@13: ----------------------------------------------------------------------------- michael@13: michael@13: Port to HP-UX 11i and similar less smart platforms. michael@13: michael@13: Index: configure michael@428: --- configure.orig 2011-02-07 23:03:22.000000000 +0100 michael@428: +++ configure 2011-02-21 18:56:01.000000000 +0100 michael@428: @@ -2202,6 +2202,7 @@ michael@13: *-beos*) opt_bash_malloc=no ;; # they say it's suitable michael@13: *-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment michael@13: *-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft michael@13: +*-hpux*) opt_bash_malloc=no ;; # HP HP-UX michael@13: esac michael@13: michael@13: # memory scrambling on free() michael@428: @@ -2270,7 +2271,7 @@ michael@13: michael@13: else michael@13: MALLOC_LIB= michael@13: - MALLOC_LIBRARY= michael@13: + MALLOC_LIBRARY=dummy michael@13: MALLOC_LDFLAGS= michael@13: MALLOC_DEP= michael@13: fi michael@13: Index: syntax.h michael@428: --- syntax.h.orig 2009-01-04 20:32:42.000000000 +0100 michael@428: +++ syntax.h 2011-02-21 18:56:01.000000000 +0100 michael@13: @@ -21,6 +21,8 @@ michael@13: #ifndef _SYNTAX_H_ michael@13: #define _SYNTAX_H_ michael@13: michael@13: +#include "config.h" michael@13: + michael@13: /* Defines for use by mksyntax.c */ michael@13: michael@13: #define slashify_in_quotes "\\`$\"\n" michael@13: michael@13: ----------------------------------------------------------------------------- michael@13: michael@13: This adds the OpenPKG packaging brand. michael@13: michael@13: Index: version.c michael@428: --- version.c.orig 2011-01-28 17:32:36.000000000 +0100 michael@428: +++ version.c 2011-02-21 18:56:01.000000000 +0100 michael@428: @@ -83,7 +83,7 @@ michael@13: show_shell_version (extended) michael@13: int extended; michael@13: { michael@428: - printf (_("GNU bash, version %s (%s)\n"), shell_version_string (), MACHTYPE); michael@428: + printf (_("GNU bash, version %s (%s) [@l_openpkg_release@]\n"), shell_version_string (), MACHTYPE); michael@13: if (extended) michael@428: { michael@428: printf ("%s\n", _(bash_copyright)); michael@13: michael@13: ----------------------------------------------------------------------------- michael@13: michael@428: Ensure that Autoconf and friends are not run. michael@13: michael@428: Index: Makefile.in michael@428: --- Makefile.in.orig 2010-12-01 01:22:42.000000000 +0100 michael@428: +++ Makefile.in 2011-02-21 18:56:01.000000000 +0100 michael@428: @@ -711,7 +711,6 @@ michael@13: michael@428: # comment out for distribution michael@428: $(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4 $(srcdir)/config.h.in michael@428: - cd $(srcdir) && autoconf michael@13: michael@428: # for chet michael@428: reconfig: force michael@13: michael@13: ----------------------------------------------------------------------------- michael@13: michael@570: Fix Bash getcwd(3) runtime issue seen on Solaris where size argument michael@428: of 0 does not malloc buffer as expected by Bash code. michael@13: michael@428: Index: builtins/common.c michael@428: --- builtins/common.c.orig 2011-01-05 23:51:26.000000000 +0100 michael@428: +++ builtins/common.c 2011-02-21 18:56:01.000000000 +0100 michael@428: @@ -553,10 +553,11 @@ michael@13: michael@428: if (the_current_working_directory == 0) michael@428: { michael@428: + char *t = xmalloc(PATH_MAX); michael@428: #if defined (GETCWD_BROKEN) michael@428: - the_current_working_directory = getcwd (0, PATH_MAX); michael@428: + the_current_working_directory = getcwd (t, PATH_MAX); michael@428: #else michael@428: - the_current_working_directory = getcwd (0, 0); michael@428: + the_current_working_directory = getcwd (t, PATH_MAX); michael@428: #endif michael@428: if (the_current_working_directory == 0) michael@428: { michael@428: michael@428: ----------------------------------------------------------------------------- michael@428: michael@428: Fix building under Linux. michael@428: michael@428: Index: externs.h michael@428: --- externs.h.orig 2010-11-30 02:59:20.000000000 +0100 michael@428: +++ externs.h 2011-02-21 18:56:01.000000000 +0100 michael@428: @@ -25,6 +25,7 @@ michael@428: # define _EXTERNS_H_ michael@13: michael@428: #include "stdc.h" michael@428: +#include michael@428: michael@428: /* Functions from expr.c. */ michael@428: extern intmax_t evalexp __P((char *, int *)); michael@428: