+2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * 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 <Ralf.Wildenhues@gmx.de>
* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Also
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:
@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}@}
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}`
@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