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.62-16-g


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.62-16-gcc73f00
Date: Tue, 06 May 2008 15:55:03 +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=cc73f00e1832741a67a6cf77754ffe9ac1b7e2a5

The branch, master has been updated
       via  cc73f00e1832741a67a6cf77754ffe9ac1b7e2a5 (commit)
       via  2811da8583226d60b8082852f8f6085e8c47bd3d (commit)
      from  d92dcf1e0388d0ac7dcb1b4a566100ad7163dd88 (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 cc73f00e1832741a67a6cf77754ffe9ac1b7e2a5
Author: Eric Blake <address@hidden>
Date:   Tue May 6 09:33:11 2008 -0600

    Avoid overfull \hbox.
    
    * doc/autoconf.texi (Versioning): Reword to fit line size.
    
    Signed-off-by: Eric Blake <address@hidden>

commit 2811da8583226d60b8082852f8f6085e8c47bd3d
Author: Eric Blake <address@hidden>
Date:   Tue May 6 09:31:55 2008 -0600

    Document $(( )) pitfalls.
    
    * doc/autoconf.texi (Shell Substitutions): Mention octal
    vs. decimal.  Mention autotest's at_func_arith.
    
    Signed-off-by: Eric Blake <address@hidden>

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

Summary of changes:
 ChangeLog         |    7 +++++++
 doc/autoconf.texi |   43 +++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 59a3119..7c8e729 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-05-06  Eric Blake  <address@hidden>
 
+       Avoid overfull \hbox.
+       * doc/autoconf.texi (Versioning): Reword to fit line size.
+
+       Document $(( )) pitfalls.
+       * doc/autoconf.texi (Shell Substitutions): Mention octal
+       vs. decimal.  Mention autotest's at_func_arith.
+
        Improve behavior of './testsuite 01'.
        * lib/autotest/general.m4 (AT_INIT) <at_func_validate_ranges>:
        Alter usage to eval its arguments, in order to normalize away
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index a5e880a..3ea1106 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -1840,8 +1840,9 @@ rather than using @code{AC_PREREQ} to require the newer 
version of
 Autoconf.  However, remember that the Autoconf philosophy favors feature
 checks over version checks.
 
-You should never expand this macro directly, but instead use
address@hidden([AC_AUTOCONF_VERSION])}.  This is because some users might
+You should not expand this macro directly; use
address@hidden([AC_AUTOCONF_VERSION])} instead.  This is because some
+users might
 have a beta version of Autoconf installed, with arbitrary letters
 included in its version string.  This means it is possible for the
 version string to contain the name of a defined macro, such that
@@ -13203,6 +13204,44 @@ echo $(case x in x) echo hello;; esac)
 Arithmetic expansion is not portable as some shells (most
 notably Solaris 10 @command{/bin/sh}) don't support it.
 
+Among shells that do support @samp{$(( ))}, not all of them obey the
+Posix rule that octal and hexadecimal constants must be recognized:
+
address@hidden
+$ @kbd{bash -c 'echo $(( 010 + 0x10 ))'}
+24
+$ @kbd{zsh -c 'echo $(( 010 + 0x10 ))'}
+26
+$ @kbd{zsh -c 'emulate sh; echo $(( 010 + 0x10 ))'}
+24
+$ @kbd{pdksh -c 'echo $(( 010 + 0x10 ))'}
+pdksh:  010 + 0x10 : bad number `0x10'
+$ @kbd{pdksh -c 'echo $(( 010 ))'}
+10
address@hidden example
+
+When it is available, using arithmetic expansion provides a noticeable
+speedup in script execution; but testing for support requires
address@hidden to avoid syntax errors.  If shell function support has
+also been detected, then this construct can be used to assign @samp{foo}
+to an arithmetic result, provided all numeric arguments are provided in
+decimal and without a leading zero:
+
address@hidden
+if ( eval 'test $(( 1 + 1 )) = 2' ) 2>/dev/null; then
+  eval 'func_arith ()
+  @{
+    func_arith_result=$(( $* ))
+  @}'
+else
+  at_func_arith ()
+  @{
+    func_arith_result=`expr "$@@"`
+  @}
+fi
+func_arith 1 + 1
+foo=$func_arith_result
address@hidden example
 
 
 @item ^


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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