From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QZyyl-00081q-A2 for mharc-qemu-trivial@gnu.org; Fri, 24 Jun 2011 01:30:55 -0400 Received: from eggs.gnu.org ([140.186.70.92]:46657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZyyi-00081H-F7 for qemu-trivial@nongnu.org; Fri, 24 Jun 2011 01:30:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZyyg-0002YG-RG for qemu-trivial@nongnu.org; Fri, 24 Jun 2011 01:30:52 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:59165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZyye-0002Xv-2e; Fri, 24 Jun 2011 01:30:48 -0400 Received: by yxs7 with SMTP id 7so1288485yxs.4 for ; Thu, 23 Jun 2011 22:30:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=zGlaR6rKHosA1h3vDTcx839XRdVkd6DmnxuQBoRU+4M=; b=TiX0R5+Ix/keeW5AdXWS+8FbeWrJunFZxAFaQqSAAN09qr3Vx/E9YU3mj5O7/GILPo EFrTiNEgdm9zsZ8QKj+Mqb6aTkwKOtMrUvZxrbcoUt0ZJYQ7LvUNW/qJAugF5gYjEX/L cAy5Im9PBbFDsH/gTPXyDOEQmD8hkDsuWtB0w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=wowdi/ctXjah7/ZZJ3trF/mOSjrWBdUtG9YZDZ91q0ZzX4BETKhrFqd1YO4hyCu9WS JZdz5y+FyNl4GvF87SQHn3FSodMBHa4Q5iS7yR6zVqNcgMgWi6N9KpID9fN83GqT7fAQ CV+GIocGuE1wktzs+ZLXTCcQin7TkpPDl6LrE= MIME-Version: 1.0 Received: by 10.236.185.233 with SMTP id u69mr4668291yhm.19.1308893447260; Thu, 23 Jun 2011 22:30:47 -0700 (PDT) Received: by 10.147.136.16 with HTTP; Thu, 23 Jun 2011 22:30:47 -0700 (PDT) In-Reply-To: <4E03564A.5060201@mail.berlios.de> References: <4DFC636D.9090800@mail.berlios.de> <20110623135202.GA12765@stefanha-thinkpad.localdomain> <4E03564A.5060201@mail.berlios.de> Date: Fri, 24 Jun 2011 06:30:47 +0100 Message-ID: From: Stefan Hajnoczi To: Stefan Weil Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.173 Cc: qemu-trivial@nongnu.org, qemu-devel , Roy Tam Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] fix MinGW compilation when --enable-vnc-jpeg is specified X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2011 05:30:54 -0000 On Thu, Jun 23, 2011 at 4:05 PM, Stefan Weil wrote: > Am 23.06.2011 15:52, schrieb Stefan Hajnoczi: >> >> On Sat, Jun 18, 2011 at 10:35:57AM +0200, Stefan Weil wrote: >>> >>> Am 18.06.2011 07:13, schrieb Roy Tam: >>>> >>>> This patch fix conflicting types for 'INT32' in basetsd.h in including >>>> qemu-common.h first. >>>> >>>> >>>> Sign-off-by: Roy Tam >>>> -- >>>> diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c >>>> index 87fdf35..1591df0 100644 >>>> --- a/ui/vnc-enc-tight.c >>>> +++ b/ui/vnc-enc-tight.c >>>> @@ -28,6 +28,8 @@ >>>> >>>> #include "config-host.h" >>>> >>>> +#include "qemu-common.h" >>>> + >>>> #ifdef CONFIG_VNC_PNG >>>> #include >>>> #endif >>>> @@ -36,8 +38,6 @@ >>>> #include >>>> #endif >>>> >>>> -#include "qemu-common.h" >>>> - >>>> #include "bswap.h" >>>> #include "qint.h" >>>> #include "vnc.h" >>> >>> Acked-by: Stefan Weil >>> >>> The conflicting declaration is in jmorecfg.h which is included from >>> jpeglib.h. >> >> Is the problem that the Windows headers included from qemu-common.h try >> to #define INT32? >> http://msdn.microsoft.com/en-us/library/aa383751(v=vs.85).aspx >> >> In that case I think an explicit fix is better: >> >> #ifdef _WIN32 >> /* Include this before jpeglib.h for the INT32 definition */ >> #include >> #endif >> >> ...followed by png/jpeg includes... >> >> Simply moving qemu-common.h provides no hints and is rather indirect. >> Someone may move it back in the future. >> >> Stefan > > INT32 is declared in basetsd.h which is included from windows.h > (with some indirections) which is included from qemu-os-win32.h > which is included from qemu-common.h. > > INT32 is not a #define, but a data type (typedef) and very common > for w32 compilations. Windows programmers don't include basetsd.h > directly, but usually use windows.h. > > Including qemu-common.h right at the beginning (after config.h where > needed) should be good practice for QEMU source code - like this: Too bad qemu-common.h doesn't just include system headers, it also declares a bunch of QEMU stuff. > As long as the maintainers don't accept patches which simply move > qemu-common.h, there is no danger. :-) Sure but isn't always noticed. That is why I suggest adding a comment about the jpeg interaction. Stefan