USRP Hardware Driver and USRP Manual
Version: 003.009.003-0-gf0720677
UHD and USRP Manual
config.h
Go to the documentation of this file.
1
//
2
// Copyright 2015 Ettus Research LLC
3
//
4
// This program is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16
//
17
18
#ifndef INCLUDED_UHD_CONFIG_H
19
#define INCLUDED_UHD_CONFIG_H
20
21
#ifdef _MSC_VER
22
// Bring in "and", "or", and "not"
23
#include <iso646.h>
24
25
// Define ssize_t
26
#include <stddef.h>
27
typedef
ptrdiff_t ssize_t;
28
29
#endif
/* _MSC_VER */
30
31
// Define cross-platform macros
32
#if defined(_MSC_VER)
33
#define UHD_EXPORT __declspec(dllexport)
34
#define UHD_IMPORT __declspec(dllimport)
35
#define UHD_INLINE __forceinline
36
#define UHD_DEPRECATED __declspec(deprecated)
37
#define UHD_ALIGNED(x) __declspec(align(x))
38
#define UHD_UNUSED(x) x
39
#elif defined(__MINGW32__)
40
#define UHD_EXPORT __declspec(dllexport)
41
#define UHD_IMPORT __declspec(dllimport)
42
#define UHD_INLINE inline
43
#define UHD_DEPRECATED __declspec(deprecated)
44
#define UHD_ALIGNED(x) __declspec(align(x))
45
#define UHD_UNUSED(x) x __attribute__((unused))
46
#elif defined(__GNUG__) && __GNUG__ >= 4
47
#define UHD_EXPORT __attribute__((visibility("default")))
48
#define UHD_IMPORT __attribute__((visibility("default")))
49
#define UHD_INLINE inline __attribute__((always_inline))
50
#define UHD_DEPRECATED __attribute__((deprecated))
51
#define UHD_ALIGNED(x) __attribute__((aligned(x)))
52
#define UHD_UNUSED(x) x __attribute__((unused))
53
#else
54
#define UHD_EXPORT
55
#define UHD_IMPORT
56
#define UHD_INLINE inline
57
#define UHD_DEPRECATED
58
#define UHD_ALIGNED(x)
59
#define UHD_UNUSED(x) x
60
#endif
61
62
// API declaration macro
63
#ifdef UHD_DLL_EXPORTS
64
#define UHD_API UHD_EXPORT
65
#else
66
#define UHD_API UHD_IMPORT
67
#endif // UHD_DLL_EXPORTS
68
69
// Platform defines for conditional code:
70
// Taken from boost/config/select_platform_config.hpp,
71
// However, we define macros, not strings, for platforms.
72
#if defined(linux) || defined(__linux) || defined(__linux__)
73
#define UHD_PLATFORM_LINUX
74
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
75
#define UHD_PLATFORM_WIN32
76
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
77
#define UHD_PLATFORM_MACOS
78
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
79
#define UHD_PLATFORM_BSD
80
#endif
81
82
#endif
/* INCLUDED_UHD_CONFIG_H */
include
uhd
config.h
Generated on Wed Oct 9 2019 18:26:18 for USRP Hardware Driver and USRP Manual by
1.8.13