|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH 04/25] Add hard build dependency on glib |
Date: | Tue, 02 Aug 2011 14:18:17 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10 |
On 08/02/2011 02:06 PM, Luiz Capitulino wrote:
On Tue, 2 Aug 2011 10:03:30 +0800 TeLeMan<address@hidden> wrote:This patch introduces "-mms-bitfields" cflag on MinGW but this cflag breaks gcc packed structures("__attribute__((packed))"). For example, slirp does not work on Win32.I'm not familiar with MinGW (or why glib would require that flag). Michael, Anthony, any idea?
ms-bitfields does packing of bitfields in a way compatible with MSVC. In order to call Windows API functions that use structures that have bitfields, you need to use ms-bitfields.
Slirp will need to be fixed to not depend on GCC bitfield layout. This is one of the reasons why portable code should never use bitfields.
Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |