From patchwork Sun Aug 28 20:43:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 111943 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 759B1B6F85 for ; Mon, 29 Aug 2011 06:44:25 +1000 (EST) Received: from localhost ([::1]:39554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxmDO-00055z-IS for incoming@patchwork.ozlabs.org; Sun, 28 Aug 2011 16:44:22 -0400 Received: from eggs.gnu.org ([140.186.70.92]:56492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxmCY-0002x2-JY for qemu-devel@nongnu.org; Sun, 28 Aug 2011 16:43:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QxmCX-00025V-4J for qemu-devel@nongnu.org; Sun, 28 Aug 2011 16:43:30 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:37985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxmCW-000257-SB for qemu-devel@nongnu.org; Sun, 28 Aug 2011 16:43:29 -0400 Received: from localhost (v220110690675601.yourvserver.net.local [127.0.0.1]) by v220110690675601.yourvserver.net (Postfix) with ESMTP id DED8A728304E; Sun, 28 Aug 2011 22:43:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at weilnetz.de Received: from v220110690675601.yourvserver.net ([127.0.0.1]) by localhost (v220110690675601.yourvserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZW+uBQG+lGnF; Sun, 28 Aug 2011 22:43:27 +0200 (CEST) Received: from flocke.weilnetz.de (p54ADA446.dip.t-dialin.net [84.173.164.70]) by v220110690675601.yourvserver.net (Postfix) with ESMTPSA id 46205728304D; Sun, 28 Aug 2011 22:43:26 +0200 (CEST) Received: from stefan by flocke.weilnetz.de with local (Exim 4.72) (envelope-from ) id 1QxmCT-0001nf-Sh; Sun, 28 Aug 2011 22:43:25 +0200 From: Stefan Weil To: QEMU Developers Date: Sun, 28 Aug 2011 22:43:18 +0200 Message-Id: <1314564200-6872-6-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1314564200-6872-1-git-send-email-weil@mail.berlios.de> References: <1314564200-6872-1-git-send-email-weil@mail.berlios.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 78.47.199.172 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 5/7] usb: Fix packing for w32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Use QEMU_PACKED to eliminate the effects of compiler option -mms-bitfields. Cc: Gerd Hoffmann Signed-off-by: Stefan Weil --- hw/usb-ccid.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/usb-ccid.c b/hw/usb-ccid.c index 66aeb21..c2f9241 100644 --- a/hw/usb-ccid.c +++ b/hw/usb-ccid.c @@ -176,56 +176,56 @@ enum { */ }; -typedef struct __attribute__ ((__packed__)) CCID_Header { +typedef struct QEMU_PACKED CCID_Header { uint8_t bMessageType; uint32_t dwLength; uint8_t bSlot; uint8_t bSeq; } CCID_Header; -typedef struct __attribute__ ((__packed__)) CCID_BULK_IN { +typedef struct QEMU_PACKED CCID_BULK_IN { CCID_Header hdr; uint8_t bStatus; /* Only used in BULK_IN */ uint8_t bError; /* Only used in BULK_IN */ } CCID_BULK_IN; -typedef struct __attribute__ ((__packed__)) CCID_SlotStatus { +typedef struct QEMU_PACKED CCID_SlotStatus { CCID_BULK_IN b; uint8_t bClockStatus; } CCID_SlotStatus; -typedef struct __attribute__ ((__packed__)) CCID_Parameter { +typedef struct QEMU_PACKED CCID_Parameter { CCID_BULK_IN b; uint8_t bProtocolNum; uint8_t abProtocolDataStructure[0]; } CCID_Parameter; -typedef struct __attribute__ ((__packed__)) CCID_DataBlock { +typedef struct QEMU_PACKED CCID_DataBlock { CCID_BULK_IN b; uint8_t bChainParameter; uint8_t abData[0]; } CCID_DataBlock; /* 6.1.4 PC_to_RDR_XfrBlock */ -typedef struct __attribute__ ((__packed__)) CCID_XferBlock { +typedef struct QEMU_PACKED CCID_XferBlock { CCID_Header hdr; uint8_t bBWI; /* Block Waiting Timeout */ uint16_t wLevelParameter; /* XXX currently unused */ uint8_t abData[0]; } CCID_XferBlock; -typedef struct __attribute__ ((__packed__)) CCID_IccPowerOn { +typedef struct QEMU_PACKED CCID_IccPowerOn { CCID_Header hdr; uint8_t bPowerSelect; uint16_t abRFU; } CCID_IccPowerOn; -typedef struct __attribute__ ((__packed__)) CCID_IccPowerOff { +typedef struct QEMU_PACKED CCID_IccPowerOff { CCID_Header hdr; uint16_t abRFU; } CCID_IccPowerOff; -typedef struct __attribute__ ((__packed__)) CCID_SetParameters { +typedef struct QEMU_PACKED CCID_SetParameters { CCID_Header hdr; uint8_t bProtocolNum; uint16_t abRFU;