summaryrefslogtreecommitdiff
path: root/sys/arch/arm/include
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-07-12 16:25:10 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-07-12 16:25:10 +0000
commit2039f6b74df84ee50091647629f3c65b57371135 (patch)
tree076e09339c1066da837771e8393ddab7ce9ff891 /sys/arch/arm/include
parent30586300cf458635b5a017a2f2e7c7345538d628 (diff)
Tackle the endian.h mess. Make it so that:
* you can #include <sys/endian.h> instead of <machine/endian.h>, and ditto <endian.h> (fixes code that pulls in <sys/endian.h> first) * those will always export the symbols that POSIX specified for <endian.h>, including the new {be,le}{16,32,64}toh() set. c.f. http://austingroupbugs.net/view.php?id=162 if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h> currently exports (ntohs, NTOHS, dlg's bemtoh*, etc) * when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and <arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER and betoh* ok deraadt@
Diffstat (limited to 'sys/arch/arm/include')
-rw-r--r--sys/arch/arm/include/endian.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/arm/include/endian.h b/sys/arch/arm/include/endian.h
index 1c370350a02..0c12941585a 100644
--- a/sys/arch/arm/include/endian.h
+++ b/sys/arch/arm/include/endian.h
@@ -1,10 +1,12 @@
-/* $OpenBSD: endian.h,v 1.6 2011/11/08 17:06:51 deraadt Exp $ */
+/* $OpenBSD: endian.h,v 1.7 2014/07/12 16:25:08 guenther Exp $ */
#ifndef _ARM_ENDIAN_H_
#define _ARM_ENDIAN_H_
#define _BYTE_ORDER _LITTLE_ENDIAN
#define __STRICT_ALIGNMENT
-#include <sys/endian.h>
+#ifndef __FROM_SYS__ENDIAN
+#include <sys/endian.h>
+#endif
#endif /* _ARM_ENDIAN_H_ */