source: freewrt/scripts/endian.h@ fdd4f59

freewrt_1_0 freewrt_2_0
Last change on this file since fdd4f59 was ba3f8b9, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • build mkfs.jffs2 on bsd (untested if it's usable)
  • sprinkle a few $(HOSTCC) and $(HOSTCFLAGS)

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

  • Property mode set to 100644
File size: 618 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(__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.