[PATCH] Document that $((expression)) is not portable.

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

 



	* doc/autoconf.texi (Shell Substitutions): Here.

Signed-off-by: Benoit Sigoure <tsuna@xxxxxxxxxxxxx>
---
My bad, the fact that ${foo#bar} and friends are not portable was already
documented under the section `Shell Substitutions'.  The only thing that
wasn't documented so far was $((expression)).  `${parameter/pattern/string}'
is not documented either but I think that people know it's a Bash extension.

Wouldn't it be easier to list things that actually work on Solaris /bin/sh?
:P

 ChangeLog         |    5 +++++
 doc/autoconf.texi |    8 ++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index aaf50a8..8605f1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-11  Benoit Sigoure  <tsuna@xxxxxxxxxxxxx>
+
+	Document that $((expression)) is not portable.
+	* doc/autoconf.texi (Shell Substitutions): Here.
+
 2007-11-10  Jim Meyering  <meyering@xxxxxxxxxx>
 
 	Generate package.m4 in build-dir, not srcdir.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 421056e..42a26ef 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -13061,6 +13061,14 @@ mishandle them.  For example, Bash 3.1, @samp{ksh88}, @command{pdksh}
 echo $(case x in x) echo hello;; esac)
 @end example
 
+
+@item $((@var{expression}))
+@cindex $((@var{expression}))
+Arithmetic expansions are not considered portable as some shells (most
+notably Solaris 10 @command{/bin/sh}) don't support them.
+
+
+
 @item ^
 @cindex ^ quoting
 Always quote @samp{^}, otherwise traditional shells such as
-- 
1.5.3.5.654.gdd5ec



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux