Cygwin: Add new APIs tc[gs]etwinsize()
[newlib-cygwin.git] / newlib / libc / include / machine / _endian.h
blob92a14dc8b82a79543a88047c85b7bfdaa88158c8
1 #ifndef __MACHINE_ENDIAN_H__
2 #error "must be included via <machine/endian.h>"
3 #endif /* !__MACHINE_ENDIAN_H__ */
5 #include <sys/config.h>
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__ */
17 #ifndef _LITTLE_ENDIAN
18 #define _LITTLE_ENDIAN 1234
19 #endif
21 #ifndef _BIG_ENDIAN
22 #define _BIG_ENDIAN 4321
23 #endif
25 #ifndef _PDP_ENDIAN
26 #define _PDP_ENDIAN 3412
27 #endif
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