OSDN Git Service

Fix <endian.h> and <sys/endian.h>.
authorElliott Hughes <enh@google.com>
Wed, 12 Dec 2012 00:14:54 +0000 (16:14 -0800)
committerElliott Hughes <enh@google.com>
Wed, 12 Dec 2012 00:17:33 +0000 (16:17 -0800)
Previously we'd been relying on getting the machine-specific <endian.h>
instead of the top-level <endian.h>, and <sys/endian.h> was basically broken.
Now, with this patch and the previous patch we should have <endian.h>
and <sys/endian.h> behaving the same. This is basically how NetBSD's endian.h
works, and was probably how ours was originally intended to work.

Bug: http://code.google.com/p/android/issues/detail?id=39824
Change-Id: I71de5a507e633de166013a658b5764df9e1aa09c

libc/arch-arm/include/machine/endian.h [moved from libc/arch-arm/include/endian.h with 100% similarity]
libc/arch-mips/include/machine/endian.h [moved from libc/arch-mips/include/endian.h with 100% similarity]
libc/arch-x86/include/machine/endian.h [moved from libc/arch-x86/include/endian.h with 100% similarity]
libc/include/sys/endian.h

index 00f4839..2a0c658 100644 (file)
@@ -37,6 +37,7 @@
 #define _SYS_ENDIAN_H_
 
 #include <sys/cdefs.h>
+#include <machine/endian.h>
 #include <machine/_types.h>
 
 #define _LITTLE_ENDIAN 1234