diff options
Diffstat (limited to 'libc/sysdeps/linux/mips/bits/endian.h')
-rw-r--r-- | libc/sysdeps/linux/mips/bits/endian.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/mips/bits/endian.h b/libc/sysdeps/linux/mips/bits/endian.h new file mode 100644 index 000000000..0a3d2fabe --- /dev/null +++ b/libc/sysdeps/linux/mips/bits/endian.h @@ -0,0 +1,16 @@ +/* The MIPS architecture has selectable endianness. + Linux/MIPS exists in two both little and big endian flavours and we + want to be able to share the installed headerfiles between both, + so we define __BYTE_ORDER based on GCC's predefines. */ + +#ifndef _ENDIAN_H +# error "Never use <bits/endian.h> directly; include <endian.h> instead." +#endif + +#ifdef __MIPSEB__ +# define __BYTE_ORDER __BIG_ENDIAN +#else +# ifdef __MIPSEL__ +# define __BYTE_ORDER __LITTLE_ENDIAN +# endif +#endif |