[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Bug 1525682] Re: configure: fix POSIX compatibility is
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [Bug 1525682] Re: configure: fix POSIX compatibility issue |
Date: |
Mon, 14 Dec 2015 12:08:47 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
[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
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [Bug 1525682] Re: configure: fix POSIX compatibility issue,
Eric Blake <=