1*1b8adde7SWilliam Kucharski #ifndef ETHERBOOT_BYTESWAP_H 2*1b8adde7SWilliam Kucharski #define ETHERBOOT_BYTESWAP_H 3*1b8adde7SWilliam Kucharski 4*1b8adde7SWilliam Kucharski #include "endian.h" 5*1b8adde7SWilliam Kucharski #include "i386_byteswap.h" 6*1b8adde7SWilliam Kucharski 7*1b8adde7SWilliam Kucharski #if __BYTE_ORDER == __LITTLE_ENDIAN 8*1b8adde7SWilliam Kucharski #include "little_bswap.h" 9*1b8adde7SWilliam Kucharski #endif 10*1b8adde7SWilliam Kucharski #if __BYTE_ORDER == __BIG_ENDIAN 11*1b8adde7SWilliam Kucharski #include "big_bswap.h" 12*1b8adde7SWilliam Kucharski #endif 13*1b8adde7SWilliam Kucharski 14*1b8adde7SWilliam Kucharski /* Make routines available to all */ 15*1b8adde7SWilliam Kucharski #define swap32(x) __bswap_32(x) 16*1b8adde7SWilliam Kucharski #define swap16(x) __bswap_16(x) 17*1b8adde7SWilliam Kucharski #define bswap_32(x) __bswap_32(x) 18*1b8adde7SWilliam Kucharski #define bswap_16(x) __bswap_16(x) 19*1b8adde7SWilliam Kucharski 20*1b8adde7SWilliam Kucharski #endif /* ETHERBOOT_BYTESWAP_H */ 21