Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch In the `MY THAT'S GROSS' department...



details:   https://anonhg.NetBSD.org/src/rev/77b18e04ebf5
branches:  trunk
changeset: 483745:77b18e04ebf5
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Fri Mar 17 00:09:18 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/alpha/include/endian.h            |   3 +-
 sys/arch/alpha/include/endian_machdep.h    |   3 ++
 sys/arch/amiga/include/endian.h            |   4 +-
 sys/arch/amiga/include/endian_machdep.h    |   3 ++
 sys/arch/arc/include/endian.h              |   5 +--
 sys/arch/arc/include/endian_machdep.h      |   4 +++
 sys/arch/arm32/include/endian.h            |   3 +-
 sys/arch/arm32/include/endian_machdep.h    |   3 ++
 sys/arch/atari/include/endian.h            |   4 +-
 sys/arch/atari/include/endian_machdep.h    |   3 ++
 sys/arch/bebox/include/endian.h            |   4 +-
 sys/arch/bebox/include/endian_machdep.h    |   3 ++
 sys/arch/evbsh3/include/endian.h           |   9 +------
 sys/arch/evbsh3/include/endian_machdep.h   |   8 +++++++
 sys/arch/hp300/include/endian.h            |   4 +-
 sys/arch/hp300/include/endian_machdep.h    |   3 ++
 sys/arch/hpcmips/include/endian.h          |   5 +--
 sys/arch/hpcmips/include/endian_machdep.h  |   4 +++
 sys/arch/i386/include/endian.h             |  21 +-----------------
 sys/arch/i386/include/endian_machdep.h     |  14 +++++++++++++
 sys/arch/luna68k/include/endian.h          |   4 +-
 sys/arch/luna68k/include/endian_machdep.h  |   3 ++
 sys/arch/m68k/include/endian.h             |   3 +-
 sys/arch/m68k/include/endian_machdep.h     |   3 ++
 sys/arch/mac68k/include/endian.h           |   4 +-
 sys/arch/mac68k/include/endian_machdep.h   |   3 ++
 sys/arch/macppc/include/endian.h           |   4 +-
 sys/arch/macppc/include/endian_machdep.h   |   3 ++
 sys/arch/mips/include/endian.h             |  32 +-----------------------------
 sys/arch/mips/include/endian_machdep.h     |  26 ++++++++++++++++++++++++
 sys/arch/mmeye/include/endian.h            |   5 +--
 sys/arch/mmeye/include/endian_machdep.h    |   4 +++
 sys/arch/mvme68k/include/endian.h          |   4 +-
 sys/arch/mvme68k/include/endian_machdep.h  |   3 ++
 sys/arch/news68k/include/endian.h          |   4 +-
 sys/arch/news68k/include/endian_machdep.h  |   3 ++
 sys/arch/newsmips/include/endian.h         |   5 +--
 sys/arch/newsmips/include/endian_machdep.h |   4 +++
 sys/arch/next68k/include/endian.h          |   4 +-
 sys/arch/next68k/include/endian_machdep.h  |   3 ++
 sys/arch/ofppc/include/endian.h            |   4 +-
 sys/arch/ofppc/include/endian_machdep.h    |   3 ++
 sys/arch/pc532/include/endian.h            |  21 +-----------------
 sys/arch/pc532/include/endian_machdep.h    |  14 +++++++++++++
 sys/arch/pmax/include/endian.h             |   5 +--
 sys/arch/pmax/include/endian_machdep.h     |   4 +++
 sys/arch/powerpc/include/endian.h          |   3 +-
 sys/arch/powerpc/include/endian_machdep.h  |   3 ++
 sys/arch/prep/include/endian.h             |   4 +-
 sys/arch/prep/include/endian_machdep.h     |   3 ++
 sys/arch/sh3/include/endian.h              |   6 +----
 sys/arch/sh3/include/endian_machdep.h      |   5 ++++
 sys/arch/sparc/include/endian.h            |   3 +-
 sys/arch/sparc/include/endian_machdep.h    |   3 ++
 sys/arch/sparc64/include/endian.h          |   3 +-
 sys/arch/sparc64/include/endian_machdep.h  |   3 ++
 sys/arch/sun3/include/endian.h             |   4 +-
 sys/arch/sun3/include/endian_machdep.h     |   3 ++
 sys/arch/vax/include/endian.h              |  21 +-----------------
 sys/arch/vax/include/endian_machdep.h      |  14 +++++++++++++
 sys/arch/x68k/include/endian.h             |   4 +-
 sys/arch/x68k/include/endian_machdep.h     |   3 ++
 62 files changed, 215 insertions(+), 155 deletions(-)

diffs (truncated from 657 to 300 lines):

diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/alpha/include/endian.h
--- a/sys/arch/alpha/include/endian.h   Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/alpha/include/endian.h   Fri Mar 17 00:09:18 2000 +0000
@@ -1,4 +1,3 @@
-/* $NetBSD: endian.h,v 1.10 2000/03/16 15:09:34 mycroft Exp $ */
+/*     $NetBSD: endian.h,v 1.11 2000/03/17 00:09:18 mycroft Exp $      */
 
-#define _BYTE_ORDER _LITTLE_ENDIAN
 #include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/alpha/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/alpha/include/endian_machdep.h   Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:18 mycroft Exp $       */
+
+#define _BYTE_ORDER _LITTLE_ENDIAN
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/amiga/include/endian.h
--- a/sys/arch/amiga/include/endian.h   Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/amiga/include/endian.h   Fri Mar 17 00:09:18 2000 +0000
@@ -1,3 +1,3 @@
-/*     $NetBSD: endian.h,v 1.8 1999/01/24 12:56:51 mycroft Exp $       */
+/*     $NetBSD: endian.h,v 1.9 2000/03/17 00:09:18 mycroft Exp $       */
 
-#include <m68k/endian.h>
+#include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/amiga/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/amiga/include/endian_machdep.h   Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:18 mycroft Exp $       */
+
+#include <m68k/endian_machdep.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/arc/include/endian.h
--- a/sys/arch/arc/include/endian.h     Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/arc/include/endian.h     Fri Mar 17 00:09:18 2000 +0000
@@ -1,4 +1,3 @@
-/*     $NetBSD: endian.h,v 1.8 2000/03/16 15:09:35 mycroft Exp $       */
+/*     $NetBSD: endian.h,v 1.9 2000/03/17 00:09:18 mycroft Exp $       */
 
-#define _BYTE_ORDER _LITTLE_ENDIAN
-#include <mips/endian.h>
+#include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/arc/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arc/include/endian_machdep.h     Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,4 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:18 mycroft Exp $       */
+
+#define _BYTE_ORDER _LITTLE_ENDIAN
+#include <mips/endian_machdep.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/arm32/include/endian.h
--- a/sys/arch/arm32/include/endian.h   Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/arm32/include/endian.h   Fri Mar 17 00:09:18 2000 +0000
@@ -1,4 +1,3 @@
-/*     $NetBSD: endian.h,v 1.9 2000/03/16 15:09:35 mycroft Exp $       */
+/*     $NetBSD: endian.h,v 1.10 2000/03/17 00:09:19 mycroft Exp $      */
 
-#define _BYTE_ORDER _LITTLE_ENDIAN
 #include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/arm32/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm32/include/endian_machdep.h   Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:19 mycroft Exp $       */
+
+#define _BYTE_ORDER _LITTLE_ENDIAN
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/atari/include/endian.h
--- a/sys/arch/atari/include/endian.h   Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/atari/include/endian.h   Fri Mar 17 00:09:18 2000 +0000
@@ -1,3 +1,3 @@
-/*     $NetBSD: endian.h,v 1.2 1999/01/24 12:56:51 mycroft Exp $       */
+/*     $NetBSD: endian.h,v 1.3 2000/03/17 00:09:19 mycroft Exp $       */
 
-#include <m68k/endian.h>
+#include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/atari/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/atari/include/endian_machdep.h   Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:19 mycroft Exp $       */
+
+#include <m68k/endian_machdep.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/bebox/include/endian.h
--- a/sys/arch/bebox/include/endian.h   Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/bebox/include/endian.h   Fri Mar 17 00:09:18 2000 +0000
@@ -1,3 +1,3 @@
-/*     $NetBSD: endian.h,v 1.3 1998/05/28 08:45:00 sakamoto Exp $      */
+/*     $NetBSD: endian.h,v 1.4 2000/03/17 00:09:19 mycroft Exp $       */
 
-#include <powerpc/endian.h>
+#include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/bebox/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/bebox/include/endian_machdep.h   Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:19 mycroft Exp $       */
+
+#include <powerpc/endian_machdep.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/evbsh3/include/endian.h
--- a/sys/arch/evbsh3/include/endian.h  Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/evbsh3/include/endian.h  Fri Mar 17 00:09:18 2000 +0000
@@ -1,8 +1,3 @@
-/*     $NetBSD: endian.h,v 1.2 2000/03/16 15:09:35 mycroft Exp $       */
+/*     $NetBSD: endian.h,v 1.3 2000/03/17 00:09:19 mycroft Exp $       */
 
-#if 1
-#define _BYTE_ORDER _BIG_ENDIAN
-#else
-#define _BYTE_ORDER _LITTLE_ENDIAN
-#endif
-#include <sh3/endian.h>
+#include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/evbsh3/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbsh3/include/endian_machdep.h  Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,8 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:20 mycroft Exp $       */
+
+#if 1
+#define _BYTE_ORDER _BIG_ENDIAN
+#else
+#define _BYTE_ORDER _LITTLE_ENDIAN
+#endif
+#include <sh3/endian_machdep.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/hp300/include/endian.h
--- a/sys/arch/hp300/include/endian.h   Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/hp300/include/endian.h   Fri Mar 17 00:09:18 2000 +0000
@@ -1,3 +1,3 @@
-/*     $NetBSD: endian.h,v 1.7 1999/01/24 12:56:52 mycroft Exp $       */
+/*     $NetBSD: endian.h,v 1.8 2000/03/17 00:09:20 mycroft Exp $       */
 
-#include <m68k/endian.h>
+#include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/hp300/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hp300/include/endian_machdep.h   Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:20 mycroft Exp $       */
+
+#include <m68k/endian_machdep.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/hpcmips/include/endian.h
--- a/sys/arch/hpcmips/include/endian.h Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/hpcmips/include/endian.h Fri Mar 17 00:09:18 2000 +0000
@@ -1,4 +1,3 @@
-/*     $NetBSD: endian.h,v 1.2 2000/03/16 15:09:35 mycroft Exp $       */
+/*     $NetBSD: endian.h,v 1.3 2000/03/17 00:09:20 mycroft Exp $       */
 
-#define _BYTE_ORDER _LITTLE_ENDIAN
-#include <mips/endian.h>
+#include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/hpcmips/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hpcmips/include/endian_machdep.h Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,4 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:20 mycroft Exp $       */
+
+#define _BYTE_ORDER _LITTLE_ENDIAN
+#include <mips/endian_machdep.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/i386/include/endian.h
--- a/sys/arch/i386/include/endian.h    Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/i386/include/endian.h    Fri Mar 17 00:09:18 2000 +0000
@@ -1,20 +1,3 @@
-/*     $NetBSD: endian.h,v 1.28 2000/03/16 15:09:36 mycroft Exp $      */
-
-#ifndef _I386_ENDIAN_H_
-#define        _I386_ENDIAN_H_
-
-#define _BYTE_ORDER _LITTLE_ENDIAN
-#include <sys/endian.h>
-
-#ifdef __GNUC__
+/*     $NetBSD: endian.h,v 1.29 2000/03/17 00:09:20 mycroft Exp $      */
 
-#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
-
-#endif /* !_I386_ENDIAN_H_ */
+#include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 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:18 2000 +0000
@@ -0,0 +1,14 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:20 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
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/luna68k/include/endian.h
--- a/sys/arch/luna68k/include/endian.h Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/luna68k/include/endian.h Fri Mar 17 00:09:18 2000 +0000
@@ -1,3 +1,3 @@
-/*     $NetBSD: endian.h,v 1.2 2000/03/16 15:09:36 mycroft Exp $       */
+/*     $NetBSD: endian.h,v 1.3 2000/03/17 00:09:21 mycroft Exp $       */
 
-#include <m68k/endian.h>
+#include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/luna68k/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/luna68k/include/endian_machdep.h Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:21 mycroft Exp $       */
+
+#include <m68k/endian_machdep.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/m68k/include/endian.h
--- a/sys/arch/m68k/include/endian.h    Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/m68k/include/endian.h    Fri Mar 17 00:09:18 2000 +0000
@@ -1,4 +1,3 @@
-/*     $NetBSD: endian.h,v 1.16 2000/03/16 15:09:36 mycroft Exp $      */
+/*     $NetBSD: endian.h,v 1.17 2000/03/17 00:09:21 mycroft Exp $      */
 
-#define _BYTE_ORDER _BIG_ENDIAN
 #include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/m68k/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/m68k/include/endian_machdep.h    Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:21 mycroft Exp $       */
+
+#define _BYTE_ORDER _BIG_ENDIAN
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/mac68k/include/endian.h
--- a/sys/arch/mac68k/include/endian.h  Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/mac68k/include/endian.h  Fri Mar 17 00:09:18 2000 +0000
@@ -1,3 +1,3 @@
-/*     $NetBSD: endian.h,v 1.5 1994/10/26 08:46:28 cgd Exp $   */
+/*     $NetBSD: endian.h,v 1.6 2000/03/17 00:09:21 mycroft Exp $       */
 
-#include <m68k/endian.h>
+#include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/mac68k/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/mac68k/include/endian_machdep.h  Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:21 mycroft Exp $       */
+
+#include <m68k/endian_machdep.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/macppc/include/endian.h
--- a/sys/arch/macppc/include/endian.h  Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/macppc/include/endian.h  Fri Mar 17 00:09:18 2000 +0000
@@ -1,3 +1,3 @@
-/*     $NetBSD: endian.h,v 1.2 1998/05/29 10:32:51 tsubai Exp $        */
+/*     $NetBSD: endian.h,v 1.3 2000/03/17 00:09:21 mycroft Exp $       */
 
-#include <powerpc/endian.h>
+#include <sys/endian.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/macppc/include/endian_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/macppc/include/endian_machdep.h  Fri Mar 17 00:09:18 2000 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:21 mycroft Exp $       */
+
+#include <powerpc/endian_machdep.h>
diff -r 56540b0c80cc -r 77b18e04ebf5 sys/arch/mips/include/endian.h
--- a/sys/arch/mips/include/endian.h    Fri Mar 17 00:01:48 2000 +0000
+++ b/sys/arch/mips/include/endian.h    Fri Mar 17 00:09:18 2000 +0000
@@ -1,33 +1,3 @@
-/*     $NetBSD: endian.h,v 1.18 2000/03/16 15:09:36 mycroft Exp $      */
-
-#ifndef _MIPS_ENDIAN_H_
-#define        _MIPS_ENDIAN_H_
-
-#ifndef _BYTE_ORDER
-# error  Define MIPS target CPU endian-ness in port-specific header file.
-#endif
+/*     $NetBSD: endian.h,v 1.19 2000/03/17 00:09:22 mycroft Exp $      */
 
 #include <sys/endian.h>
-
-#ifdef _LOCORE
-
-/*
- *   Endian-independent assembly-code aliases for unaligned memory accesses.
- */
-#if _BYTE_ORDER == _LITTLE_ENDIAN
-# define LWHI lwr
-# define LWLO lwl
-# define SWHI swr
-# define SWLO swl
-#endif
-
-#if _BYTE_ORDER == _BIG_ENDIAN
-# define LWHI lwl
-# define LWLO lwr
-# define SWHI swl
-# define SWLO swr
-#endif



Home | Main Index | Thread Index | Old Index