From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50230 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ova5c-00032I-5w for qemu-devel@nongnu.org; Tue, 14 Sep 2010 14:18:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ova5Y-0004Lq-3M for qemu-devel@nongnu.org; Tue, 14 Sep 2010 14:18:44 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:42406) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ova5X-0004Ky-SJ for qemu-devel@nongnu.org; Tue, 14 Sep 2010 14:18:40 -0400 Message-ID: <4C8FBC78.5060800@msgid.tls.msk.ru> Date: Tue, 14 Sep 2010 22:18:32 +0400 From: Michael Tokarev MIME-Version: 1.0 Subject: Re: [Qemu-devel] [Bug 636315] [NEW] configure and build errors on Solaris 10 due to /bin/sh usage References: <20100912112636.2648.27149.malonedeb@potassium.ubuntu.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bug 636315 <636315@bugs.launchpad.net> Cc: qemu-devel@nongnu.org 14.09.2010 20:41, blueswirl wrote: > On Mon, Sep 13, 2010 at 8:49 AM, Michael Tokarev wrote: [] >>>>> diff --git a/tracetool b/tracetool >>>>> index 534cc70..c7582bf 100755 >>>>> --- a/tracetool >>>>> +++ b/tracetool >>>>> @@ -48,7 +48,8 @@ get_argnames() >>>>> { >>>>> local nfields field name >>>>> nfields=0 >>>>> - for field in $(get_args "$1"); do >>>>> + args=get_args "$1" >>>>> + for field in "$args"; do >>>> >>>> This part yes. (I took the liberty of adding args to the local line above) >> >> Um. Are you sure it works as expected? I'm not at all shure. >> There are 2 errors in the above patch: [] > Do you see any bug with the original? The thing is - I've no idea what's the talk about. There's no mentions of tracetool in 0.13.0-rc1 tarball. > If the problem is in fact that Solaris' /bin/sh is not standards > compliant, we shouldn't fix the script but instead make sure that the > shell used to run tracetool is the compliant one. Solaris's /bin/sh isn't exactly non-standard-compliant, it's very limited. In particular, $() construct weren't in the standard for quite some time, and I'm not sure it is now. The usual idiom is to use backticks `` for this. Only in case of nested subshells or using case..esac (with closing brases for individual cases) standard backticks does not work. /mjt