source: trunk/libs/newlib/src/newlib/libc/include/machine/_endian.h @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 665 bytes
Line 
1#ifndef __MACHINE_ENDIAN_H__
2#error "must be included via <machine/endian.h>"
3#endif /* !__MACHINE_ENDIAN_H__ */
4
5#include <sys/config.h>
6
7#ifdef __PPC__
8/* Get rid of GCC builtin defines on PowerPC */
9#ifdef _BIG_ENDIAN
10#undef _BIG_ENDIAN
11#endif
12#ifdef _LITTLE_ENDIAN
13#undef _LITTLE_ENDIAN
14#endif
15#endif /* __PPC__ */
16
17#ifndef _LITTLE_ENDIAN
18#define _LITTLE_ENDIAN  1234
19#endif
20
21#ifndef _BIG_ENDIAN
22#define _BIG_ENDIAN     4321
23#endif
24
25#ifndef _PDP_ENDIAN
26#define _PDP_ENDIAN     3412
27#endif
28
29#ifndef _BYTE_ORDER
30#if defined(__IEEE_LITTLE_ENDIAN) || defined(__IEEE_BYTES_LITTLE_ENDIAN)
31#define _BYTE_ORDER     _LITTLE_ENDIAN
32#else
33#define _BYTE_ORDER     _BIG_ENDIAN
34#endif
35#endif
Note: See TracBrowser for help on using the repository browser.