On 08/02/2011 02:06 PM, Luiz Capitulino wrote:
On Tue, 2 Aug 2011 10:03:30 +0800
TeLeMan<gele...@gmail.com> 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