Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/sommerfeld_i386mp_1]: src/sys/arch/i386/include In the `MY THAT'S GROSS'...
details: https://anonhg.NetBSD.org/src/rev/c962682f21b0
branches: sommerfeld_i386mp_1
changeset: 482213:c962682f21b0
user: mycroft <mycroft%NetBSD.org@localhost>
date: Fri Mar 17 00:09:21 2000 +0000
description:
In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
diffstat:
sys/arch/i386/include/endian.h | 3 +++
sys/arch/i386/include/endian_machdep.h | 14 ++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diffs (25 lines):
diff -r 572d7db5d63a -r c962682f21b0 sys/arch/i386/include/endian.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/i386/include/endian.h Fri Mar 17 00:09:21 2000 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: endian.h,v 1.29.2.2 2000/03/17 00:09:21 mycroft Exp $ */
+
+#include <sys/endian.h>
diff -r 572d7db5d63a -r c962682f21b0 sys/arch/i386/include/endian_machdep.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/i386/include/endian_machdep.h Fri Mar 17 00:09:21 2000 +0000
@@ -0,0 +1,14 @@
+/* $NetBSD: endian_machdep.h,v 1.1.2.2 2000/03/17 00:09:21 mycroft Exp $ */
+
+#define _BYTE_ORDER _LITTLE_ENDIAN
+
+#ifdef __GNUC__
+
+#include <machine/byte_swap.h>
+
+#define ntohl(x) ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
+#define ntohs(x) ((in_port_t)__byte_swap_word((in_port_t)(x)))
+#define htonl(x) ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
+#define htons(x) ((in_port_t)__byte_swap_word((in_port_t)(x)))
+
+#endif
Home |
Main Index |
Thread Index |
Old Index