Module Name: src Committed By: riastradh Date: Sun Dec 19 10:56:30 UTC 2021
Modified Files: src/sys/external/bsd/common/include/asm: byteorder.h src/sys/external/bsd/common/include/linux: kernel.h Log Message: Define Linux byte order macros __BIG_ENDIAN/__LITTLE_ENDIAN. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/common/include/asm/byteorder.h cvs rdiff -u -r1.39 -r1.40 src/sys/external/bsd/common/include/linux/kernel.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/common/include/asm/byteorder.h diff -u src/sys/external/bsd/common/include/asm/byteorder.h:1.1 src/sys/external/bsd/common/include/asm/byteorder.h:1.2 --- src/sys/external/bsd/common/include/asm/byteorder.h:1.1 Sun Feb 16 06:50:14 2020 +++ src/sys/external/bsd/common/include/asm/byteorder.h Sun Dec 19 10:56:30 2021 @@ -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 Index: src/sys/external/bsd/common/include/linux/kernel.h diff -u src/sys/external/bsd/common/include/linux/kernel.h:1.39 src/sys/external/bsd/common/include/linux/kernel.h:1.40 --- src/sys/external/bsd/common/include/linux/kernel.h:1.39 Sun Dec 19 10:51:17 2021 +++ src/sys/external/bsd/common/include/linux/kernel.h Sun Dec 19 10:56:30 2021 @@ -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)