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.63-42-g


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-42-ge7c4402
Date: Tue, 14 Oct 2008 17:32:01 +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=e7c440252051aa3dac951e455260cacb8ba30027

The branch, master has been updated
       via  e7c440252051aa3dac951e455260cacb8ba30027 (commit)
      from  920874ceda729232661ff4f974a9fc4dbcac934b (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 e7c440252051aa3dac951e455260cacb8ba30027
Author: Eric Blake <address@hidden>
Date:   Tue Oct 14 11:26:58 2008 -0600

    Document shell function environment pitfall.
    
    * doc/autoconf.texi (Shell Functions): Document bugs in bash,
    Solaris /bin/sh.
    
    Signed-off-by: Eric Blake <address@hidden>

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

Summary of changes:
 ChangeLog         |    6 ++++++
 doc/autoconf.texi |   17 +++++++++++++++++
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d6337f6..071f2a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-14  Eric Blake  <address@hidden>
+
+       Document shell function environment pitfall.
+       * doc/autoconf.texi (Shell Functions): Document bugs in bash,
+       Solaris /bin/sh.
+
 2008-10-14  Paolo Bonzini  <address@hidden>
 
        Use m4_require to implement AS_REQUIRE.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index ff81c2e..dc86462 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -14225,6 +14225,23 @@ For example, Korn shells reset and restore trace 
output (@samp{set -x})
 and other options upon function entry and exit.  Inside a function,
 @acronym{IRIX} sh sets @samp{$0} to the function name.
 
+It is not portable to pass temporary environment variables to shell
+functions.  Solaris @command{/bin/sh} does not see the variable.  Meanwhile,
address@hidden 3.2 breaks the Posix rule that the assignment must not affect
+the current environment, but only when Posix compliance is requested!
+
address@hidden
+$ @kbd{/bin/sh -c 'func()@{ echo $a;@}; a=1 func; echo $a'}
address@hidden
address@hidden
+$ @kbd{bash -c 'func()@{ echo $a;@}; a=1 func; echo $a'}
address@hidden
address@hidden
+$ @kbd{bash -c 'set -o posix; func()@{ echo $a;@}; a=1 func; echo $a'}
address@hidden
address@hidden
address@hidden example
+
 Some ancient Bourne shell variants with function support did not reset
 @address@hidden, @var{i} >= 0}, upon function exit, so effectively the
 arguments of the script were lost after the first function invocation.


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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