From e511dc61b48b12d944302a781326ad79811dfd8b Mon Sep 17 00:00:00 2001 From: Spacefish Date: Mon, 21 Dec 2020 14:02:41 +0100 Subject: [PATCH] upstream osal endiness adapted --- osal/Endiness.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/osal/Endiness.h b/osal/Endiness.h index 55d0aeb3..9d3fdef0 100644 --- a/osal/Endiness.h +++ b/osal/Endiness.h @@ -1,10 +1,6 @@ #ifndef FRAMEWORK_OSAL_ENDINESS_H_ #define FRAMEWORK_OSAL_ENDINESS_H_ -/** - * @defgroup osal Operating System Abstraction Layer - * @brief Provides clean interfaces to use OS functionalities - */ /* * BSD-style endian declaration @@ -26,9 +22,23 @@ #else #error "Can't decide which end is which!" #endif +#else + +#ifdef WIN32 +#include +#if REG_DWORD == REG_DWORD_LITTLE_ENDIAN +#define BYTE_ORDER_SYSTEM LITTLE_ENDIAN +#else +#define BYTE_ORDER_SYSTEM BIG_ENDIAN +#endif + + #else #error __BYTE_ORDER__ not defined #endif + +#endif + #endif