diff options
author | Diogo Pedrosa <48529452+DiogoPedrozza@users.noreply.github.com> | 2023-03-13 14:09:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-13 14:09:12 +0000 |
commit | 1b427801352b5dcfdc2277f6343166c01afe97d6 (patch) | |
tree | d4e984dd100f3257ce784c9e30aefb6e60a93ab5 /implementation/utility/include/byteorder.hpp | |
parent | fc73f40fa1501dc53210c63cb7c0d7623d106370 (diff) | |
parent | 826ebb8d352245a36ecaec32b6af61e7abf4696e (diff) | |
download | vSomeIP-1b427801352b5dcfdc2277f6343166c01afe97d6.tar.gz |
Merge pull request #416 from COVESA/update_3.3.03.3.0
vsomeip 3.3.0
Diffstat (limited to 'implementation/utility/include/byteorder.hpp')
-rw-r--r-- | implementation/utility/include/byteorder.hpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/implementation/utility/include/byteorder.hpp b/implementation/utility/include/byteorder.hpp index ad7f752..deda45c 100644 --- a/implementation/utility/include/byteorder.hpp +++ b/implementation/utility/include/byteorder.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2021 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -6,9 +6,9 @@ #ifndef VSOMEIP_V3_BYTEORDER_HPP #define VSOMEIP_V3_BYTEORDER_HPP -#if defined(LINUX) +#if defined(__linux__) #include <endian.h> -#elif defined(FREEBSD) +#elif defined(__freebsd__) #include <sys/endian.h> #else // TEST IF THERE COULD BE AN ERROR! @@ -38,8 +38,6 @@ #define VSOMEIP_BYTES_TO_WORD(x0, x1) (uint16_t((x1) << 8 | (x0))) #define VSOMEIP_BYTES_TO_LONG(x0, x1, x2, x3) (uint32_t((x3) << 24 | (x2) << 16 | (x1) << 8 | (x0))) -#define VSOMEIP_WORDS_TO_LONG(x0, x1) (uint32_t((x1) << 16 | (x0))) - #define VSOMEIP_WORD_BYTE0(x) (uint8_t((x) >> 8)) #define VSOMEIP_WORD_BYTE1(x) (uint8_t((x) & 0xFF)) @@ -48,8 +46,8 @@ #define VSOMEIP_LONG_BYTE2(x) (uint8_t(((x) >> 8) & 0xFF)) #define VSOMEIP_LONG_BYTE3(x) (uint8_t((x) & 0xFF)) -#define VSOMEIP_LONG_WORD0(x) (uint16_t(((x) >> 16) & 0xFFFF)) -#define VSOMEIP_LONG_WORD1(x) (uint16_t((x) & 0xFFFF)) +#define VSOMEIP_LONG_WORD0(x) (uint16_t((((x) >> 16) & 0xFFFF)) +#define VSOMEIP_LONG_WORD1(x) (uint16_t(((x) & 0xFFFF)) #else |