source: freewrt/scripts/endian.h@ e729e53

Last change on this file since e729e53 was e729e53, checked in by Thorsten Glaser <tg@…>, 18 years ago

netbsd

git-svn-id: svn://www.freewrt.org/trunk/freewrt@3089 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 647 bytes
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(__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(__CYGWIN__)
16#error Missing
17#else
18#include <machine/endian.h>
19#endif
20
21#ifndef __BYTE_ORDER
22#define __BYTE_ORDER BYTE_ORDER
23#endif
24#ifndef __BIG_ENDIAN
25#define __BIG_ENDIAN BIG_ENDIAN
26#endif
27#ifndef __LITTLE_ENDIAN
28#define __LITTLE_ENDIAN LITTLE_ENDIAN
29#endif
Note: See TracBrowser for help on using the repository browser.