From patchwork Tue May 11 15:38:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 52297 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3964EB7D8A for ; Wed, 12 May 2010 01:39:09 +1000 (EST) Received: from localhost ([127.0.0.1]:60925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBrY2-000853-5w for incoming@patchwork.ozlabs.org; Tue, 11 May 2010 11:39:06 -0400 Received: from [140.186.70.92] (port=47213 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBrXK-00084T-0Q for qemu-devel@nongnu.org; Tue, 11 May 2010 11:38:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBrXI-0001e7-GO for qemu-devel@nongnu.org; Tue, 11 May 2010 11:38:21 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39169 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBrXI-0001dy-8x for qemu-devel@nongnu.org; Tue, 11 May 2010 11:38:20 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id B59928655F; Tue, 11 May 2010 17:38:18 +0200 (CEST) From: Alexander Graf To: qemu-devel@nongnu.org Date: Tue, 11 May 2010 17:38:17 +0200 Message-Id: <1273592297-18370-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: Marcelo Tosatti Subject: [Qemu-devel] [PATCH] Fix leul_to_cpu on big endian hosts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Commit 213acd2e introduced leul_to_cpu with a special code path for big endian hosts. Unfortunately that code used preprocessor magic that didn't work. This patch replaces the explicit ##s by glue() which is proven to work reliably, enabling me to compile qemu on ppc again. Signed-off-by: Alexander Graf --- bswap.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bswap.h b/bswap.h index 956f3fa..20caae6 100644 --- a/bswap.h +++ b/bswap.h @@ -205,7 +205,7 @@ static inline void cpu_to_be32wu(uint32_t *p, uint32_t v) #ifdef HOST_WORDS_BIGENDIAN #define cpu_to_32wu cpu_to_be32wu -#define leul_to_cpu(v) le ## HOST_LONG_BITS ## _to_cpu(v) +#define leul_to_cpu(v) glue(glue(le,HOST_LONG_BITS),_to_cpu)(v) #else #define cpu_to_32wu cpu_to_le32wu #define leul_to_cpu(v) (v)