All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Bug 1525682 <1525682@bugs.launchpad.net>,
	qemu-devel@nongnu.org, Autoconf <Autoconf@gnu.org>
Subject: Re: [Qemu-devel] [Bug 1525682] Re: configure: fix POSIX compatibility issue
Date: Mon, 14 Dec 2015 12:08:47 -0700	[thread overview]
Message-ID: <566F13BF.6000903@redhat.com> (raw)
In-Reply-To: <20151214113405.26440.40886.malone@gac.canonical.com>

[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

[adding autoconf, which likes to document shell bugs]

On 12/14/2015 04:34 AM, Dmitrij D. Czarkoff wrote:
> OK, so I misidentified the issue and screwed up my bug report.
> 
> The shell is pdksh on OpenBSD, and the real issue is with parentheses:
> 
>   $ a=1
>   $ b=2
>   $ echo "${a+($b)}"
>   ksh: ${a+($b)}": bad substitution

That's a bug in pdksh; see the POSIX interpretation:

http://austingroupbugs.net/view.php?id=221#c399

    For parameter expansions other than the four varieties that provide
    for substring processing, within the string of characters from an
    enclosed "${" to the matching '}', the double-quotes within which
    the expansion occurs shall preserve the literal value of all
    characters, with the exception of the characters double-quote,
    backquote, <dollar-sign>, and <backslash>.

The fact that you are using "" outside the ${} means that all characters
between + and } should be used literally (the same as if you had done
'echo "($b)"').  According to POSIX, it should not be a syntax error, so
you should report this to the pdksh shell developers.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2015-12-14 19:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-13 18:34 [Qemu-devel] [Bug 1525682] [NEW] configure: fix POSIX compatibility issue Dmitrij D. Czarkoff
2015-12-13 18:39 ` [Qemu-devel] [Bug 1525682] " Dmitrij D. Czarkoff
2015-12-14  8:28   ` Stefan Hajnoczi
2015-12-14 10:31 ` Peter Maydell
2015-12-14 11:34 ` Dmitrij D. Czarkoff
2015-12-14 19:08   ` Eric Blake [this message]
2015-12-14 12:22 ` Peter Maydell
2015-12-14 12:53 ` Dmitrij D. Czarkoff
2015-12-14 13:27 ` Peter Maydell
2015-12-14 13:39 ` Peter Maydell
2015-12-14 13:55 ` Dmitrij D. Czarkoff
2015-12-14 18:39 ` Peter Maydell
2015-12-18 12:18 ` Thorsten Glaser
2016-05-27  7:39 ` T. Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=566F13BF.6000903@redhat.com \
    --to=eblake@redhat.com \
    --cc=1525682@bugs.launchpad.net \
    --cc=Autoconf@gnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.