summaryrefslogtreecommitdiff
path: root/bswap.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-05-11 17:38:17 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-05-31 20:55:23 +0200
commit17e6a53f8223e469034e3ba95b67ec0501f39325 (patch)
tree43adc5e78edb2a7ad895ca2a154b9b8102fdd7bc /bswap.h
parente03c22a98cf5deffd0dec2f9ff88a600aa330bc4 (diff)
downloadqemu-17e6a53f8223e469034e3ba95b67ec0501f39325.tar.gz
qemu-17e6a53f8223e469034e3ba95b67ec0501f39325.tar.bz2
qemu-17e6a53f8223e469034e3ba95b67ec0501f39325.zip
Fix leul_to_cpu on big endian hosts
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> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'bswap.h')
-rw-r--r--bswap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bswap.h b/bswap.h
index 956f3fa0b7..20caae63ea 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)