qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix leul_to_cpu on big endian hosts
@ 2010-05-11 15:38 Alexander Graf
  2010-05-31 18:38 ` Alexander Graf
  2010-05-31 18:43 ` Aurelien Jarno
  0 siblings, 2 replies; 5+ messages in thread
From: Alexander Graf @ 2010-05-11 15:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marcelo Tosatti

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 <agraf@suse.de>
---
 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)
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-05-31 18:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11 15:38 [Qemu-devel] [PATCH] Fix leul_to_cpu on big endian hosts Alexander Graf
2010-05-31 18:38 ` Alexander Graf
2010-05-31 18:43 ` Aurelien Jarno
2010-05-31 18:44   ` Alexander Graf
2010-05-31 18:58     ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).