ia64/xen-unstable

changeset 11896:57635264b6c2

[XEN] Forcibly undefine swap{16,32,64} in mkelf32 program.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Oct 19 14:38:34 2006 +0100 (2006-10-19)
parents 20522afb2615
children fc0a87fdf980
files xen/arch/x86/boot/mkelf32.c
line diff
     1.1 --- a/xen/arch/x86/boot/mkelf32.c	Wed Oct 18 19:23:32 2006 +0100
     1.2 +++ b/xen/arch/x86/boot/mkelf32.c	Thu Oct 19 14:38:34 2006 +0100
     1.3 @@ -90,6 +90,11 @@ static Elf32_Shdr out_shdr[] = {
     1.4      }
     1.5  };
     1.6  
     1.7 +/* Some system header files define these macros and pollute our namespace. */
     1.8 +#undef swap16
     1.9 +#undef swap32
    1.10 +#undef swap64
    1.11 +
    1.12  #define swap16(_v) ((((u16)(_v)>>8)&0xff)|(((u16)(_v)&0xff)<<8))
    1.13  #define swap32(_v) (((u32)swap16((u16)(_v))<<16)|(u32)swap16((u32)((_v)>>16)))
    1.14  #define swap64(_v) (((u64)swap32((u32)(_v))<<32)|(u64)swap32((u32)((_v)>>32)))