autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use of double parentheses


From: Eric Blake
Subject: Re: Use of double parentheses
Date: Mon, 01 Aug 2011 06:23:31 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.11

On 07/31/2011 06:13 AM, Julien ÉLIE wrote:
Hi all,

Reading a generated "configure" file, I see:

# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there.  '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
   &&  ( (unset $as_var) || exit 1)>/dev/null 2>&1&&  unset $as_var || :
done


Wouldn't it mean that all '((' present in the "configure" script, and
related to shell commands, should be rewritten to '( ('?

It's not a bug in pdksh - POSIX was recently reworded to allow (( to introduce arithmetic parsing on any shell that wants to provide it as an extension. So yes, all instances of needing a double sub-shell MUST separate the two ( to comply with POSIX.

But unless you can point out any other instances of a double sub-shell in configure, I think we're okay on not tripping over this issue any where else.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]