ipv4 helper macro
parent
ecdbef8b45
commit
df9ff108c3
@ -0,0 +1,21 @@
|
|||||||
|
// 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 https://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined(__BYTE_ORDER__)
|
||||||
|
#error "__BYTE_ORDER__ not defined"
|
||||||
|
#elif !defined(__ORDER_BIG_ENDIAN__)
|
||||||
|
#error "__ORDER_BIG_ENDIAN__ not defined"
|
||||||
|
#elif !defined(__ORDER_LITTLE_ENDIAN__)
|
||||||
|
#error "__ORDER_LITTLE_ENDIAN__ not defined"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||||
|
#define TLSL_BIG_ENDIAN
|
||||||
|
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||||
|
#define TLSL_LITTLE_ENDIAN
|
||||||
|
#else
|
||||||
|
#error "__BYTE_ORDER__ invalid"
|
||||||
|
#endif
|
||||||
Loading…
Reference in New Issue