Hello,

> > >   * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Do not forget to reset
> > >   IFS even in case of empty `$PATH'.

> > > OK? (even if it makes `configure' scripts somewhat longer still ;-)

well, the following patch would save 170 bytes.

I think setting IFS and unsetting CDPATH is ``sanitizing''.
And I think the stack of depth 1 (as_save_IFS) has no practical value;
using a global default value is IMHO more sincere.

OK to commit?

Have a nice day,
        Stepan
2006-03-15  Stepan Kasal  <[EMAIL PROTECTED]>

        * lib/m4sugar/m4sh.m4 (_AS_PREPARE): Move the IFS setup and CDPATH
          sanitizing...
        (AS_SHELL_SANITIZE): ...here; set...
        (as_default_IFS): ...this new variable.
        (_AS_PATH_WALK): Use as_default_IFS.
        * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Use as_default_IFS.
        * lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES): Likewise.
        * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Likewise.
        * lib/autotest/general.m4 (AT_INIT): Likewise.
        

Index: lib/autoconf/functions.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/functions.m4,v
retrieving revision 1.96
diff -u -r1.96 functions.m4
--- lib/autoconf/functions.m4   3 Mar 2006 20:41:40 -0000       1.96
+++ lib/autoconf/functions.m4   15 Mar 2006 11:20:53 -0000
@@ -1371,9 +1371,9 @@
 # Provide a safe default value.
 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
 ])
-ac_save_IFS=$IFS; IFS=','
+IFS=','
 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
-IFS=$ac_save_IFS
+IFS=$as_default_IFS
 shift
 AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1, $[1],
                   [Define to the type of arg 1 for `select'.])
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.890
diff -u -r1.890 general.m4
--- lib/autoconf/general.m4     21 Feb 2006 07:16:33 -0000      1.890
+++ lib/autoconf/general.m4     15 Mar 2006 11:20:56 -0000
@@ -1658,14 +1658,14 @@
 *) AC_MSG_ERROR([invalid value of canonical $1]);;
 esac
 AC_SUBST([$1], [$ac_cv_$1])dnl
-ac_save_IFS=$IFS; IFS='-'
+IFS=-
 set x $ac_cv_$1
+IFS=$as_default_IFS
 shift
 AC_SUBST([$1_cpu], [$[1]])dnl
 AC_SUBST([$1_vendor], [$[2]])dnl
 shift; shift
 AC_SUBST([$1_os], [$[*]])dnl
-IFS=$ac_save_IFS
 ])# _AC_CANONICAL_SPLIT
 
 
Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.86
diff -u -r1.86 status.m4
--- lib/autoconf/status.m4      6 Mar 2006 22:34:34 -0000       1.86
+++ lib/autoconf/status.m4      15 Mar 2006 11:20:57 -0000
@@ -1352,10 +1352,9 @@
   :[[FH]]-) ac_tag=-:-;;
   :[[FH]]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
-  ac_save_IFS=$IFS
   IFS=:
   set x $ac_tag
-  IFS=$ac_save_IFS
+  IFS=$as_default_IFS
   shift
   ac_file=$[1]
   shift
Index: lib/autotest/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autotest/general.m4,v
retrieving revision 1.198
diff -u -r1.198 general.m4
--- lib/autotest/general.m4     12 Mar 2006 19:58:31 -0000      1.198
+++ lib/autotest/general.m4     15 Mar 2006 11:20:59 -0000
@@ -361,11 +361,10 @@
        ;;
     --keywords=* )
        at_groups_selected=$at_help_all
-       at_save_IFS=$IFS
        IFS=,
        set X $at_optarg
        shift
-       IFS=$at_save_IFS
+       IFS=$as_default_IFS
        for at_keyword
        do
          at_invert=
Index: lib/m4sugar/m4sh.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.161
diff -u -r1.161 m4sh.m4
--- lib/m4sugar/m4sh.m4 14 Mar 2006 07:18:18 -0000      1.161
+++ lib/m4sugar/m4sh.m4 15 Mar 2006 11:21:00 -0000
@@ -326,6 +326,13 @@
 _AS_PATH_SEPARATOR_PREPARE
 _AS_UNSET_PREPARE
 
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS="  $as_nl"
+as_default_IFS=$IFS
+
 # Find who we are.  Look in the path if we contain no path at all
 # relative or not.
 case $[0] in
@@ -371,6 +378,8 @@
 # Name of the executable.
 as_me=`AS_BASENAME("$[0]")`
 
+# CDPATH.
+$as_unset CDPATH
 ])
 
 
@@ -396,15 +405,6 @@
 _AS_TEST_PREPARE
 _AS_TR_CPP_PREPARE
 _AS_TR_SH_PREPARE
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS="  $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
 ])
 
 
@@ -889,17 +889,17 @@
 # path separators.
 m4_define([_AS_PATH_WALK],
 [AS_REQUIRE([_AS_PATH_SEPARATOR_PREPARE])dnl
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+IFS=$PATH_SEPARATOR
 m4_bmatch([$1], [[:;]],
 [as_dummy="$1"
 for as_dir in $as_dummy],
 [for as_dir in m4_default([$1], [$PATH])])
 do
-  IFS=$as_save_IFS
+  IFS=$as_default_IFS
   test -z "$as_dir" && as_dir=.
   $2
 done
-IFS=$as_save_IFS
+IFS=$as_default_IFS
 ])
 
 

Reply via email to