mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-16 16:21:32 +00:00
23 lines
511 B
C
23 lines
511 B
C
#ifndef ETHERBOOT_BYTESWAP_H
|
|
#define ETHERBOOT_BYTESWAP_H
|
|
|
|
#include "endian.h"
|
|
#include "bits/byteswap.h"
|
|
|
|
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
#include "little_bswap.h"
|
|
#endif
|
|
#if __BYTE_ORDER == __BIG_ENDIAN
|
|
#include "big_bswap.h"
|
|
#endif
|
|
|
|
/* Make routines available to all */
|
|
#define swap64(x) __bswap_64(x)
|
|
#define swap32(x) __bswap_32(x)
|
|
#define swap16(x) __bswap_16(x)
|
|
#define bswap_64(x) __bswap_64(x)
|
|
#define bswap_32(x) __bswap_32(x)
|
|
#define bswap_16(x) __bswap_16(x)
|
|
|
|
#endif /* ETHERBOOT_BYTESWAP_H */
|