Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/common/include Define Linux byte order macr...
details: https://anonhg.NetBSD.org/src/rev/0d850c349c36
branches: trunk
changeset: 1028392:0d850c349c36
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 10:56:30 2021 +0000
description:
Define Linux byte order macros __BIG_ENDIAN/__LITTLE_ENDIAN.
diffstat:
sys/external/bsd/common/include/asm/byteorder.h | 10 +++++++++-
sys/external/bsd/common/include/linux/kernel.h | 9 +--------
2 files changed, 10 insertions(+), 9 deletions(-)
diffs (54 lines):
diff -r ed2786341cbd -r 0d850c349c36 sys/external/bsd/common/include/asm/byteorder.h
--- a/sys/external/bsd/common/include/asm/byteorder.h Sun Dec 19 10:56:23 2021 +0000
+++ b/sys/external/bsd/common/include/asm/byteorder.h Sun Dec 19 10:56:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: byteorder.h,v 1.1 2020/02/16 06:50:14 riastradh Exp $ */
+/* $NetBSD: byteorder.h,v 1.2 2021/12/19 10:56:30 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -34,6 +34,14 @@
#include <sys/endian.h>
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+#define __LITTLE_ENDIAN
+#elif _BYTE_ORDER == _BIG_ENDIAN
+#define __BIG_ENDIAN
+#else
+#error Unknown byte order!
+#endif
+
#define cpu_to_le16 htole16
#define cpu_to_le32 htole32
#define cpu_to_le64 htole64
diff -r ed2786341cbd -r 0d850c349c36 sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h Sun Dec 19 10:56:23 2021 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h Sun Dec 19 10:56:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernel.h,v 1.39 2021/12/19 10:51:17 riastradh Exp $ */
+/* $NetBSD: kernel.h,v 1.40 2021/12/19 10:56:30 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,7 +36,6 @@
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/endian.h>
#include <lib/libkern/libkern.h>
@@ -55,12 +54,6 @@
#define oops_in_progress (panicstr != NULL)
-#if BYTE_ORDER == BIG_ENDIAN
-#define __BIG_ENDIAN _BIG_ENDIAN
-#else
-#define __LITTLE_ENDIAN _LITTLE_ENDIAN
-#endif
-
#define IS_BUILTIN(option) (1) /* Probably... */
#define IS_ENABLED(option) (option)
#define IS_REACHABLE(option) (option)
Home |
Main Index |
Thread Index |
Old Index