Hi,

On Tue, May 24, 2005 at 09:51:22AM -0700, Paul Eggert wrote:
> > +       shift 2 ;;
> 
> You used this in a few places.  Could you please replace this with
> "shift; shift"?  "shift 2" was not in the 7th Edition Bourne shell,
> and it is also absent in many pre-POSIX shells that are still of some
> interest to Autoconf.  (I suppose this should be put into Shellology
> too, in the documentation.)  Thanks.

Actually, the script already contained one occurence; I added two more.
All three are now replaced; and I put a note to the manual.
See the attached patch.

Thank you for catching this.  (I had a dejavu feeling, but wasn't able
to find anything in the docs nor in the list archives.)

Have a nice day,
        Stepan Kasal
2005-05-25  Stepan Kasal  <[EMAIL PROTECTED]>

        * bin/autoconf.as: Don't use `shift 2'; it's not portable enough.
        * doc/autoconf.texi (Limitations of Builtins): Document this
          limitation.

Index: bin/autoconf.as
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autoconf.as,v
retrieving revision 1.14
diff -u -r1.14 autoconf.as
--- bin/autoconf.as     24 May 2005 07:20:42 -0000      1.14
+++ bin/autoconf.as     25 May 2005 06:40:27 -0000
@@ -113,7 +113,7 @@
     --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 @@
     --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 @@
     --output | -o )
        test $# = 1 && eval "$exit_missing_arg"
        outfile=$2
-       shift 2 ;;
+       shift; shift ;;
 
     -- )     # Stop option processing
        shift; break ;;
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.899
diff -u -r1.899 autoconf.texi
--- doc/autoconf.texi   20 May 2005 08:13:16 -0000      1.899
+++ doc/autoconf.texi   25 May 2005 06:40:29 -0000
@@ -11207,6 +11207,9 @@
 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 -------------------

Reply via email to