autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: M4 syntax $11 vs. ${11}


From: Paul Eggert
Subject: Re: M4 syntax $11 vs. ${11}
Date: Sun, 28 Jan 2007 17:27:12 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

> <http://lists.gnu.org/archive/html/libtool-patches/2005-01/msg00157.html>

Thanks for mentiong that, I put the following into the Autoconf manual:

2007-01-28  Paul Eggert  <address@hidden>

        * 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

--- doc/autoconf.texi   23 Jan 2007 18:47:23 -0000      1.1128
+++ doc/autoconf.texi   29 Jan 2007 01:25:44 -0000
@@ -11063,7 +11063,7 @@ available: it has most of the @samp{ksh8
 its own.  It usually sets @code{KSH_VERSION}, except if invoked as
 @command{/bin/sh} on address@hidden, and similarly to Bash you can require
 Posix compatibility by running @samp{set -o posix}.  Unfortunately, with
address@hidden 5.2.14 (the latest stable version as of February 2006)
address@hidden 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 address@hidden@var{var}:address@hidden@}
 Old @acronym{BSD} shells, including the Ultrix @code{sh}, don't accept the
 colon for any shell substitution, and complain and die.
+Similarly for address@hidden@var{var}:address@hidden@}, 
address@hidden@var{var}:address@hidden@}, etc.

 @item address@hidden@address@hidden@}
 @cindex address@hidden@address@hidden@}
@@ -11699,6 +11700,24 @@ use:
 test "address@hidden@}" = set || address@hidden@address@hidden
 @end example

address@hidden address@hidden@address@hidden
address@hidden address@hidden@address@hidden@}
address@hidden address@hidden@address@hidden@}
address@hidden address@hidden@address@hidden@}
address@hidden address@hidden@address@hidden@}
address@hidden address@hidden@address@hidden
address@hidden address@hidden@address@hidden@}
address@hidden address@hidden@address@hidden@}
address@hidden address@hidden@address@hidden@}
address@hidden address@hidden@address@hidden@}
+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
address@hidden@address@hidden should yield @samp{/b}, but with @command{pdksh} 
it
+yields the empty string.
+

 @item address@hidden
 @cindex address@hidden
@@ -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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]