USRP Hardware Driver and USRP Manual
Version: 3.14.0.HEAD-0-g28fe2e2c
UHD and USRP Manual
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
config.hpp
Go to the documentation of this file.
1
//
2
// Copyright 2010-2011,2014-2016 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_CONFIG_HPP
9
#define INCLUDED_UHD_CONFIG_HPP
10
11
#include <boost/config.hpp>
12
13
#ifdef BOOST_MSVC
14
// suppress warnings
15
//# pragma warning(push)
16
//# pragma warning(disable: 4511) // copy constructor can't not be generated
17
//# pragma warning(disable: 4512) // assignment operator can't not be generated
18
//# pragma warning(disable: 4100) // unreferenced formal parameter
19
//# pragma warning(disable: 4996) // <symbol> was declared deprecated
20
# pragma warning(disable: 4355) // 'this' : used in base member initializer list
21
//# pragma warning(disable: 4706) // assignment within conditional expression
22
# pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
23
//# pragma warning(disable: 4127) // conditional expression is constant
24
//# pragma warning(disable: 4290) // C++ exception specification ignored except to ...
25
//# pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored
26
# pragma warning(disable: 4275) // non dll-interface class ... used as base for dll-interface class ...
27
//# pragma warning(disable: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
28
//# pragma warning(disable: 4511) // 'class' : copy constructor could not be generated
29
# pragma warning(disable: 4250) // 'class' : inherits 'method' via dominance
30
# pragma warning(disable: 4200) // nonstandard extension used : zero-sized array in struct/union
31
32
// define logical operators
33
#include <ciso646>
34
35
// define ssize_t
36
#include <cstddef>
37
typedef
ptrdiff_t ssize_t;
38
39
#endif //BOOST_MSVC
40
41
//define cross platform attribute macros
42
#if defined(BOOST_MSVC)
43
#define UHD_EXPORT __declspec(dllexport)
44
#define UHD_IMPORT __declspec(dllimport)
45
#define UHD_INLINE __forceinline
46
#define UHD_FORCE_INLINE __forceinline
47
#define UHD_DEPRECATED __declspec(deprecated)
48
#define UHD_ALIGNED(x) __declspec(align(x))
49
#define UHD_UNUSED(x) x
50
#elif defined(__MINGW32__)
51
#define UHD_EXPORT __declspec(dllexport)
52
#define UHD_IMPORT __declspec(dllimport)
53
#define UHD_INLINE inline
54
#define UHD_FORCE_INLINE inline
55
#define UHD_DEPRECATED __declspec(deprecated)
56
#define UHD_ALIGNED(x) __declspec(align(x))
57
#define UHD_UNUSED(x) x __attribute__((unused))
58
#elif defined(__GNUG__) && __GNUG__ >= 4
59
#define UHD_EXPORT __attribute__((visibility("default")))
60
#define UHD_IMPORT __attribute__((visibility("default")))
61
#define UHD_INLINE inline __attribute__((always_inline))
62
#define UHD_FORCE_INLINE inline __attribute__((always_inline))
63
#define UHD_DEPRECATED __attribute__((deprecated))
64
#define UHD_ALIGNED(x) __attribute__((aligned(x)))
65
#define UHD_UNUSED(x) x __attribute__((unused))
66
#elif defined(__clang__)
67
#define UHD_EXPORT __attribute__((visibility("default")))
68
#define UHD_IMPORT __attribute__((visibility("default")))
69
#define UHD_INLINE inline __attribute__((always_inline))
70
#define UHD_FORCE_INLINE inline __attribute__((always_inline))
71
#define UHD_DEPRECATED __attribute__((deprecated))
72
#define UHD_ALIGNED(x) __attribute__((aligned(x)))
73
#define UHD_UNUSED(x) x __attribute__((unused))
74
#else
75
#define UHD_EXPORT
76
#define UHD_IMPORT
77
#define UHD_INLINE inline
78
#define UHD_FORCE_INLINE inline
79
#define UHD_DEPRECATED
80
#define UHD_ALIGNED(x)
81
#define UHD_UNUSED(x) x
82
#endif
83
84
// Define API declaration macro
85
#ifdef UHD_STATIC_LIB
86
#define UHD_API
87
#else
88
#ifdef UHD_DLL_EXPORTS
89
#define UHD_API UHD_EXPORT
90
#else
91
#define UHD_API UHD_IMPORT
92
#endif // UHD_DLL_EXPORTS
93
#endif // UHD_STATIC_LIB
94
95
#ifdef UHD_RFNOC_ENABLED
96
#define UHD_RFNOC_API UHD_API
97
#else
98
#define UHD_RFNOC_API
99
#endif // UHD_RFNOC_ENABLED
100
101
102
// Platform defines for conditional parts of headers:
103
// Taken from boost/config/select_platform_config.hpp,
104
// however, we define macros, not strings for platforms.
105
#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GLIBC__)) && !defined(_CRAYC) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
106
#define UHD_PLATFORM_LINUX
107
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
108
#define UHD_PLATFORM_WIN32
109
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
110
#define UHD_PLATFORM_MACOS
111
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
112
#define UHD_PLATFORM_BSD
113
#endif
114
115
// Define 'stringize' preprocessor macros. The stringize macro, XSTR, takes
116
// variable arguments so that it can deal with strings that contain commas.
117
// There are two different versions because MSVC handles this syntax a bit
118
// differently than other compilers.
119
#if defined(BOOST_MSVC)
120
#define XSTR(x,...) #x
121
#else
122
#define XSTR(x...) #x
123
#endif
124
125
#define STR(x) XSTR(x)
126
127
#endif
/* INCLUDED_UHD_CONFIG_HPP */
include
uhd
config.hpp
Generated by
1.8.13