Remove extra bits/endian.h file for MIPS
Commit Message
Here is my proposed patch to remove the extra bits/endian.h file
for MIPS. I removed the linux specific one and used the generic
one after fixing the comment. My earlier patches already changed the #if's
to #ifdef's in that file. This means that for linux we will now check
__MIPSEB/__MIPSEL instead of __MIPSEB__/__MIPSEL__ but that seem reasonable
since we are setting __BYTE_ORDER (with no trailing underscores).
Both versions of the MIPS macros are set by GCC.
I did not add any error checking to verify that one and only one
of __MIPSEB/__MIPSEL are set. The compiler will only set one of
these and if the user does something weird with -D/-U flags then
I think they are on their own. There are lots of places in
glibc where we assume the compiler defined macros are in a rational
state without explicitly checking them.
Tested with mips-mti-linux-gnu. Ok for checkin?
Steve Ellcey
sellcey@imgtec.com
2015-02-18 Steve Ellcey <sellcey@imgtec.com>
* sysdeps/unix/sysv/linux/mips/bits/endian.h: Remove.
* sysdeps/mips/bits/endian.h: Fix comments.
Comments
On Wed, 18 Feb 2015, Steve Ellcey wrote:
> 2015-02-18 Steve Ellcey <sellcey@imgtec.com>
>
> * sysdeps/unix/sysv/linux/mips/bits/endian.h: Remove.
> * sysdeps/mips/bits/endian.h: Fix comments.
OK, with "headerfiles" split into two words.
@@ -1,5 +1,7 @@
/* The MIPS architecture has selectable endianness.
- This file is for a machine using big-endian mode. */
+ It exists in 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."