From 45df7197f1673d9555ccc9d0f1feb4a09b4480d6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 29 Jan 2007 01:26:12 +0000 Subject: [PATCH] * doc/autoconf.texi (Shellology): pdksh 5.2.14 is still the latest version. (Shell Substitutions): Note problems with @{var:=value} etc. Add a new section for problems with @{#var} etc. Problem noted by Ralf Wildenhues. See: http://lists.gnu.org/archive/html/libtool-patches/2005-01/msg00157.html --- ChangeLog | 9 +++++++++ doc/autoconf.texi | 23 +++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 374d4fd1..44055c56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-01-28 Paul Eggert + + * doc/autoconf.texi (Shellology): pdksh 5.2.14 is still the + latest version. + (Shell Substitutions): Note problems with @{var:=value} etc. + Add a new section for problems with @{#var} etc. Problem noted + by Ralf Wildenhues. See: + http://lists.gnu.org/archive/html/libtool-patches/2005-01/msg00157.html + 2007-01-23 Ralf Wildenhues * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Also diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 9d7291e3..f4db9d55 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -11063,7 +11063,7 @@ available: it has most of the @samp{ksh88} features along with a few of its own. It usually sets @code{KSH_VERSION}, except if invoked as @command{/bin/sh} on Open@acronym{BSD}, and similarly to Bash you can require Posix compatibility by running @samp{set -o posix}. Unfortunately, with -@command{pdksh} 5.2.14 (the latest stable version as of February 2006) +@command{pdksh} 5.2.14 (the latest stable version as of January 2007) Posix mode is buggy and causes @command{pdksh} to depart from Posix in at least one respect: @@ -11596,6 +11596,7 @@ bad substitution @c @cindex $@{@var{var}:-@var{value}@} Old @acronym{BSD} shells, including the Ultrix @code{sh}, don't accept the colon for any shell substitution, and complain and die. +Similarly for $@{@var{var}:=@var{value}@}, $@{@var{var}:?@var{value}@}, etc. @item $@{@var{var}=@var{literal}@} @cindex $@{@var{var}=@var{literal}@} @@ -11699,6 +11700,24 @@ use: test "$@{var+set@}" = set || var=@var{@{value@}} @end example +@item $@{#@var{var}@} +@itemx $@{@var{var}%@var{word}@} +@itemx $@{@var{var}%%@var{word}@} +@itemx $@{@var{var}#@var{word}@} +@itemx $@{@var{var}##@var{word}@} +@cindex $@{#@var{var}@} +@cindex $@{@var{var}%@var{word}@} +@cindex $@{@var{var}%%@var{word}@} +@cindex $@{@var{var}#@var{word}@} +@cindex $@{@var{var}##@var{word}@} +Posix requires support for these usages, but they do not work with many +traditional shells, e.g., Solaris 10 @command{/bin/sh}. + +Also, @command{pdksh} 5.2.14 mishandles some @var{word} forms. For +example if @samp{$1} is @samp{a/b} and @samp{$2} is @samp{a}, then +@samp{$@{1#$2@}} should yield @samp{/b}, but with @command{pdksh} it +yields the empty string. + @item `@var{commands}` @cindex `@var{commands}` @@ -11749,7 +11768,7 @@ releases of Solaris don't support it: @example $ @kbd{showrev -c /bin/sh | grep version} -Command version: SunOS 5.10 Generic 121004-01 Oct 2005 +Command version: SunOS 5.10 Generic 121005-03 Oct 2006 $ @kbd{echo $(echo blah)} syntax error: `(' unexpected @end example -- 2.11.4.GIT