Subject: Re: gtar 1.13.25 configure fails on FreeBSD/NetBSD due to sh bug
To: None <naddy@FreeBSD.ORG>
From: Paul Eggert <>
List: netbsd-bugs
Date: 11/04/2001 21:54:57
> From: Christian Weisgerber <>
> Date: Mon, 5 Nov 2001 01:33:48 +0100
>     test $jm_cv_func_decl_free != yes
>     cat >>confdefs.h <<EOF
>     #define HAVE_DECL_FREE $?
>     EOF
> FreeBSD's /bin/sh resets $? when it starts evaluating the redirections,
> so the symbol is always defined to 0 regardless of the previous
> test result.  That probably qualifies as a shell bug,

It sure does.  I'll CC: this message to freebsd-bugs and netbsd-bugs
to let them know about the bug.

Thanks for the bug report.  I'll install a workaround in the next
test version of GNU tar.

> Other shells derived from 4.4BSD sh, notably NetBSD's /bin/sh, also
> suffer from this.

I tested GNU tar with OpenBSD 2.9, which does not have the bug.
If it matters, its /bin/sh is PD KSH v5.2.14 99/07/13.2.
(I don't have a FreeBSD or NetBSD system handy.)