|
Revision 3128, 0.7 kB
(checked in by tg, 1 year ago)
|
unbreak mirbsd, no idea when I broke it…
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
#if defined(__linux__) |
|---|
| 4 |
#include_next <endian.h> |
|---|
| 5 |
#elif defined(__APPLE__) |
|---|
| 6 |
#include <machine/endian.h> |
|---|
| 7 |
#include <machine/byte_order.h> |
|---|
| 8 |
#define bswap_16(x) NXSwapShort(x) |
|---|
| 9 |
#define bswap_32(x) NXSwapInt(x) |
|---|
| 10 |
#define bswap_64(x) NXSwapLongLong(x) |
|---|
| 11 |
#elif defined(__NetBSD__) |
|---|
| 12 |
#define bswap_16(x) bswap16(x) |
|---|
| 13 |
#define bswap_32(x) bswap32(x) |
|---|
| 14 |
#define bswap_64(x) bswap64(x) |
|---|
| 15 |
#elif defined(__MirBSD__) |
|---|
| 16 |
#define bswap_16(x) swap16(x) |
|---|
| 17 |
#define bswap_32(x) swap32(x) |
|---|
| 18 |
#define bswap_64(x) swap64(x) |
|---|
| 19 |
#elif defined(__CYGWIN__) |
|---|
| 20 |
#error Missing |
|---|
| 21 |
#else |
|---|
| 22 |
#include <machine/endian.h> |
|---|
| 23 |
#endif |
|---|
| 24 |
|
|---|
| 25 |
#ifndef __BYTE_ORDER |
|---|
| 26 |
#define __BYTE_ORDER BYTE_ORDER |
|---|
| 27 |
#endif |
|---|
| 28 |
#ifndef __BIG_ENDIAN |
|---|
| 29 |
#define __BIG_ENDIAN BIG_ENDIAN |
|---|
| 30 |
#endif |
|---|
| 31 |
#ifndef __LITTLE_ENDIAN |
|---|
| 32 |
#define __LITTLE_ENDIAN LITTLE_ENDIAN |
|---|
| 33 |
#endif |
|---|