autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.65-108-


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.65-108-gb6a5157
Date: Fri, 02 Jul 2010 16:43:28 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=b6a515746aeeafac36b5faddb0ed1514b0569364

The branch, master has been updated
       via  b6a515746aeeafac36b5faddb0ed1514b0569364 (commit)
      from  a20b49a348ad3be3e56fba66b1a290590e41f41f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b6a515746aeeafac36b5faddb0ed1514b0569364
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 2 18:14:52 2010 +0200

    Describe a Solaris /bin/sh bug w.r.t. for loops.
    
    Fix the commit (forgot to 'git add .').
    
    * doc/autoconf.texi (Limitations of Shell Builtins) <for>:
    Document a bug of the 'for' builtin in Solaris /bin/sh, w.r.t.
    tokens seeming variable assignment in the list of arguments.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    6 ++----
 doc/autoconf.texi |   33 +++++++++------------------------
 2 files changed, 11 insertions(+), 28 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 11de524..9f5c879 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,10 @@
 2010-07-02  Stefano Lattarini  <address@hidden>
-           Eric Blake  <address@hidden>
+       and Eric Blake  <address@hidden>
 
        Describe a Solaris /bin/sh bug w.r.t. for loops.
        * doc/autoconf.texi (Limitations of Shell Builtins) <for>:
        Document a bug of the 'for' builtin in Solaris /bin/sh, w.r.t.
-       tokens seeming variable assignment in the list of arguments.
-       Report and final patch by Stefano Lattarini, useful suggestions
-       by Eric Blake.
+       tokens seeming variable assignment in the list of arguments.
 
 2010-06-23  Ralf Wildenhues  <address@hidden>
 
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 561fae8..6353f87 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -16705,43 +16705,28 @@ item @samp{$@@}, for more.
 
 In Solaris @command{/bin/sh}, when the list of arguments of a
 @command{for} loop starts with @emph{unquoted} tokens looking like
-variable assignments, the loop is not executed on that tokens:
+variable assignments, the loop is not executed on those tokens:
 
 @example
-$ @kbd{/bin/sh -c 'for v in a=b; do echo "$v"; done'}
-$ @kbd{/bin/sh -c 'for v in a=b d=c; do echo "$v"; done'}
-$ @kbd{/bin/sh -c 'for v in a=b x; do echo "$v"; done'}
+$ @kbd{/bin/sh -c 'for v in a=b c=d x e=f; do echo $v; done'}
 x
+e=f
 @end example
 
 @noindent
-Quoting the "assignment-like" tokens, or preceding them with "normal"
-tokens, solves the problem:
+Thankfully, quoting the assignment-like tokens, or starting the list
+with other tokens (including unquoted variable expansion that results in
+an assignment-like result), avoids the problem, so it is easy to work
+around:
 
 @example
-$ @kbd{/bin/sh -c 'for v in "a=b"; do echo "$v"; done'}
+$ @kbd{/bin/sh -c 'for v in "a=b"; do echo $v; done'}
 a=b
-$ @kbd{/bin/sh -c 'for v in x a=b; do echo "$v"; done'}
-x
-a=b
-$ @kbd{/bin/sh -c 'for v in x a=b d=c; do echo "$v"; done'}
-x
+$ @kbd{/bin/sh -c 'x=a=b; for v in $x c=d; do echo $v; done'}
 a=b
 c=d
 @end example
 
address@hidden
-Luckily enough, the bug is not triggered if the "assignment-like"
-tokens are the results of a variable expansion (even unquoted):
-
address@hidden
-$ @kbd{/bin/sh -c 'x="a=b"; for v in $x; do echo "$v"; done'}
-a=b
address@hidden example
-
address@hidden
-So, at least, the bug should be easy to grep for and to avoid.
-
 @anchor{if}
 @item @command{if}
 @c ---------------


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

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