[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] posix-shell.m4: fix typo that made this test malfunction
From: |
Jim Meyering |
Subject: |
Re: [PATCH] posix-shell.m4: fix typo that made this test malfunction |
Date: |
Wed, 09 Jul 2008 19:07:12 +0200 |
Paul Eggert <address@hidden> wrote:
> Jim Meyering <address@hidden> writes:
>> * m4/posix-shell.m4: Remove capitalization in variable name.
>
> Wheeooo! That bug has been present since November 2007 and nobody has
> reported it since then? I guess POSIX-conforming shells must be more
> prevalent than I thought (or, more likely, scripts requiring POSIX
> features are rarer than I thought...).
>
> Anyway, thanks for catching and fixing that howler.
I was surprised, too ;-)
FYI, I was considering adding these two lines
func_ret_failure () {
return 1
}
+ f () { test $v = "$(printenv v)"; func_return $?; }
+ v=2 f &&
test "[$](echo foo)" = foo &&
func_success &&
! func_failure &&
because coreutils' "make check" fails on opensolaris 2.11
due to its /bin/sh (sh (AT&T Research) 1993-12-28 s+)
not exporting to subprocesses. And "make check" currently
requires that behavior, though I should be able to remove
the dependency.
dash works the same as Solaris 11's /bin/sh, so I have my doubts about
whether checking for such behavior is warranted (considering the name
of this .m4 file) and haven't yet looked at the spec.
The goal of adding those lines was to make the macro select /bin/bash
over /bin/sh, which it didn't do, until fixed.