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/linux Define __BIG_ENDIAN or...



details:   https://anonhg.NetBSD.org/src/rev/fb30f8047fd9
branches:  trunk
changeset: 941125:fb30f8047fd9
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Oct 19 11:49:56 2020 +0000

description:
Define __BIG_ENDIAN or __LITTLE_ENDIAN depending on target endianness

diffstat:

 sys/external/bsd/common/include/linux/kernel.h |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (30 lines):

diff -r 5ddc8f91301a -r fb30f8047fd9 sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h    Mon Oct 19 11:31:01 2020 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h    Mon Oct 19 11:49:56 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernel.h,v 1.25 2020/02/14 14:34:57 maya Exp $ */
+/*     $NetBSD: kernel.h,v 1.26 2020/10/19 11:49:56 jmcneill Exp $     */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,6 +36,7 @@
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/endian.h>
 
 #include <lib/libkern/libkern.h>
 
@@ -53,6 +54,12 @@
 
 #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_ENABLED(option)      (option)
 #define        IS_BUILTIN(option)      (1) /* Probably... */
 



Home | Main Index | Thread Index | Old Index