[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f
From: |
Jim Meyering |
Subject: |
Re: [coreutils] Re: Builds of coreutils-8.6.19-1369f |
Date: |
Sat, 06 Nov 2010 18:14:05 +0100 |
Ralf Wildenhues wrote:
> Hello,
>
> * Jim Meyering wrote on Sat, Nov 06, 2010 at 02:55:47PM CET:
>> Jim Meyering wrote:
>> > Andreas Schwab wrote:
>> >> Jim Meyering writes:
>> >>> cat <<\EOF > init.cfg
>> >>> f()
>> >>> {
>> >>> case $IFS in '') exit 91;; esac
>> >>> local s=$IFS
>> >>> case $s in '') exit 97;; esac
>> >>> }
>> >>> f
>> >>> EOF
>> >>> $ /bin/sh -c '. init.cfg'
>> >>> [Exit 97]
>> >>
>> >> Perhaps local isn't really the builtin local?
>
>> Subject: [PATCH] init.sh: disqualify FreeBSD 8.1's /bin/sh
>>
>> * tests/init.sh: Arrange not to accept FreeBSD 8.1's /bin/sh, since
>> it fails this test: /bin/sh -c 'f(){ local s=$IFS; test -n "$s"; }; f'
>
>> @@ -115,6 +118,7 @@ fi
>> # ? - not ok
>> gl_shell_test_script_='
>> test $(echo y) = y || exit 1
>> +gl_local_test_(){ local s=$IFS; test -n "$s"; }; gl_local_test_ || exit 1
>
> There may be two issues at work here:
>
> - there is no requirement that sh does not white-space-split the right hand
> side of a 'local' assignment, 'local' isn't standardized anywhere. At least
> one version of dash is guilty here.
That's a shame. This should have been specified years ago.
I mentioned on another thread that F14's dash-0.5.6-2.fc14.x86_64
shows the same surprising behavior.
> - 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.
- [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 <=
- 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, 2010/11/07
- 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