On Tue, May 11, 2010 at 05:38:17PM +0200, Alexander Graf wrote: > 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 <ag...@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)
While the patch looks correct, I am not able to reproduce the issue. Do you have more details about it? -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurel...@aurel32.net http://www.aurel32.net