]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi (Limitations of Builtins): Add notes on printf
authorKevin Ryde <user42@zip.com.au>
Sun, 23 Feb 2003 23:00:02 +0000 (23:00 +0000)
committerKevin Ryde <user42@zip.com.au>
Sun, 23 Feb 2003 23:00:02 +0000 (23:00 +0000)
format starting with "-".

ChangeLog
doc/autoconf.texi

index c678906013a91a41693a74dc3c7139d4506373ce..ad32dddd4af3b2efd9947797326488b51ad38de3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-24  Kevin Ryde  <user42@zip.com.au>
+
+       * doc/autoconf.texi (Limitations of Builtins): Add notes on printf
+       format starting with "-".
+
 2003-02-20  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * doc/autoconf.texi (Limitations of Make): `foo=bar make -e'
index 9218575799b88db6d431b5b6cc5a0655b784d2c5..dbe0974108c51c4471668abc78a649a63013f56c 100644 (file)
@@ -9812,6 +9812,21 @@ fi
 @end example
 
 
+@item @command{printf}
+@c ------------------
+@prindex @command{printf}
+A format string starting with a @samp{-} can cause problems.
+@command{bash} (eg. 2.05b) will interpret it as an options string and
+give an error.  And @samp{--} to mark the end of options is not good
+in the NetBSD Almquist shell (eg. 0.4.6) which will take that
+literally as the format string.  Putting the @samp{-} in a @samp{%c}
+or @samp{%s} is probably the easiest way to avoid doubt,
+
+@example
+printf %s -foo
+@end example
+
+
 @item @command{pwd}
 @c ----------------
 @prindex @command{pwd}