[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f
From: |
Ralf Wildenhues |
Subject: |
Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f |
Date: |
Sun, 7 Nov 2010 14:14:19 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* Jim Meyering wrote on Sun, Nov 07, 2010 at 12:22:13PM CET:
> Ralf Wildenhues wrote:
> > * Jim Meyering wrote on Sat, Nov 06, 2010 at 06:14:05PM CET:
> >> Ralf Wildenhues wrote:
> >> > - Posix does not require IFS to be set upon script startup. It only
> >> > requires
> >> > that, if IFS is unset, word splitting ought to behave as if it were set
> >> > to
> >> > space, tab, and newline, in that order. That is why the startup code of
> >> > all
> >> > autotools scripts explicitly sets IFS, so that saving and restoring
> >> > works.
> >>
> >> Thanks. That's good to know, but it appears not to be an issue
> >> for any shell that gets past the init.sh tests.
> >
> > Are you sure? It affects any test that saves and restores IFS in any
> > way.
> Do you know of a modern shell that acts as you describe?
> I've run the following on a decent selection of systems,
> and saw no failure:
Some version of dash did that, IIRC. A wild guess would
be RH 6 (yes, quite a while ago, I haven't come across it
again since). Point is that Posix allows the behavior.
> If some shell does fail, perhaps init.sh should use a patch like the
> following.
> I hesitate to add code like this, unless there's at least one
> known system where it makes a difference.
The fix looks good to me.
Thanks,
Ralf
> --- a/tests/init.sh
> +++ b/tests/init.sh
> @@ -330,6 +330,12 @@ setup_()
> || fail_ "failed to create temporary directory in $initial_cwd_"
> cd "$test_dir_"
>
> + # As autoconf-generated configure scripts do, ensure that IFS is defined
> + # initially, so that saving and restoring $IFS works.
> + gl_init_sh_nl_='
> +'
> + IFS=" "" $gl_init_sh_nl_"
> +
> # This trap statement, along with a trap on 0 below, ensure that the
> # temporary directory, $test_dir_, is removed upon exit as well as
> # upon receipt of any of the listed signals.
>
- [coreutils] Re: Builds of coreutils-8.6.19-1369f, Jim Meyering, 2010/11/06
- [coreutils] Re: Builds of coreutils-8.6.19-1369f, Andreas Schwab, 2010/11/06
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Jim Meyering, 2010/11/06
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Jim Meyering, 2010/11/06
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Ralf Wildenhues, 2010/11/06
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Jim Meyering, 2010/11/06
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Ralf Wildenhues, 2010/11/07
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Jim Meyering, 2010/11/07
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f,
Ralf Wildenhues <=
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Jim Meyering, 2010/11/13
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Andreas Schwab, 2010/11/06
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Jim Meyering, 2010/11/06
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Andreas Schwab, 2010/11/06
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Jim Meyering, 2010/11/06
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Eric Blake, 2010/11/06
- Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f, Jim Meyering, 2010/11/06