]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Don't use "shift 2".
authorStepan Kasal <kasal@ucw.cz>
Wed, 25 May 2005 06:45:11 +0000 (06:45 +0000)
committerStepan Kasal <kasal@ucw.cz>
Wed, 25 May 2005 06:45:11 +0000 (06:45 +0000)
ChangeLog
bin/autoconf.as
doc/autoconf.texi

index 7e19efd15787ca280bbfdcce23f6c9ccd3b9c802..4143a35f6ca705e5f7d8a9e1e4b6277ace548bf1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-25  Stepan Kasal  <kasal@ucw.cz>
+
+       * bin/autoconf.as: Don't use "shift 2"; it's not portable enough.
+       * doc/autoconf.texi (Limitations of Builtins): Document this
+         limitation.
+
 2005-05-24  Stepan Kasal  <kasal@ucw.cz>
 
        * lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG): New macro to factor out
index 6c41e26d46b57633ed9323d60d29a682732d4e76..b9e90a8ec215d92a95dd2116751fd68d6922e0be 100644 (file)
@@ -113,7 +113,7 @@ while test $# -gt 0 ; do
     --warnings | -W )
        test $# = 1 && eval "$exit_missing_arg"
        autom4te_options="$autom4te_options $option '$2'"
-       shift 2 ;;
+       shift; shift ;;
 
     --trace=* | -t?* )
        traces="$traces --trace='"`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`"'"
@@ -121,7 +121,7 @@ while test $# -gt 0 ; do
     --trace | -t )
        test $# = 1 && eval "$exit_missing_arg"
        traces="$traces --trace='"`echo "$2" | sed "s/'/'\\\\\\\\''/g"`"'"
-       shift 2 ;;
+       shift; shift ;;
     --initialization | -i )
        autom4te_options="$autom4te_options --melt"
        shift;;
@@ -132,7 +132,7 @@ while test $# -gt 0 ; do
     --output | -o )
        test $# = 1 && eval "$exit_missing_arg"
        outfile=$2
-       shift 2 ;;
+       shift; shift ;;
 
     -- )     # Stop option processing
        shift; break ;;
index bd915acab13dc3f36fbee1d0caea127a42aa9979..31e705681f88b380baced92ea8af9dba0122c287 100644 (file)
@@ -11207,6 +11207,9 @@ Not only is @command{shift}ing a bad idea when there is nothing left to
 shift, but in addition it is not portable: the shell of @acronym{MIPS
 RISC/OS} 4.52 refuses to do it.
 
+Don't use @samp{shift 2} etc.; it was not in the 7th Edition Bourne shell,
+and it is also absent in many pre-POSIX shells.
+
 
 @item @command{source}
 @c -------------------