USRP Hardware Driver and USRP Manual  Version: 3.14.0.HEAD-0-g6875d061
UHD and USRP Manual
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
endianness.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2014 Ettus Research LLC
3 // Copyright 2018 Ettus Research, a National Instruments Company
4 //
5 // SPDX-License-Identifier: GPL-3.0-or-later
6 //
7 
8 #ifndef INCLUDED_UHD_TYPES_ENDIANNESS_HPP
9 #define INCLUDED_UHD_TYPES_ENDIANNESS_HPP
10 
11 #include <uhd/config.hpp>
12 
13 /******************************************************************************
14  * Detect host endianness
15  *****************************************************************************/
16 #if BOOST_VERSION >= 105500
17 
18 # include <boost/predef/other/endian.h>
19 
20 // In Boost 1.55, the meaning of the macros changed. They are now always
21 // defined, but don't always have the same value.
22 # if BOOST_ENDIAN_BIG_BYTE
23 # define UHD_BIG_ENDIAN
24 # elif BOOST_ENDIAN_LITTLE_BYTE
25 # define UHD_LITTLE_ENDIAN
26 # else
27 # error "Unsupported endianness!"
28 # endif
29 
30 #else
31 
32 # include <boost/detail/endian.hpp>
33 
34 # if defined(BOOST_BIG_ENDIAN)
35 # define UHD_BIG_ENDIAN
36 # elif defined(BOOST_LITTLE_ENDIAN)
37 # define UHD_LITTLE_ENDIAN
38 # else
39 # error "Unsupported endianness!"
40 # endif
41 
42 #endif
43 
44 
45 namespace uhd {
46 
48 
49 } // namespace uhd
50 
51 #endif /* INCLUDED_UHD_TYPES_ENDIANNESS_HPP */
Definition: build_info.hpp:13
endianness_t
Definition: endianness.hpp:47
Definition: endianness.hpp:47
Definition: endianness.hpp:47