Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Foolish consistency. Mainly, always use underscore...



details:   https://anonhg.NetBSD.org/src/rev/22f8bfedaa14
branches:  trunk
changeset: 483716:22f8bfedaa14
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Thu Mar 16 15:09:34 2000 +0000

description:
Foolish consistency.  Mainly, always use underscores and sys/endian.h.

diffstat:

 sys/arch/alpha/include/endian.h    |    7 +--
 sys/arch/arc/include/endian.h      |    3 +-
 sys/arch/arm32/include/endian.h    |    7 +--
 sys/arch/evbsh3/include/endian.h   |   11 +--
 sys/arch/hpcmips/include/endian.h  |    5 +-
 sys/arch/i386/include/endian.h     |   10 +-
 sys/arch/luna68k/include/endian.h  |    3 +-
 sys/arch/m68k/include/endian.h     |    7 +--
 sys/arch/mips/include/endian.h     |   17 +++--
 sys/arch/mmeye/include/endian.h    |    4 +-
 sys/arch/newsmips/include/endian.h |    2 +-
 sys/arch/pc532/include/endian.h    |   10 +-
 sys/arch/pmax/include/endian.h     |    7 +--
 sys/arch/powerpc/include/endian.h  |    7 +--
 sys/arch/sh3/include/endian.h      |  100 +-----------------------------------
 sys/arch/sparc/include/endian.h    |    7 +--
 sys/arch/sparc64/include/endian.h  |    7 +--
 sys/arch/vax/include/endian.h      |    4 +-
 18 files changed, 40 insertions(+), 178 deletions(-)

diffs (truncated from 381 to 300 lines):

diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/alpha/include/endian.h
--- a/sys/arch/alpha/include/endian.h   Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/alpha/include/endian.h   Thu Mar 16 15:09:34 2000 +0000
@@ -1,9 +1,4 @@
-/* $NetBSD: endian.h,v 1.9 1999/08/21 05:53:50 simonb Exp $ */
-
-#ifndef _MACHINE_ENDIAN_H_
-#define        _MACHINE_ENDIAN_H_
+/* $NetBSD: endian.h,v 1.10 2000/03/16 15:09:34 mycroft Exp $ */
 
 #define _BYTE_ORDER _LITTLE_ENDIAN
 #include <sys/endian.h>
-
-#endif /* !_MACHINE_ENDIAN_H_ */
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/arc/include/endian.h
--- a/sys/arch/arc/include/endian.h     Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/arc/include/endian.h     Thu Mar 16 15:09:34 2000 +0000
@@ -1,5 +1,4 @@
-/*     $NetBSD: endian.h,v 1.7 2000/01/23 21:01:56 soda Exp $  */
-/*     $OpenBSD: endian.h,v 1.3 1997/04/04 03:05:29 millert Exp $      */
+/*     $NetBSD: endian.h,v 1.8 2000/03/16 15:09:35 mycroft Exp $       */
 
 #define _BYTE_ORDER _LITTLE_ENDIAN
 #include <mips/endian.h>
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/arm32/include/endian.h
--- a/sys/arch/arm32/include/endian.h   Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/arm32/include/endian.h   Thu Mar 16 15:09:34 2000 +0000
@@ -1,9 +1,4 @@
-/*     $NetBSD: endian.h,v 1.8 1999/08/21 05:53:50 simonb Exp $        */
-
-#ifndef _MACHINE_ENDIAN_H_
-#define _MACHINE_ENDIAN_H_
+/*     $NetBSD: endian.h,v 1.9 2000/03/16 15:09:35 mycroft Exp $       */
 
 #define _BYTE_ORDER _LITTLE_ENDIAN
 #include <sys/endian.h>
-
-#endif /* _MACHINE_ENDIAN_H_ */
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/evbsh3/include/endian.h
--- a/sys/arch/evbsh3/include/endian.h  Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/evbsh3/include/endian.h  Thu Mar 16 15:09:34 2000 +0000
@@ -1,13 +1,8 @@
-/*     $NetBSD: endian.h,v 1.1 1999/09/13 10:30:32 itojun Exp $        */
-#ifndef _EVBSH3_ENDIAN_H_
-#define _EVBSH3_ENDIAN_H_
+/*     $NetBSD: endian.h,v 1.2 2000/03/16 15:09:35 mycroft Exp $       */
 
 #if 1
-#define _BYTE_ORDER    BIG_ENDIAN
+#define _BYTE_ORDER _BIG_ENDIAN
 #else
-#define _BYTE_ORDER    LITTLE_ENDIAN
+#define _BYTE_ORDER _LITTLE_ENDIAN
 #endif
-
 #include <sh3/endian.h>
-
-#endif /* _EVBSH3_ENDIAN_H_ */
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/hpcmips/include/endian.h
--- a/sys/arch/hpcmips/include/endian.h Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/hpcmips/include/endian.h Thu Mar 16 15:09:34 2000 +0000
@@ -1,7 +1,4 @@
-/*     $NetBSD: endian.h,v 1.1.1.1 1999/09/16 12:23:22 takemura Exp $  */
+/*     $NetBSD: endian.h,v 1.2 2000/03/16 15:09:35 mycroft Exp $       */
 
-/*
- * Define the order of bytes in a 32-bit word.
- */
 #define _BYTE_ORDER _LITTLE_ENDIAN
 #include <mips/endian.h>
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/i386/include/endian.h
--- a/sys/arch/i386/include/endian.h    Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/i386/include/endian.h    Thu Mar 16 15:09:34 2000 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: endian.h,v 1.27 1999/08/21 05:53:50 simonb Exp $       */
+/*     $NetBSD: endian.h,v 1.28 2000/03/16 15:09:36 mycroft Exp $      */
 
-#ifndef _MACHINE_ENDIAN_H_
-#define        _MACHINE_ENDIAN_H_
+#ifndef _I386_ENDIAN_H_
+#define        _I386_ENDIAN_H_
 
 #define _BYTE_ORDER _LITTLE_ENDIAN
 #include <sys/endian.h>
@@ -15,6 +15,6 @@
 #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 /* __GNUC__ */
+#endif
 
-#endif /* !_MACHINE_ENDIAN_H_ */
+#endif /* !_I386_ENDIAN_H_ */
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/luna68k/include/endian.h
--- a/sys/arch/luna68k/include/endian.h Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/luna68k/include/endian.h Thu Mar 16 15:09:34 2000 +0000
@@ -1,4 +1,3 @@
-/*     $NetBSD: endian.h,v 1.1 2000/01/05 08:48:57 nisimura Exp $      */
+/*     $NetBSD: endian.h,v 1.2 2000/03/16 15:09:36 mycroft Exp $       */
 
-/* Just use the common m68k definition */
 #include <m68k/endian.h>
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/m68k/include/endian.h
--- a/sys/arch/m68k/include/endian.h    Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/m68k/include/endian.h    Thu Mar 16 15:09:34 2000 +0000
@@ -1,9 +1,4 @@
-/*     $NetBSD: endian.h,v 1.15 1999/08/21 05:53:51 simonb Exp $       */
-
-#ifndef _MACHINE_ENDIAN_H_
-#define _MACHINE_ENDIAN_H_
+/*     $NetBSD: endian.h,v 1.16 2000/03/16 15:09:36 mycroft Exp $      */
 
 #define _BYTE_ORDER _BIG_ENDIAN
 #include <sys/endian.h>
-
-#endif /* _MACHINE_ENDIAN_H_ */
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/mips/include/endian.h
--- a/sys/arch/mips/include/endian.h    Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/mips/include/endian.h    Thu Mar 16 15:09:34 2000 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: endian.h,v 1.17 1999/08/21 05:53:51 simonb Exp $       */
+/*     $NetBSD: endian.h,v 1.18 2000/03/16 15:09:36 mycroft Exp $      */
 
-#ifndef _MACHINE_ENDIAN_H_
-#define        _MACHINE_ENDIAN_H_
+#ifndef _MIPS_ENDIAN_H_
+#define        _MIPS_ENDIAN_H_
 
 #ifndef _BYTE_ORDER
 # error  Define MIPS target CPU endian-ness in port-specific header file.
@@ -10,23 +10,24 @@
 #include <sys/endian.h>
 
 #ifdef _LOCORE
+
 /*
  *   Endian-independent assembly-code aliases for unaligned memory accesses.
  */
-#if BYTE_ORDER == LITTLE_ENDIAN
+#if _BYTE_ORDER == _LITTLE_ENDIAN
 # define LWHI lwr
 # define LWLO lwl
 # define SWHI swr
 # define SWLO swl
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
+#endif
 
-#if BYTE_ORDER == BIG_ENDIAN
+#if _BYTE_ORDER == _BIG_ENDIAN
 # define LWHI lwl
 # define LWLO lwr
 # define SWHI swl
 # define SWLO swr
-#endif /* BYTE_ORDER == BIG_ENDIAN */
+#endif
 
 #endif /* LOCORE */
 
-#endif /* !_MACHINE_ENDIAN_H_ */
+#endif /* !_MIPS_ENDIAN_H_ */
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/mmeye/include/endian.h
--- a/sys/arch/mmeye/include/endian.h   Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/mmeye/include/endian.h   Thu Mar 16 15:09:34 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: endian.h,v 1.1 1999/09/13 10:30:55 itojun Exp $        */
+/*     $NetBSD: endian.h,v 1.2 2000/03/16 15:09:36 mycroft Exp $       */
 
-#define _BYTE_ORDER    BIG_ENDIAN
+#define _BYTE_ORDER _BIG_ENDIAN
 #include <sh3/endian.h>
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/newsmips/include/endian.h
--- a/sys/arch/newsmips/include/endian.h        Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/newsmips/include/endian.h        Thu Mar 16 15:09:34 2000 +0000
@@ -1,4 +1,4 @@
-/*     from $NetBSD: endian.h,v 1.2 1999/01/24 12:56:52 mycroft Exp $  */
+/*     $NetBSD: endian.h,v 1.3 2000/03/16 15:09:37 mycroft Exp $       */
 
 #define _BYTE_ORDER _BIG_ENDIAN
 #include <mips/endian.h>
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/pc532/include/endian.h
--- a/sys/arch/pc532/include/endian.h   Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/pc532/include/endian.h   Thu Mar 16 15:09:34 2000 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: endian.h,v 1.15 1999/08/21 05:53:51 simonb Exp $       */
+/*     $NetBSD: endian.h,v 1.16 2000/03/16 15:09:37 mycroft Exp $      */
 
-#ifndef _MACHINE_ENDIAN_H_
-#define _MACHINE_ENDIAN_H_
+#ifndef _PC532_ENDIAN_H_
+#define _PC532_ENDIAN_H_
 
 #define _BYTE_ORDER _LITTLE_ENDIAN
 #include <sys/endian.h>
@@ -15,6 +15,6 @@
 #define        htonl(x)        __byte_swap_long(x)
 #define        htons(x)        __byte_swap_word(x)
 
-#endif /* __GNUC__ */
+#endif
 
-#endif /* _MACHINE_ENDIAN_H_ */
+#endif /* !_PC532_ENDIAN_H_ */
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/pmax/include/endian.h
--- a/sys/arch/pmax/include/endian.h    Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/pmax/include/endian.h    Thu Mar 16 15:09:34 2000 +0000
@@ -1,9 +1,4 @@
-/*     $NetBSD: endian.h,v 1.9 2000/01/09 15:34:42 ad Exp $    */
-
-#ifndef _PMAX_ENDIAN_H_
-#define _PMAX_ENDIAN_H_
+/*     $NetBSD: endian.h,v 1.10 2000/03/16 15:09:37 mycroft Exp $      */
 
 #define _BYTE_ORDER _LITTLE_ENDIAN
 #include <mips/endian.h>
-
-#endif /* !_PMAX_ENDIAN_H_ */
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/powerpc/include/endian.h
--- a/sys/arch/powerpc/include/endian.h Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/powerpc/include/endian.h Thu Mar 16 15:09:34 2000 +0000
@@ -1,9 +1,4 @@
-/*     $NetBSD: endian.h,v 1.7 1999/08/21 05:53:51 simonb Exp $        */
-
-#ifndef        _MACHINE_ENDIAN_H_
-#define        _MACHINE_ENDIAN_H_
+/*     $NetBSD: endian.h,v 1.8 2000/03/16 15:09:37 mycroft Exp $       */
 
 #define _BYTE_ORDER _BIG_ENDIAN
 #include <sys/endian.h>
-
-#endif /* _MACHINE_ENDIAN_H_ */
diff -r 2cce62cec61a -r 22f8bfedaa14 sys/arch/sh3/include/endian.h
--- a/sys/arch/sh3/include/endian.h     Thu Mar 16 15:07:22 2000 +0000
+++ b/sys/arch/sh3/include/endian.h     Thu Mar 16 15:09:34 2000 +0000
@@ -1,101 +1,7 @@
-/*     $NetBSD: endian.h,v 1.2 2000/01/14 15:46:02 msaitoh Exp $ */
-
-/*
- * Copyright (c) 1987, 1991 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *     @(#)endian.h    7.7 (Berkeley) 4/3/91
- */
-
-#ifndef _MACHINE_ENDIAN_H_
-#define _MACHINE_ENDIAN_H_
-
-
-/*
- * Definitions for byte order, according to byte significance from low
- * address to high.
- */
-#define        LITTLE_ENDIAN   1234    /* LSB first: i386, vax */
-#define        BIG_ENDIAN      4321    /* MSB first: 68000, ibm, net */
-#define        PDP_ENDIAN      3412    /* LSB first in word, MSW first in long */
+/*     $NetBSD: endian.h,v 1.3 2000/03/16 15:09:37 mycroft Exp $ */
 
 #ifndef _BYTE_ORDER
-#error Define _BYTE_ORDER!
-#endif
-#define        BYTE_ORDER      _BYTE_ORDER
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define _QUAD_HIGHWORD 0
-#define _QUAD_LOWWORD  1
-#else
-#define _QUAD_HIGHWORD 1
-#define _QUAD_LOWWORD  0
+# error  Define SH target CPU endian-ness in port-specific header file.
 #endif
 
-#ifndef _LOCORE
-#include <machine/types.h>



Home | Main Index | Thread Index | Old Index