USRP Hardware Driver and USRP Manual
Version: 4.1.0.3
UHD and USRP Manual
config.h
Go to the documentation of this file.
1
//
2
// Copyright 2015-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
#pragma once
9
10
#ifdef _MSC_VER
11
// Bring in "and", "or", and "not"
12
#include <iso646.h>
13
14
// Define ssize_t
15
#ifndef _SSIZE_T_DEFINED
16
#define _SSIZE_T_DEFINED
17
# include <BaseTsd.h>
18
typedef
SSIZE_T ssize_t;
19
#endif
/* _SSIZE_T_DEFINED */
20
21
#endif
/* _MSC_VER */
22
23
// Define cross-platform macros
24
#if defined(_MSC_VER)
25
#define UHD_EXPORT __declspec(dllexport)
26
#define UHD_IMPORT __declspec(dllimport)
27
#define UHD_INLINE __forceinline
28
#define UHD_DEPRECATED __declspec(deprecated)
29
#define UHD_ALIGNED(x) __declspec(align(x))
30
#define UHD_UNUSED(x) x
31
#elif defined(__MINGW32__)
32
#define UHD_EXPORT __declspec(dllexport)
33
#define UHD_IMPORT __declspec(dllimport)
34
#define UHD_INLINE inline
35
#define UHD_DEPRECATED __declspec(deprecated)
36
#define UHD_ALIGNED(x) __declspec(align(x))
37
#define UHD_UNUSED(x) x __attribute__((unused))
38
#elif defined(__GNUC__) && __GNUC__ >= 4
39
#define UHD_EXPORT __attribute__((visibility("default"
)))
40
#define UHD_IMPORT __attribute__((visibility("default"
)))
41
#define UHD_INLINE inline __attribute__((always_inline))
42
#define UHD_DEPRECATED __attribute__((deprecated))
43
#define UHD_ALIGNED(x) __attribute__((aligned(x)))
44
#define UHD_UNUSED(x) x __attribute__((unused))
45
#elif defined(__clang__)
46
#define UHD_EXPORT __attribute__((visibility("default"
)))
47
#define UHD_IMPORT __attribute__((visibility("default"
)))
48
#define UHD_INLINE inline __attribute__((always_inline))
49
#define UHD_DEPRECATED __attribute__((deprecated))
50
#define UHD_ALIGNED(x) __attribute__((aligned(x)))
51
#define UHD_UNUSED(x) x __attribute__((unused))
52
#else
53
#define UHD_EXPORT
54
#define UHD_IMPORT
55
#define UHD_INLINE inline
56
#define UHD_DEPRECATED
57
#define UHD_ALIGNED(x)
58
#define UHD_UNUSED(x) x
59
#endif
60
61
// API declaration macro
62
63
// Define API declaration macro
64
#ifdef UHD_STATIC_LIB
65
#define UHD_API
66
#else
67
#ifdef UHD_DLL_EXPORTS
68
#define UHD_API UHD_EXPORT
69
#else
70
#define UHD_API UHD_IMPORT
71
#endif
// UHD_DLL_EXPORTS
72
#endif
// UHD_STATIC_LIB
73
74
// Platform defines for conditional code:
75
// Taken from boost/config/select_platform_config.hpp,
76
// However, we define macros, not strings, for platforms.
77
#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GLIBC__)) && !defined(_CRAYC) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
78
#define UHD_PLATFORM_LINUX
79
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
80
#define UHD_PLATFORM_WIN32
81
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
82
#define UHD_PLATFORM_MACOS
83
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
84
#define UHD_PLATFORM_BSD
85
#endif
include
uhd
config.h
Generated by
1.9.3