freewrt_1_0
freewrt_2_0
| Line | |
|---|
| 1 | /* $FreeWRT$ */
|
|---|
| 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(__CYGWIN__)
|
|---|
| 12 | #error Missing
|
|---|
| 13 | #else
|
|---|
| 14 | #include <machine/endian.h>
|
|---|
| 15 | #define bswap_16(x) swap16(x)
|
|---|
| 16 | #define bswap_32(x) swap32(x)
|
|---|
| 17 | #define bswap_64(x) swap64(x)
|
|---|
| 18 | #endif
|
|---|
| 19 |
|
|---|
| 20 | #ifndef __BYTE_ORDER
|
|---|
| 21 | #define __BYTE_ORDER BYTE_ORDER
|
|---|
| 22 | #endif
|
|---|
| 23 | #ifndef __BIG_ENDIAN
|
|---|
| 24 | #define __BIG_ENDIAN BIG_ENDIAN
|
|---|
| 25 | #endif
|
|---|
| 26 | #ifndef __LITTLE_ENDIAN
|
|---|
| 27 | #define __LITTLE_ENDIAN LITTLE_ENDIAN
|
|---|
| 28 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.