qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Stefan Hajnoczi <stefanha@gmail.com>, Stefan Weil <weil@mail.berlios.de>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] vnc: Fix compilation with --enable-vnc-png
Date: Mon, 27 Jun 2011 08:19:42 +0200	[thread overview]
Message-ID: <4E0820FE.8000506@web.de> (raw)
In-Reply-To: <BANLkTinPbPpP-Oiw5-6+GvnK8shqaTrXgg@mail.gmail.com>

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

On 2011-06-27 08:10, Stefan Hajnoczi wrote:
> On Mon, Jun 27, 2011 at 6:29 AM, Stefan Weil <weil@mail.berlios.de> wrote:
>> Commit f26e428da505709ec03b2ed2c9eb3db82b30bd7b fixed compilation
>> with --enable-vnc-png, but broke it with --enable-vnc-png.
>>
>> The breakage is caused by pngconfig.h which checks whether
>> setjmp.h was already included and fails because qemu-common.h
>> includes setjmp.h.
>>
>> The check is disabled by defining PNG_SKIP_SETJMP_CHECK.
>>
>> Cc: Blue Swirl <blauwirbel@gmail.com>
>> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
>> ---
>>  ui/vnc-enc-tight.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> 
> Some more info on why Stefan Weil's fix is correct:
> 
> The setjmp(3) man page says,
> 
> "POSIX  does  not  specify  whether  setjmp()  will  save the signal
> mask.  In System V it will not.  In 4.3BSD it will, and there is a
> function _setjmp that will not.  By default, Linux/glibc follows the
> System V behavior, but the BSD behavior is provided if the
> _BSD_SOURCE  feature  test  macro  is  defined  and  none  of
> _POSIX_SOURCE,  _POSIX_C_SOURCE, _XOPEN_SOURCE,
> _XOPEN_SOURCE_EXTENDED, _GNU_SOURCE, or _SVID_SOURCE is defined."
> 
> Apparently libpng wants to make sure that the setjmp() which will not
> save signal masks is used on Linux.  The problem is that Linux
> supports both versions and jmp_buf is part of the libpng API.  That
> means the application and the library need to agree on which setjmp()
> semantics will be used.
> 
> That said, QEMU doesn't seem to make use of the jmp_buf API in libpng,
> so this really shouldn't matter at all.  We can skip the header check.

That sounds good. Please adjust the comment that this patch introduces.

Jan



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

  reply	other threads:[~2011-06-27  6:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-26 23:03 [Qemu-devel] buildbot failure in qemu on default_x86_64_out_of_tree qemu
2011-06-27  5:29 ` [Qemu-devel] [PATCH] vnc: Fix compilation with --enable-vnc-png Stefan Weil
2011-06-27  5:44   ` Stefan Weil
2011-06-27 15:51     ` Anthony Liguori
2011-06-27  6:07   ` Jan Kiszka
2011-06-27  6:10   ` Stefan Hajnoczi
2011-06-27  6:19     ` Jan Kiszka [this message]
2011-06-27  6:59   ` Markus Armbruster

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=4E0820FE.8000506@web.de \
    --to=jan.kiszka@web.de \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=weil@mail.berlios.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).